summaryrefslogtreecommitdiffstats
path: root/msg.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2008-03-14 11:04:36 +0000
committerRainer Gerhards <rgerhards@adiscon.com>2008-03-14 11:04:36 +0000
commitfdfcb2a8f953cc91abbe628366e3f5474a101670 (patch)
tree9dae7bb09bd99a7f98cc9edb609c48ce09b07013 /msg.c
parentde0665a4755140715ad9d95098f6b3a7ff713bd2 (diff)
downloadrsyslog-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.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/msg.c b/msg.c
index f99fd853..d4291a66 100644
--- a/msg.c
+++ b/msg.c
@@ -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!
*/