diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2008-03-14 11:04:36 +0000 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2008-03-14 11:04:36 +0000 |
commit | fdfcb2a8f953cc91abbe628366e3f5474a101670 (patch) | |
tree | 9dae7bb09bd99a7f98cc9edb609c48ce09b07013 /msg.c | |
parent | de0665a4755140715ad9d95098f6b3a7ff713bd2 (diff) | |
download | rsyslog-fdfcb2a8f953cc91abbe628366e3f5474a101670.tar.gz rsyslog-fdfcb2a8f953cc91abbe628366e3f5474a101670.tar.xz rsyslog-fdfcb2a8f953cc91abbe628366e3f5474a101670.zip |
added advanced flow control for congestion cases (mode depending on message
source and its capablity to be delayed without bad side effects)
Diffstat (limited to 'msg.c')
-rw-r--r-- | msg.c | 19 |
1 files changed, 19 insertions, 0 deletions
@@ -904,6 +904,25 @@ char *getFacilityStr(msg_t *pM) } +/* set flow control state (if not called, the default - NO_DELAY - is used) + * This needs no locking because it is only done while the object is + * not fully constructed (which also means you must not call this + * method after the msg has been handed over to a queue). + * rgerhards, 2008-03-14 + */ +rsRetVal +MsgSetFlowControlType(msg_t *pMsg, flowControl_t eFlowCtl) +{ + DEFiRet; + assert(pMsg != NULL); + assert(eFlowCtl == eFLOWCTL_NO_DELAY || eFlowCtl == eFLOWCTL_LIGHT_DELAY || eFlowCtl == eFLOWCTL_FULL_DELAY); + + pMsg->flowCtlType = eFlowCtl; + + RETiRet; +} + + /* rgerhards 2004-11-24: set APP-NAME in msg object * TODO: revisit msg locking code! */ |