summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--configure.ac2
-rw-r--r--plugins/imrelp/imrelp.c8
-rw-r--r--plugins/omrelp/omrelp.c9
4 files changed, 22 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 76253d51..091e735b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
---------------------------------------------------------------------------
Version 7.5.3 [devel] 2013-07-??
+- librelp 1.2.0 is now required
+- make use of new librelp generic error reporting facility
+ This leads to more error messages being passed to the user and
+ thus simplified troubleshooting.
- bugfix: very small memory leak in imrelp
more or less cosmetic, a single memory block was not freed, but this
only happens immediately before termination (when the OS automatically
diff --git a/configure.ac b/configure.ac
index be13dac5..f5060f73 100644
--- a/configure.ac
+++ b/configure.ac
@@ -999,7 +999,7 @@ AC_ARG_ENABLE(relp,
[enable_relp=no]
)
if test "x$enable_relp" = "xyes"; then
- PKG_CHECK_MODULES(RELP, relp >= 1.1.4)
+ PKG_CHECK_MODULES(RELP, relp >= 1.2.0)
fi
AM_CONDITIONAL(ENABLE_RELP, test x$enable_relp = xyes)
diff --git a/plugins/imrelp/imrelp.c b/plugins/imrelp/imrelp.c
index 41d96fe1..d04e41e1 100644
--- a/plugins/imrelp/imrelp.c
+++ b/plugins/imrelp/imrelp.c
@@ -157,6 +157,13 @@ onErr(void *pUsr, char *objinfo, char* errmesg, __attribute__((unused)) relpRetV
}
static void
+onGenericErr(char *objinfo, char* errmesg, __attribute__((unused)) relpRetVal errcode)
+{
+ errmsg.LogError(0, RS_RET_RELP_ERR, "imrelp: librelp error '%s', object "
+ " '%s' - input may not work as intended", errmesg, objinfo);
+}
+
+static void
onAuthErr(void *pUsr, char *authinfo, char* errmesg, __attribute__((unused)) relpRetVal errcode)
{
instanceConf_t *inst = (instanceConf_t*) pUsr;
@@ -288,6 +295,7 @@ addListner(modConfData_t __attribute__((unused)) *modConf, instanceConf_t *inst)
CHKiRet(relpEngineSetEnableCmd(pRelpEngine, (uchar*) "syslog", eRelpCmdState_Required));
CHKiRet(relpEngineSetSyslogRcv2(pRelpEngine, onSyslogRcv));
CHKiRet(relpEngineSetOnErr(pRelpEngine, onErr));
+ CHKiRet(relpEngineSetOnGenericErr(pRelpEngine, onGenericErr));
CHKiRet(relpEngineSetOnAuthErr(pRelpEngine, onAuthErr));
if (!glbl.GetDisableDNS()) {
CHKiRet(relpEngineSetDnsLookupMode(pRelpEngine, 1));
diff --git a/plugins/omrelp/omrelp.c b/plugins/omrelp/omrelp.c
index 898bafe2..34511e46 100644
--- a/plugins/omrelp/omrelp.c
+++ b/plugins/omrelp/omrelp.c
@@ -142,6 +142,14 @@ onErr(void *pUsr, char *objinfo, char* errmesg, __attribute__((unused)) relpRetV
}
static void
+onGenericErr(char *objinfo, char* errmesg, __attribute__((unused)) relpRetVal errcode)
+{
+ errmsg.LogError(0, RS_RET_RELP_ERR, "omrelp: librelp error '%s', object "
+ "'%s' - action may not work as intended",
+ errmesg, objinfo);
+}
+
+static void
onAuthErr(void *pUsr, char *authinfo, char* errmesg, __attribute__((unused)) relpRetVal errcode)
{
instanceData *pData = (instanceData*) pUsr;
@@ -554,6 +562,7 @@ CODEmodInit_QueryRegCFSLineHdlr
CHKiRet(relpEngineConstruct(&pRelpEngine));
CHKiRet(relpEngineSetDbgprint(pRelpEngine, dbgprintf));
CHKiRet(relpEngineSetOnAuthErr(pRelpEngine, onAuthErr));
+ CHKiRet(relpEngineSetOnGenericErr(pRelpEngine, onGenericErr));
CHKiRet(relpEngineSetOnErr(pRelpEngine, onErr));
CHKiRet(relpEngineSetEnableCmd(pRelpEngine, (uchar*) "syslog", eRelpCmdState_Required));