projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
126056a
)
Move misplaced yajl_gen_map_close
author
Andrew Bays
<andrew.bays@gmail.com>
Wed, 28 Feb 2018 19:48:23 +0000
(14:48 -0500)
committer
GitHub
<noreply@github.com>
Wed, 28 Feb 2018 19:48:23 +0000
(14:48 -0500)
src/sysevent.c
patch
|
blob
|
history
diff --git
a/src/sysevent.c
b/src/sysevent.c
index
49efe75
..
538618c
100644
(file)
--- a/
src/sysevent.c
+++ b/
src/sysevent.c
@@
-344,9
+344,6
@@
static int gen_message_payload(const char *msg, char *sev, int sev_num,
yajl_gen_status_ok)
goto err;
- if (yajl_gen_map_close(g) != yajl_gen_status_ok)
- goto err;
-
// syslogMsg
if (msg != NULL) {
if (yajl_gen_string(g, (u_char *)SYSEVENT_SYSLOG_MSG_FIELD,
@@
-389,6
+386,9
@@
static int gen_message_payload(const char *msg, char *sev, int sev_num,
if (yajl_gen_string(g, (u_char *)SYSEVENT_SYSLOG_TAG_VALUE,
strlen(SYSEVENT_SYSLOG_TAG_VALUE)) != yajl_gen_status_ok)
goto err;
+
+ if (yajl_gen_map_close(g) != yajl_gen_status_ok)
+ goto err;
// *** END syslog fields ***