summaryrefslogtreecommitdiffstats
path: root/runtime/msg.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2013-08-30 18:29:46 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2013-08-30 18:29:46 +0200
commitd11e8221a8b9592bca7f219cc3d3cf3359273ba1 (patch)
tree2a0de52ef2086b24d562999b1ff23b3a3151dea9 /runtime/msg.c
parenta5abbddb5c04b95a6e51a93f71516cee280c54c4 (diff)
downloadrsyslog-d11e8221a8b9592bca7f219cc3d3cf3359273ba1.tar.gz
rsyslog-d11e8221a8b9592bca7f219cc3d3cf3359273ba1.tar.bz2
rsyslog-d11e8221a8b9592bca7f219cc3d3cf3359273ba1.zip
milestone: defaultTZ can be set in msg obj (via imtcp)
... but parser does not yet use it.
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 67d957d1..426c80df 100644
--- a/runtime/msg.c
+++ b/runtime/msg.c
@@ -708,6 +708,7 @@ static inline rsRetVal msgBaseConstruct(msg_t **ppThis)
pM->rcvFrom.pRcvFrom = NULL;
pM->pRuleset = NULL;
pM->json = NULL;
+ pM->dfltTZ[0] = '\0';
memset(&pM->tRcvdAt, 0, sizeof(pM->tRcvdAt));
memset(&pM->tTIMESTAMP, 0, sizeof(pM->tTIMESTAMP));
pM->TAG.pszTAG = NULL;
@@ -2215,6 +2216,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