summaryrefslogtreecommitdiffstats
path: root/runtime/msg.h
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2013-09-25 16:48:21 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2013-09-25 16:48:21 +0200
commitc787fb9ce9064cf2047287c2610a0090d5f692c6 (patch)
treebcf35e000956a644cc205f32f5784f3ecceeade4 /runtime/msg.h
parent483e1307600d6d09926f6702ddc9ccd0c6a86e5d (diff)
downloadrsyslog-c787fb9ce9064cf2047287c2610a0090d5f692c6.tar.gz
rsyslog-c787fb9ce9064cf2047287c2610a0090d5f692c6.tar.bz2
rsyslog-c787fb9ce9064cf2047287c2610a0090d5f692c6.zip
simplify STRUCTURED-DATA representation in msg object
Diffstat (limited to 'runtime/msg.h')
-rw-r--r--runtime/msg.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/runtime/msg.h b/runtime/msg.h
index d912a25d..f4c54731 100644
--- a/runtime/msg.h
+++ b/runtime/msg.h
@@ -30,6 +30,7 @@
#include <pthread.h>
#include <libestr.h>
+#include <stdint.h>
#include <json.h>
#include "obj.h"
#include "syslogd-types.h"
@@ -86,7 +87,8 @@ struct msg {
char *pszTIMESTAMP3339; /* TIMESTAMP as RFC3339 formatted string (32 charcters at most) */
char *pszTIMESTAMP_MySQL;/* TIMESTAMP as MySQL formatted string (always 14 charcters) */
char *pszTIMESTAMP_PgSQL;/* TIMESTAMP as PgSQL formatted string (always 21 characters) */
- cstr_t *pCSStrucData; /* STRUCTURED-DATA */
+ uchar *pszStrucData; /* STRUCTURED-DATA */
+ uint16_t lenStrucData; /* (cached) length of STRUCTURED-DATA */
cstr_t *pCSAPPNAME; /* APP-NAME */
cstr_t *pCSPROCID; /* PROCID */
cstr_t *pCSMSGID; /* MSGID */
@@ -229,7 +231,7 @@ msgGetProtocolVersion(msg_t *pM)
static inline sbool
MsgHasStructuredData(msg_t *pM)
{
- return (pM->pCSStrucData == NULL) ? 0 : 1;
+ return (pM->pszStrucData == NULL) ? 0 : 1;
}
/* ------------------------------ some inline functions ------------------------------ */