summaryrefslogtreecommitdiffstats
path: root/syslogd.c
diff options
context:
space:
mode:
Diffstat (limited to 'syslogd.c')
-rw-r--r--syslogd.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/syslogd.c b/syslogd.c
index fd2bcb8e..a2b78a54 100644
--- a/syslogd.c
+++ b/syslogd.c
@@ -3340,6 +3340,7 @@ static char *MsgGetProp(struct msg *pMsg, struct templateEntry *pTpe,
/* OK, let's do the escaping... */
char *pBufStart;
char szCCEsc[8]; /* buffer for escape sequence */
+ int i;
iLen += iNumCC * 4;
pBufStart = pBuf = malloc((iLen + 1) * sizeof(char));
@@ -3351,7 +3352,9 @@ static char *MsgGetProp(struct msg *pMsg, struct templateEntry *pTpe,
}
while(*pRes) {
if(iscntrl(*pRes)) {
- /* TODO: fill escape coding */
+ snprintf(szCCEsc, sizeof(szCCEsc), "#%3.3d", *pRes);
+ for(i = 0 ; i < 4 ; ++i)
+ *pBuf++ = szCCEsc[i];
} else {
*pBuf++ = *pRes;
}