summaryrefslogtreecommitdiffstats
path: root/runtime
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2010-06-01 13:53:12 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2010-06-01 13:53:12 +0200
commit59227a861821b2e0e37357c0695f6b3d9f11dd9d (patch)
tree6211c46fb45d462404bfeaa560f98ec2ae37b52a /runtime
parent4b906fe9cf75948ebb600a8734ad440edc741f38 (diff)
downloadrsyslog-59227a861821b2e0e37357c0695f6b3d9f11dd9d.tar.gz
rsyslog-59227a861821b2e0e37357c0695f6b3d9f11dd9d.tar.xz
rsyslog-59227a861821b2e0e37357c0695f6b3d9f11dd9d.zip
experimental commit: facility to generate template via C function
This was a test done to try to generate templates with C code, via a new (potentially to-be-implemented) class of template modules. We have a rough POC inside this code, and it showed around 5% or better speedup. So it semms worth continuing in this direction. Note that this experimental commit works correct, but does any template in the form of $template tpl,=somewhat will lead to fixed template expansion based on the default file format.
Diffstat (limited to 'runtime')
-rw-r--r--runtime/msg.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/runtime/msg.c b/runtime/msg.c
index 2c8c36a3..97d65e00 100644
--- a/runtime/msg.c
+++ b/runtime/msg.c
@@ -1272,7 +1272,8 @@ static inline char *getPRI(msg_t *pM)
}
-static inline char *getTimeReported(msg_t *pM, enum tplFormatTypes eFmt)
+//static inline char *getTimeReported(msg_t *pM, enum tplFormatTypes eFmt)
+char *getTimeReported(msg_t *pM, enum tplFormatTypes eFmt)
{
BEGINfunc
if(pM == NULL)
@@ -1288,6 +1289,7 @@ static inline char *getTimeReported(msg_t *pM, enum tplFormatTypes eFmt)
datetime.formatTimestamp3164(&pM->tTIMESTAMP, pM->pszTIMESTAMP3164,
(eFmt == tplFmtRFC3164BuggyDate));
}
+dbgprintf("getTimeReported will return buffer %p\n", pM->pszTIMESTAMP3164);
MsgUnlock(pM);
return(pM->pszTIMESTAMP3164);
case tplFmtMySQLDate:
@@ -1691,7 +1693,8 @@ static inline void tryEmulateTAG(msg_t *pM, sbool bLockMutex)
}
-static inline void
+//static inline void
+void
getTAG(msg_t *pM, uchar **ppBuf, int *piLen)
{
if(pM == NULL) {