From 059a3168246f803936de63ced1d356d649d4ad16 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Wed, 23 Oct 2013 15:59:23 +0200 Subject: refactor: align jsonFind() calling interface with recent changes --- runtime/msg.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'runtime/msg.c') diff --git a/runtime/msg.c b/runtime/msg.c index 5224ccea..36444bbc 100644 --- a/runtime/msg.c +++ b/runtime/msg.c @@ -3864,7 +3864,7 @@ DBGPRINTF("AAAA jsonMerge adds '%s'\n", it.key); /* find a JSON structure element (field or container doesn't matter). */ rsRetVal -jsonFind(struct json_object *jroot, uchar *propName, int propNameLen, struct json_object **jsonres) +jsonFind(struct json_object *jroot, msgPropDescr_t *pProp, struct json_object **jsonres) { uchar *leaf; struct json_object *parent; @@ -3876,11 +3876,11 @@ jsonFind(struct json_object *jroot, uchar *propName, int propNameLen, struct jso goto finalize_it; } - if(!strcmp((char*)propName, "!")) { + if(!strcmp((char*)pProp->name, "!")) { field = jroot; } else { - leaf = jsonPathGetLeaf(propName, propNameLen); - CHKiRet(jsonPathFindParent(jroot, propName, leaf, &parent, 0)); + leaf = jsonPathGetLeaf(pProp->name, pProp->nameLen); + CHKiRet(jsonPathFindParent(jroot, pProp->name, leaf, &parent, 0)); field = json_object_object_get(parent, (char*)leaf); } *jsonres = field; -- cgit v1.2.3