diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2012-12-06 17:27:37 +0100 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2012-12-06 17:27:37 +0100 |
commit | 42d1d27a019f25bf39c1f424cd9fb23560728c58 (patch) | |
tree | ebd6f6afb5e41bd8570ca5ca398deef518f60c8c /runtime/rsconf.c | |
parent | 7df68798be96d38fcb17143daa2c3e2b093a8ba5 (diff) | |
parent | 27e0f06b17b59e5de7db94ec1d0e74369536373a (diff) | |
download | rsyslog-42d1d27a019f25bf39c1f424cd9fb23560728c58.tar.gz rsyslog-42d1d27a019f25bf39c1f424cd9fb23560728c58.tar.bz2 rsyslog-42d1d27a019f25bf39c1f424cd9fb23560728c58.zip |
Merge branch 'v7-stable-newmsglock' into master-newmsglock
Conflicts:
runtime/msg.c
runtime/queue.c
tools/syslogd.c
Diffstat (limited to 'runtime/rsconf.c')
-rw-r--r-- | runtime/rsconf.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/runtime/rsconf.c b/runtime/rsconf.c index d15d37d7..d8b81f1b 100644 --- a/runtime/rsconf.c +++ b/runtime/rsconf.c @@ -292,6 +292,9 @@ getNOW(eNOWType eNow, es_str_t **estr) case NOW_MINUTE: len = snprintf((char*) szBuf, sizeof(szBuf)/sizeof(uchar), "%2.2d", t.minute); break; + default: + len = snprintf((char*) szBuf, sizeof(szBuf)/sizeof(uchar), "*invld eNow*"); + break; } /* now create a string object out of it and hand that over to the var */ @@ -477,6 +480,9 @@ cnfGetVar(char *name, void *usrptr) estr = msgGetCEEVarNew((msg_t*) usrptr, name+2); else estr = msgGetMsgVarNew((msg_t*) usrptr, (uchar*)name+1); + } else { /* if this happens, we have a program logic error */ + estr = es_newStrFromCStr("err: var must start with $", + strlen("err: var must start with $")); } if(Debug) { char *s; @@ -753,7 +759,7 @@ activateMainQueue() { DEFiRet; /* create message queue */ - CHKiRet_Hdlr(createMainQueue(&pMsgQueue, UCHAR_CONSTANT("main Q"))) { + CHKiRet_Hdlr(createMainQueue(&pMsgQueue, UCHAR_CONSTANT("main Q"), NULL)) { /* no queue is fatal, we need to give up in that case... */ fprintf(stderr, "fatal error %d: could not create message queue - rsyslogd can not run!\n", iRet); FINALIZE; |