summaryrefslogtreecommitdiffstats
path: root/runtime/msg.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2013-09-02 12:34:46 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2013-09-02 12:34:46 +0200
commit743a2ddf9f5bd4c9eca521d45c184788c93b4ce8 (patch)
tree65f6a23e91005a28743ed17c5f75522b8f59695f /runtime/msg.c
parentc8ac47b5895526b524551c9810ad39f086ee76ca (diff)
parent7acbde62c53792ab9a9c1317ec197fe4446941e6 (diff)
downloadrsyslog-743a2ddf9f5bd4c9eca521d45c184788c93b4ce8.tar.gz
rsyslog-743a2ddf9f5bd4c9eca521d45c184788c93b4ce8.tar.bz2
rsyslog-743a2ddf9f5bd4c9eca521d45c184788c93b4ce8.zip
Merge branch 'c9'
Conflicts: runtime/msg.c
Diffstat (limited to 'runtime/msg.c')
-rw-r--r--runtime/msg.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/runtime/msg.c b/runtime/msg.c
index c7cd9406..14f03bbb 100644
--- a/runtime/msg.c
+++ b/runtime/msg.c
@@ -725,6 +725,7 @@ static inline rsRetVal msgBaseConstruct(msg_t **ppThis)
pM->pRuleset = NULL;
pM->json = NULL;
pM->localvars = NULL;
+ pM->dfltTZ[0] = '\0';
memset(&pM->tRcvdAt, 0, sizeof(pM->tRcvdAt));
memset(&pM->tTIMESTAMP, 0, sizeof(pM->tTIMESTAMP));
pM->TAG.pszTAG = NULL;
@@ -2248,6 +2249,15 @@ void MsgSetInputName(msg_t *pThis, prop_t *inputName)
pThis->pInputName = inputName;
}
+/* Set default TZ. Note that at most 7 chars are set, as we would
+ * otherwise overrun our buffer!
+ */
+void MsgSetDfltTZ(msg_t *pThis, char *tz)
+{
+ strncpy(pThis->dfltTZ, tz, 7);
+ pThis->dfltTZ[7] = '\0'; /* ensure 0-Term in case of overflow! */
+}
+
/* Set the pfrominet socket store, so that we can obtain the peer at some
* later time. Note that we do not check if pRcvFrom is already set, so this