rsyslog/rsyslog-8.8.0-immutable-json-props.patch
Tomas Heinrich 4c244e0a98 Rebase to 8.8.0
- resolves: rhbz#1069690
- drop patches merged upstream
- version the dependency on liblognorm-devel
- enable mmcount, mmexternal modules,
  remove imdiag, omruleset and pmrfc3164sd modules
  resolves: rhbz#1156359
- add dos2unix to build requirements
- make the build process more verbose
- in accordance with an upstream change, the rsyslog service is now
  restarted automatically upon failure
- adjust the default configuration file for the removal of
  /etc/rsyslog.d/listen.conf by the systemd package
  resolves: rhbz#1116864
- disable the imklog module by default; kernel messages are read from journald
  resolves: rhbz#1083564
- if there is no saved position in the journal, log only messages that are
  received after rsyslog is started; this is a safety measure to prevent
  excessive resource utilization
- use documentation from the standalone rsyslog-docs project
- move documentation from all subpackages into a single directory
- mark the recover_qi.pl script as documentation
2015-03-19 18:48:00 +01:00

33 lines
964 B
Diff

diff -up ./runtime/msg.c.orig ./runtime/msg.c
--- a/runtime/msg.c 2015-01-15 19:30:02.351699869 +0100
+++ b/runtime/msg.c 2015-01-15 19:35:58.667176642 +0100
@@ -4267,22 +4267,19 @@ jsonPathFindParent(struct json_object *j
RETiRet;
}
+/* In case of duplicate names, the original value is kept. */
static rsRetVal
jsonMerge(struct json_object *existing, struct json_object *json)
{
- /* TODO: check & handle duplicate names */
DEFiRet;
struct json_object_iter it;
- json_object_object_foreachC(json, it) {
- json_object_object_add(existing, it.key,
- json_object_get(it.val));
+ json_object_object_foreachC(existing, it) {
+ json_object_object_add(json, it.key, json_object_get(it.val));
}
- /* note: json-c does ref counting. We added all descandants refcounts
- * in the loop above. So when we now free(_put) the root object, only
- * root gets freed().
- */
- json_object_put(json);
+
+ iRet = jsonMerge(existing, json);
+
RETiRet;
}