diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2010-06-24 12:13:48 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2010-06-24 12:13:48 +0200 |
commit | 31fae7b93d7aa94b7b3fcbfdf101328230ea6302 (patch) | |
tree | e9efcb9247dcd1142831c14e81652e67f03bd043 /runtime/batch.h | |
parent | f48128f34a17aae7e7b9405fe32b396db45443ca (diff) | |
download | rsyslog-31fae7b93d7aa94b7b3fcbfdf101328230ea6302.tar.gz rsyslog-31fae7b93d7aa94b7b3fcbfdf101328230ea6302.tar.bz2 rsyslog-31fae7b93d7aa94b7b3fcbfdf101328230ea6302.zip |
bugfix: "$ActionExecOnlyWhenPreviousIsSuspended on" was broken
Note that, as it looks, the directive was already broken in previous v5 versions.
So while I solved what looked like a (intentional) regression from the
performance tuning, I actually solved a previous regression as well ;)
I have also added new test cases to the testbench in order to capture such
problems in the future. This version does now look pretty good in shape.
Diffstat (limited to 'runtime/batch.h')
-rw-r--r-- | runtime/batch.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/runtime/batch.h b/runtime/batch.h index 80621631..b555fc2a 100644 --- a/runtime/batch.h +++ b/runtime/batch.h @@ -174,4 +174,23 @@ batchInit(batch_t *pBatch, int maxElem) { finalize_it: RETiRet; } + + +/* primarily a helper for debug purposes, get human-readble name of state */ +static inline char * +batchState2String(batch_state_t state) { + switch(state) { + case BATCH_STATE_RDY: + return "BATCH_STATE_RDY"; + case BATCH_STATE_BAD: + return "BATCH_STATE_BAD"; + case BATCH_STATE_SUB: + return "BATCH_STATE_SUB"; + case BATCH_STATE_COMM: + return "BATCH_STATE_COMM"; + case BATCH_STATE_DISC: + return "BATCH_STATE_DISC"; + } + return "ERROR, batch state not known!"; +} #endif /* #ifndef BATCH_H_INCLUDED */ |