diff options
Diffstat (limited to 'runtime/msg.c')
-rw-r--r-- | runtime/msg.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/runtime/msg.c b/runtime/msg.c index 2dfa15f2..1ec93d9e 100644 --- a/runtime/msg.c +++ b/runtime/msg.c @@ -295,6 +295,7 @@ static pthread_mutex_t mutTrimCtr; /* mutex to handle malloc trim */ static int getAPPNAMELen(msg_t *pM, sbool bLockMutex); static rsRetVal jsonPathFindParent(msg_t *pM, uchar *name, uchar *leaf, struct json_object **parent, int bCreate); static uchar * jsonPathGetLeaf(uchar *name, int lenName); +static struct json_object *jsonDeepCopy(struct json_object *src); /* The following functions will support advanced output module @@ -1033,6 +1034,9 @@ msg_t* MsgDup(msg_t* pOld) tmpCOPYCSTR(PROCID); tmpCOPYCSTR(MSGID); + if(pOld->json != NULL) + pNew->json = jsonDeepCopy(pOld->json); + /* we do not copy all other cache properties, as we do not even know * if they are needed once again. So we let them re-create if needed. */ @@ -3854,7 +3858,7 @@ finalize_it: RETiRet; } -static inline struct json_object * +static struct json_object * jsonDeepCopy(struct json_object *src) { struct json_object *dst = NULL, *json; |