diff options
Diffstat (limited to 'veslibrary/ves_clibrary/evel/evel-library/code/evel_library/evel_jsonobject.c')
-rw-r--r-- | veslibrary/ves_clibrary/evel/evel-library/code/evel_library/evel_jsonobject.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/veslibrary/ves_clibrary/evel/evel-library/code/evel_library/evel_jsonobject.c b/veslibrary/ves_clibrary/evel/evel-library/code/evel_library/evel_jsonobject.c index 4f788bd..36ee2d5 100644 --- a/veslibrary/ves_clibrary/evel/evel-library/code/evel_library/evel_jsonobject.c +++ b/veslibrary/ves_clibrary/evel/evel-library/code/evel_library/evel_jsonobject.c @@ -96,7 +96,6 @@ exit_label: EVEL_JSON_OBJECT_INSTANCE * evel_new_jsonobjinstance(const char *const yourjson) { EVEL_JSON_OBJECT_INSTANCE *jobjinst = NULL; - jsmntok_t *key; int resultCode; jsmn_parser p; jsmntok_t tokens[MAX_JSON_TOKENS]; // a number >= total number of tokens @@ -298,7 +297,7 @@ void evel_jsonobject_nfsubscriptionid_set(EVEL_JSON_OBJECT * pinst, const char * void evel_epoch_microsec_set(EVEL_JSON_OBJECT_INSTANCE * pinst, const unsigned long long epmicrosec) { assert(epmicrosec != 0 ); - pinst->objinst_epoch_microsec = epmicrosec; + evel_set_option_ull(&pinst->objinst_epoch_microsec , epmicrosec, "Json object instance microsec set"); } /**************************************************************************//** @@ -321,7 +320,7 @@ void evel_jsonobject_add_jsoninstance(EVEL_JSON_OBJECT * pobj, EVEL_JSON_OBJECT_ assert(pobj != NULL); assert(jinst != NULL); - EVEL_DEBUG("Adding json object instance"); + EVEL_DEBUG("Adding json object instance %p",jinst); dlist_push_last(&pobj->jsonobjectinstances, jinst); @@ -375,6 +374,7 @@ void evel_free_internal_key(EVEL_INTERNAL_KEY * keyp) free(keyp->keyname); evel_free_option_string(&keyp->keyvalue); + free(keyp); EVEL_EXIT(); } @@ -407,6 +407,7 @@ void evel_free_jsonobjinst(EVEL_JSON_OBJECT_INSTANCE * objinst) evel_free_internal_key(other_field); other_field = dlist_pop_last(&objinst->object_keys); } + free(objinst); EVEL_EXIT(); } @@ -425,6 +426,7 @@ void evel_free_jsonobject(EVEL_JSON_OBJECT * jsobj) EVEL_ENTER(); assert(jsobj != NULL); + EVEL_DEBUG("Freeing Json Object (%s)", jsobj->object_name); free(jsobj->object_name); evel_free_option_string(&jsobj->objectschema); evel_free_option_string(&jsobj->objectschemaurl); @@ -437,11 +439,12 @@ void evel_free_jsonobject(EVEL_JSON_OBJECT * jsobj) other_field = dlist_pop_last(&jsobj->jsonobjectinstances); while (other_field != NULL) { - EVEL_DEBUG("Freeing Object Instance Field (%s)", - other_field->jsonstring); + EVEL_DEBUG("Freeing jsonObject Instance Field %p (%s)", + other_field,other_field->jsonstring); evel_free_jsonobjinst(other_field); other_field = dlist_pop_last(&jsobj->jsonobjectinstances); } + free(jsobj); EVEL_EXIT(); } |