summaryrefslogtreecommitdiffstats
path: root/runtime/msg.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2013-10-23 15:59:23 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2013-10-23 15:59:23 +0200
commit059a3168246f803936de63ced1d356d649d4ad16 (patch)
treed08416f73bb371089113a12f05dd98abf3405de2 /runtime/msg.c
parentb5a5041d7528999ebc3eb6ac378925eb235df641 (diff)
downloadrsyslog-059a3168246f803936de63ced1d356d649d4ad16.tar.gz
rsyslog-059a3168246f803936de63ced1d356d649d4ad16.tar.bz2
rsyslog-059a3168246f803936de63ced1d356d649d4ad16.zip
refactor: align jsonFind() calling interface with recent changes
Diffstat (limited to 'runtime/msg.c')
-rw-r--r--runtime/msg.c8
1 files changed, 4 insertions, 4 deletions
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;