From 59227a861821b2e0e37357c0695f6b3d9f11dd9d Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Tue, 1 Jun 2010 13:53:12 +0200 Subject: 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. --- runtime/msg.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'runtime') 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) { -- cgit