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 /grammar/rainerscript.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 'grammar/rainerscript.c')
-rw-r--r-- | grammar/rainerscript.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/grammar/rainerscript.c b/grammar/rainerscript.c index f7f09697..6b21bc9a 100644 --- a/grammar/rainerscript.c +++ b/grammar/rainerscript.c @@ -802,6 +802,30 @@ nvlstGetParams(struct nvlst *lst, struct cnfparamblk *params, } +/* check if at least one cnfparamval is actually set + * returns 1 if so, 0 otherwise + */ +int +cnfparamvalsIsSet(struct cnfparamblk *params, struct cnfparamvals *vals) +{ + int i; + + if(vals == NULL) + return 0; + if(params->version != CNFPARAMBLK_VERSION) { + dbgprintf("nvlstGetParams: invalid param block version " + "%d, expected %d\n", + params->version, CNFPARAMBLK_VERSION); + return 0; + } + for(i = 0 ; i < params->nParams ; ++i) { + if(vals[i].bUsed) + return 1; + } + return 0; +} + + void cnfparamsPrint(struct cnfparamblk *params, struct cnfparamvals *vals) { |