summaryrefslogtreecommitdiffstats
path: root/runtime/module-template.h
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2009-07-20 18:36:30 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2009-07-20 18:36:30 +0200
commit7d92de155c832e0a4af2cb3b65f7cef909b19f8d (patch)
tree9618456aad0bc3ed955a851174d29466c40a46a7 /runtime/module-template.h
parent093179e9d366de9319b7ef11ebc57e4e8e789817 (diff)
downloadrsyslog-7d92de155c832e0a4af2cb3b65f7cef909b19f8d.tar.gz
rsyslog-7d92de155c832e0a4af2cb3b65f7cef909b19f8d.tar.xz
rsyslog-7d92de155c832e0a4af2cb3b65f7cef909b19f8d.zip
internal: added ability to terminate input modules not via pthread_cancel...
... but an alternate approach via pthread_kill. This is somewhat safer as we do not need to think about the cancel-safeness of all libraries we use. However, not all inputs can easily supported, so this now is a feature that can be requested by the input module (the most important ones request it).
Diffstat (limited to 'runtime/module-template.h')
-rw-r--r--runtime/module-template.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/runtime/module-template.h b/runtime/module-template.h
index 3e963199..d49da2c9 100644
--- a/runtime/module-template.h
+++ b/runtime/module-template.h
@@ -368,6 +368,17 @@ static rsRetVal queryEtryPt(uchar *name, rsRetVal (**pEtryPoint)())\
*pEtryPoint = endTransaction;\
}
+
+/* the following definition is a queryEtryPt block that must be added
+ * if a non-output module supports "isCompatibleWithFeature".
+ * rgerhards, 2009-07-20
+ */
+#define CODEqueryEtryPt_IsCompatibleWithFeature_IF_OMOD_QUERIES \
+ else if(!strcmp((char*) name, "isCompatibleWithFeature")) {\
+ *pEtryPoint = isCompatibleWithFeature;\
+ }
+
+
/* the following definition is the standard block for queryEtryPt for INPUT
* modules. This can be used if no specific handling (e.g. to cover version
* differences) is needed.