summaryrefslogtreecommitdiffstats
path: root/runtime/msg.h
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2013-10-22 17:55:35 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2013-10-22 17:55:35 +0200
commit7d39740b3d88dbd0432806e5f8da32c49cdb69f1 (patch)
tree452e5e27c13b49c5b1910f70a283e3a533ee1283 /runtime/msg.h
parente4e19176298d6ac76c463565fa192c2349731156 (diff)
downloadrsyslog-7d39740b3d88dbd0432806e5f8da32c49cdb69f1.tar.gz
rsyslog-7d39740b3d88dbd0432806e5f8da32c49cdb69f1.tar.bz2
rsyslog-7d39740b3d88dbd0432806e5f8da32c49cdb69f1.zip
refactor: use common code for message property description processing
in all cases except script var access -- this comes next...
Diffstat (limited to 'runtime/msg.h')
-rw-r--r--runtime/msg.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/runtime/msg.h b/runtime/msg.h
index 8c5e7bfe..4dcc0579 100644
--- a/runtime/msg.h
+++ b/runtime/msg.h
@@ -3,7 +3,7 @@
*
* File begun on 2007-07-13 by RGerhards (extracted from syslogd.c)
*
- * Copyright 2007-2012 Rainer Gerhards and Adiscon GmbH.
+ * Copyright 2007-2013 Rainer Gerhards and Adiscon GmbH.
*
* This file is part of the rsyslog runtime library.
*
@@ -183,8 +183,7 @@ void MsgSetMSGoffs(msg_t *pMsg, short offs);
void MsgSetRawMsgWOSize(msg_t *pMsg, char* pszRawMsg);
void MsgSetRawMsg(msg_t *pMsg, char* pszRawMsg, size_t lenMsg);
rsRetVal MsgReplaceMSG(msg_t *pThis, uchar* pszMSG, int lenMSG);
-uchar *MsgGetProp(msg_t *pMsg, struct templateEntry *pTpe,
- propid_t propid, uchar *propName, int propNameLen,
+uchar *MsgGetProp(msg_t *pMsg, struct templateEntry *pTpe, msgPropDescr_t *pProp,
rs_size_t *pPropLen, unsigned short *pbMustBeFreed, struct syslogTime *ttNow);
rsRetVal msgGetMsgVar(msg_t *pThis, cstr_t *pstrPropName, var_t **ppVar);
es_str_t* msgGetMsgVarNew(msg_t *pThis, uchar *name);
@@ -223,6 +222,9 @@ rsRetVal msgSetJSONFromVar(msg_t *pMsg, uchar *varname, struct var *var);
rsRetVal msgDelJSON(msg_t *pMsg, uchar *varname);
rsRetVal jsonFind(struct json_object *jroot, uchar *propName, int propNameLen, struct json_object **jsonres);
+rsRetVal msgPropDescrFill(msgPropDescr_t *pProp, uchar *name, int nameLen);
+void msgPropDescrDestruct(msgPropDescr_t *pProp);
+
static inline rsRetVal
msgUnsetJSON(msg_t *pMsg, uchar *varname) {
return msgDelJSON(pMsg, varname+1);