diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2012-09-24 18:59:26 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2012-09-24 18:59:26 +0200 |
commit | 8d99cfe38509aeadf169ba63c0d6c841eb2ecbe3 (patch) | |
tree | db53e6673a2f037de931283cec633c13eab1ea33 /action.c | |
parent | be26632b1e269652992ae6f336c5dd7e2dbec7ab (diff) | |
download | rsyslog-8d99cfe38509aeadf169ba63c0d6c841eb2ecbe3.tar.gz rsyslog-8d99cfe38509aeadf169ba63c0d6c841eb2ecbe3.tar.xz rsyslog-8d99cfe38509aeadf169ba63c0d6c841eb2ecbe3.zip |
Clean up implementation of omdiscard-->STOP optimization
Diffstat (limited to 'action.c')
-rw-r--r-- | action.c | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -289,6 +289,11 @@ rsRetVal actionDestruct(action_t *pThis) DEFiRet; ASSERT(pThis != NULL); + if(!strcmp((char*)modGetName(pThis->pMod), "builtin:omdiscard")) { + /* discard actions will be optimized out */ + FINALIZE; + } + if(pThis->pQueue != NULL) { qqueueDestruct(&pThis->pQueue); } @@ -310,8 +315,8 @@ rsRetVal actionDestruct(action_t *pThis) d_free(pThis->pszName); d_free(pThis->ppTpl); +finalize_it: d_free(pThis); - RETiRet; } @@ -362,6 +367,10 @@ actionConstructFinalize(action_t *pThis, struct cnfparamvals *queueParams) ASSERT(pThis != NULL); + if(!strcmp((char*)modGetName(pThis->pMod), "builtin:omdiscard")) { + /* discard actions will be optimized out */ + FINALIZE; + } /* generate a friendly name for us action stats */ if(pThis->pszName == NULL) { snprintf((char*) pszAName, sizeof(pszAName)/sizeof(uchar), "action %d", iActionNbr); |