summaryrefslogtreecommitdiffstats
path: root/runtime
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2010-06-24 14:06:55 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2010-06-24 14:06:55 +0200
commit23d6a4f3fe748a777348075924b6353f669f5b56 (patch)
tree51b89839cda56858b911d1846c8b78bc72038130 /runtime
parent0d721450eb9dca0cc5051c7ac9d2570685cce7e5 (diff)
parent6e093aa32674235c76410a10d1cc7321d3bf33bc (diff)
downloadrsyslog-23d6a4f3fe748a777348075924b6353f669f5b56.tar.gz
rsyslog-23d6a4f3fe748a777348075924b6353f669f5b56.tar.xz
rsyslog-23d6a4f3fe748a777348075924b6353f669f5b56.zip
Merge branch 'tmp' into concurrent-output
Diffstat (limited to 'runtime')
-rw-r--r--runtime/batch.h8
-rw-r--r--runtime/rsyslog.h10
2 files changed, 12 insertions, 6 deletions
diff --git a/runtime/batch.h b/runtime/batch.h
index b555fc2a..68f48d8b 100644
--- a/runtime/batch.h
+++ b/runtime/batch.h
@@ -53,11 +53,9 @@ struct batch_obj_s {
*/
sbool bFilterOK; /* work area for filter processing (per action, reused!) */
sbool bPrevWasSuspended;
- void *pActParams; /* parameters to be passed to action */
- size_t *pLenParams; /* length of the parameter in question */
- void *staticActParams[CONF_OMOD_NUMSTRINGS_BUFSIZE];
+ void *staticActParams[CONF_OMOD_NUMSTRINGS_MAXSIZE];
/* a cache to save malloc(), if not absolutely necessary */
- size_t staticLenParams[CONF_OMOD_NUMSTRINGS_BUFSIZE];
+ size_t staticLenParams[CONF_OMOD_NUMSTRINGS_MAXSIZE];
/* and the same for the message length (if used) */
/* end action work variables */
};
@@ -153,7 +151,7 @@ batchFree(batch_t *pBatch) {
int i;
int j;
for(i = 0 ; i < pBatch->maxElem ; ++i) {
- for(j = 0 ; j < CONF_OMOD_NUMSTRINGS_BUFSIZE ; ++j) {
+ for(j = 0 ; j < CONF_OMOD_NUMSTRINGS_MAXSIZE ; ++j) {
free(pBatch->pElem[i].staticActParams[j]);
}
}
diff --git a/runtime/rsyslog.h b/runtime/rsyslog.h
index 2279856e..a8b5d401 100644
--- a/runtime/rsyslog.h
+++ b/runtime/rsyslog.h
@@ -58,7 +58,15 @@
* rgerhards, 2006-11-30
*/
-#define CONF_OMOD_NUMSTRINGS_BUFSIZE 2 /* cache for pointers to output module buffer pointers */
+#define CONF_OMOD_NUMSTRINGS_MAXSIZE 2 /* cache for pointers to output module buffer pointers. All
+ * rsyslog-provided plugins do NOT need more than two buffers. If
+ * more are needed (future developments, third-parties), rsyslog
+ * must be recompiled with a larger parameter. Hardcoding this
+ * saves us some overhead, both in runtime in code complexity. As
+ * it is doubtful if ever more than 2 parameters are needed, the
+ * approach taken here is considered appropriate.
+ * rgerhards, 2010-06-24
+ */
/* ############################################################# *
* # End Config Settings # *