summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2013-07-06 00:13:29 +0200
committerMichael Biebl <biebl@debian.org>2013-07-06 00:13:29 +0200
commitf5638ea86a8626b7e0e471d720359cb4e3d8cb1c (patch)
treefd1fffc1917bd10431c829e0a439c2a522ffda6d /plugins
parentc62e2e3b0f562a4ce54f7edcbb76400d90118717 (diff)
downloadrsyslog-upstream/7.4.2.tar.gz
Imported Upstream version 7.4.2upstream/7.4.2
Diffstat (limited to 'plugins')
-rw-r--r--plugins/imfile/imfile.c4
-rw-r--r--plugins/impstats/impstats.c4
-rw-r--r--plugins/imptcp/imptcp.c5
-rw-r--r--plugins/imtcp/imtcp.c4
-rw-r--r--plugins/imudp/imudp.c8
-rw-r--r--plugins/omelasticsearch/omelasticsearch.c1
-rw-r--r--plugins/omrelp/omrelp.c5
7 files changed, 14 insertions, 17 deletions
diff --git a/plugins/imfile/imfile.c b/plugins/imfile/imfile.c
index 349acea..2e80ffc 100644
--- a/plugins/imfile/imfile.c
+++ b/plugins/imfile/imfile.c
@@ -449,8 +449,6 @@ CODESTARTnewInpInst
pvals = nvlstGetParams(lst, &inppblk, NULL);
if(pvals == NULL) {
- errmsg.LogError(0, RS_RET_MISSING_CNFPARAMS,
- "imfile: required parameter are missing\n");
ABORT_FINALIZE(RS_RET_MISSING_CNFPARAMS);
}
@@ -596,7 +594,7 @@ CODESTARTactivateCnf
for(inst = runModConf->root ; inst != NULL ; inst = inst->next) {
addListner(inst);
}
- /* if we could not set up any listners, there is no point in running... */
+ /* if we could not set up any listeners, there is no point in running... */
if(iFilPtr == 0) {
errmsg.LogError(0, NO_ERRCODE, "imfile: no file monitors could be started, "
"input not activated.\n");
diff --git a/plugins/impstats/impstats.c b/plugins/impstats/impstats.c
index cdd205f..79749e2 100644
--- a/plugins/impstats/impstats.c
+++ b/plugins/impstats/impstats.c
@@ -29,6 +29,10 @@
#include <pthread.h>
#include <fcntl.h>
#include <sys/uio.h>
+#if defined(__FreeBSD__)
+#include <sys/stat.h>
+#endif
+
#include "dirty.h"
#include "cfsysline.h"
#include "module-template.h"
diff --git a/plugins/imptcp/imptcp.c b/plugins/imptcp/imptcp.c
index 5c8bb67..906521d 100644
--- a/plugins/imptcp/imptcp.c
+++ b/plugins/imptcp/imptcp.c
@@ -1419,10 +1419,7 @@ BEGINnewInpInst
CODESTARTnewInpInst
DBGPRINTF("newInpInst (imptcp)\n");
- pvals = nvlstGetParams(lst, &inppblk, NULL);
- if(pvals == NULL) {
- errmsg.LogError(0, RS_RET_MISSING_CNFPARAMS,
- "imptcp: required parameter are missing\n");
+ if((pvals = nvlstGetParams(lst, &inppblk, NULL)) == NULL) {
ABORT_FINALIZE(RS_RET_MISSING_CNFPARAMS);
}
diff --git a/plugins/imtcp/imtcp.c b/plugins/imtcp/imtcp.c
index fc22d45..2d9761c 100644
--- a/plugins/imtcp/imtcp.c
+++ b/plugins/imtcp/imtcp.c
@@ -141,6 +141,7 @@ static struct cnfparamdescr modpdescr[] = {
{ "addtlframedelimiter", eCmdHdlrPositiveInt, 0 },
{ "maxsessions", eCmdHdlrPositiveInt, 0 },
{ "maxlistners", eCmdHdlrPositiveInt, 0 },
+ { "maxlisteners", eCmdHdlrPositiveInt, 0 },
{ "streamdriver.mode", eCmdHdlrPositiveInt, 0 },
{ "streamdriver.authmode", eCmdHdlrString, 0 },
{ "permittedpeer", eCmdHdlrArray, 0 },
@@ -453,7 +454,8 @@ CODESTARTsetModCnf
loadModConf->iAddtlFrameDelim = (int) pvals[i].val.d.n;
} else if(!strcmp(modpblk.descr[i].name, "maxsessions")) {
loadModConf->iTCPSessMax = (int) pvals[i].val.d.n;
- } else if(!strcmp(modpblk.descr[i].name, "maxlistners")) {
+ } else if(!strcmp(modpblk.descr[i].name, "maxlisteners") ||
+ !strcmp(modpblk.descr[i].name, "maxlistners")) { /* keep old name for a while */
loadModConf->iTCPLstnMax = (int) pvals[i].val.d.n;
} else if(!strcmp(modpblk.descr[i].name, "keepalive")) {
loadModConf->bKeepAlive = (int) pvals[i].val.d.n;
diff --git a/plugins/imudp/imudp.c b/plugins/imudp/imudp.c
index 7bf1473..312645b 100644
--- a/plugins/imudp/imudp.c
+++ b/plugins/imudp/imudp.c
@@ -746,10 +746,7 @@ BEGINnewInpInst
CODESTARTnewInpInst
DBGPRINTF("newInpInst (imudp)\n");
- pvals = nvlstGetParams(lst, &inppblk, NULL);
- if(pvals == NULL) {
- errmsg.LogError(0, RS_RET_MISSING_CNFPARAMS,
- "imudp: required parameter are missing\n");
+ if((pvals = nvlstGetParams(lst, &inppblk, NULL)) == NULL) {
ABORT_FINALIZE(RS_RET_MISSING_CNFPARAMS);
}
if(Debug) {
@@ -872,7 +869,7 @@ CODESTARTactivateCnfPrePrivDrop
for(inst = runModConf->root ; inst != NULL ; inst = inst->next) {
addListner(inst);
}
- /* if we could not set up any listners, there is no point in running... */
+ /* if we could not set up any listeners, there is no point in running... */
if(lcnfRoot == NULL) {
errmsg.LogError(0, NO_ERRCODE, "imudp: no listeners could be started, "
"input not activated.\n");
@@ -898,7 +895,6 @@ CODESTARTfreeCnf
for(inst = pModConf->root ; inst != NULL ; ) {
free(inst->pszBindPort);
free(inst->pszBindAddr);
- free(inst->pBindRuleset);
free(inst->inputname);
del = inst;
inst = inst->next;
diff --git a/plugins/omelasticsearch/omelasticsearch.c b/plugins/omelasticsearch/omelasticsearch.c
index 33e58c1..57abefd 100644
--- a/plugins/omelasticsearch/omelasticsearch.c
+++ b/plugins/omelasticsearch/omelasticsearch.c
@@ -483,7 +483,6 @@ writeDataError(instanceData *pData, cJSON **pReplyRoot, uchar *reqmsg)
DBGPRINTF("omelasticsearch: error %d writing error file, write returns %lld\n",
errno, (long long) wrRet);
}
- free(rendered);
cJSON_Delete(errRoot);
*pReplyRoot = NULL; /* tell caller not to delete once again! */
diff --git a/plugins/omrelp/omrelp.c b/plugins/omrelp/omrelp.c
index ae65f40..3e35546 100644
--- a/plugins/omrelp/omrelp.c
+++ b/plugins/omrelp/omrelp.c
@@ -79,7 +79,7 @@ static struct cnfparamdescr actpdescr[] = {
{ "target", eCmdHdlrGetWord, 1 },
{ "port", eCmdHdlrGetWord, 0 },
{ "timeout", eCmdHdlrInt, 0 },
- { "template", eCmdHdlrGetWord, 1 }
+ { "template", eCmdHdlrGetWord, 0 }
};
static struct cnfparamblk actpblk =
{ CNFPARAMBLK_VERSION,
@@ -179,7 +179,8 @@ CODESTARTnewActInst
CHKiRet(doCreateRelpClient(pData));
CODE_STD_FINALIZERnewActInst
- cnfparamvalsDestruct(pvals, &actpblk);
+ if(pvals != NULL)
+ cnfparamvalsDestruct(pvals, &actpblk);
ENDnewActInst
BEGINisCompatibleWithFeature