summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog2
-rw-r--r--module-template.h24
-rw-r--r--modules.c1
-rw-r--r--modules.h4
-rw-r--r--omdiscard.c5
-rw-r--r--omfile.c5
-rw-r--r--omfwd.c6
-rw-r--r--omshell.c5
-rw-r--r--omusrmsg.c5
-rw-r--r--plugins/omgssapi/omgssapi.c6
-rw-r--r--plugins/omlibdbi/omlibdbi.c5
-rw-r--r--plugins/ommysql/ommysql.c5
-rw-r--r--plugins/ompgsql/ompgsql.c5
-rw-r--r--plugins/omrelp/omrelp.c6
-rw-r--r--plugins/omsnmp/omsnmp.c4
-rw-r--r--plugins/omtesting/omtesting.c5
-rw-r--r--syslogd.c43
17 files changed, 4 insertions, 132 deletions
diff --git a/ChangeLog b/ChangeLog
index 191915a5..5e03eac3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -10,6 +10,8 @@ Version 3.12.4 (rgerhards), 2008-03-??
- bugfix: some slightly invalid memory accesses
- changed queue's discard severities default value to 8 (do not discard)
to prevent unintentional message loss
+- removed a now-longer needed callback from the output module
+ interface. Results in reducing code complexity.
---------------------------------------------------------------------------
Version 3.12.3 (rgerhards), 2008-03-18
- added advanced flow control for congestion cases (mode depending on message
diff --git a/module-template.h b/module-template.h
index 900ee3aa..8b6bedde 100644
--- a/module-template.h
+++ b/module-template.h
@@ -188,28 +188,6 @@ static rsRetVal dbgPrintInstInfo(void *pModData)\
}
-/* needUDPSocket()
- * Talks back to syslogd if the global UDP syslog socket is needed for
- * sending. Returns 0 if not, 1 if needed. This interface hopefully goes
- * away at some time, because it is kind of a hack. However, currently
- * there is no way around it, so we need to support it.
- * rgerhards, 2007-07-26
- */
-#define BEGINneedUDPSocket \
-static rsRetVal needUDPSocket(void *pModData)\
-{\
- rsRetVal iRet = RS_RET_FALSE;\
- instanceData *pData = NULL; \
- BEGINfunc
-
-#define CODESTARTneedUDPSocket \
- pData = (instanceData*) pModData;
-
-#define ENDneedUDPSocket \
- RETiRet;\
-}
-
-
/* parseSelectorAct()
* Extra comments:
* try to process a selector action line. Checks if the action
@@ -337,8 +315,6 @@ static rsRetVal queryEtryPt(uchar *name, rsRetVal (**pEtryPoint)())\
*pEtryPoint = parseSelectorAct;\
} else if(!strcmp((char*) name, "isCompatibleWithFeature")) {\
*pEtryPoint = isCompatibleWithFeature;\
- } else if(!strcmp((char*) name, "needUDPSocket")) {\
- *pEtryPoint = needUDPSocket;\
} else if(!strcmp((char*) name, "tryResume")) {\
*pEtryPoint = tryResume;\
}
diff --git a/modules.c b/modules.c
index 3864a054..1ec72773 100644
--- a/modules.c
+++ b/modules.c
@@ -387,7 +387,6 @@ doModInit(rsRetVal (*modInit)(int, int*, rsRetVal(**)(), rsRetVal(*)(), modInfo_
CHKiRet((*pNew->modQueryEtryPt)((uchar*)"doAction", &pNew->mod.om.doAction));
CHKiRet((*pNew->modQueryEtryPt)((uchar*)"parseSelectorAct", &pNew->mod.om.parseSelectorAct));
CHKiRet((*pNew->modQueryEtryPt)((uchar*)"isCompatibleWithFeature", &pNew->isCompatibleWithFeature));
- CHKiRet((*pNew->modQueryEtryPt)((uchar*)"needUDPSocket", &pNew->needUDPSocket));
CHKiRet((*pNew->modQueryEtryPt)((uchar*)"tryResume", &pNew->tryResume));
break;
case eMOD_LIB:
diff --git a/modules.h b/modules.h
index 7efe01f8..a8371d05 100644
--- a/modules.h
+++ b/modules.h
@@ -43,8 +43,9 @@
* and does not intend to do specific old-version emulations.
* rgerhards, 2008-03-04
* version 3 adds modInfo_t ptr to call of modInit -- rgerhards, 2008-03-10
+ * version 4 removes needUDPSocket OM callback -- rgerhards, 2008-03-22
*/
-#define CURR_MOD_IF_VERSION 3
+#define CURR_MOD_IF_VERSION 4
typedef enum eModType_ {
eMOD_IN, /* input module */
@@ -83,7 +84,6 @@ typedef struct modInfo_s {
rsRetVal (*modQueryEtryPt)(uchar *name, rsRetVal (**EtryPoint)()); /* query entry point addresses */
rsRetVal (*isCompatibleWithFeature)(syslogFeature);
rsRetVal (*freeInstance)(void*);/* called before termination or module unload */
- rsRetVal (*needUDPSocket)(void*);/* called when fd is writeable after select() */
rsRetVal (*dbgPrintInstInfo)(void*);/* called before termination or module unload */
rsRetVal (*tryResume)(void*);/* called to see if module actin can be resumed now */
rsRetVal (*modExit)(void); /* called before termination or module unload */
diff --git a/omdiscard.c b/omdiscard.c
index 51db9b8e..f13144e8 100644
--- a/omdiscard.c
+++ b/omdiscard.c
@@ -100,11 +100,6 @@ CODE_STD_FINALIZERparseSelectorAct
ENDparseSelectorAct
-BEGINneedUDPSocket
-CODESTARTneedUDPSocket
-ENDneedUDPSocket
-
-
BEGINmodExit
CODESTARTmodExit
ENDmodExit
diff --git a/omfile.c b/omfile.c
index 113dcf80..8f0ae7da 100644
--- a/omfile.c
+++ b/omfile.c
@@ -626,11 +626,6 @@ CODESTARTfreeInstance
ENDfreeInstance
-BEGINneedUDPSocket
-CODESTARTneedUDPSocket
-ENDneedUDPSocket
-
-
BEGINtryResume
CODESTARTtryResume
ENDtryResume
diff --git a/omfwd.c b/omfwd.c
index 7c68dbf2..20c1e92b 100644
--- a/omfwd.c
+++ b/omfwd.c
@@ -598,12 +598,6 @@ CODE_STD_FINALIZERparseSelectorAct
ENDparseSelectorAct
-BEGINneedUDPSocket
-CODESTARTneedUDPSocket
- iRet = RS_RET_TRUE;
-ENDneedUDPSocket
-
-
BEGINmodExit
CODESTARTmodExit
/* release what we no longer need */
diff --git a/omshell.c b/omshell.c
index 611692c3..688ee2e4 100644
--- a/omshell.c
+++ b/omshell.c
@@ -124,11 +124,6 @@ CODE_STD_FINALIZERparseSelectorAct
ENDparseSelectorAct
-BEGINneedUDPSocket
-CODESTARTneedUDPSocket
-ENDneedUDPSocket
-
-
BEGINmodExit
CODESTARTmodExit
ENDmodExit
diff --git a/omusrmsg.c b/omusrmsg.c
index dae025e1..c4008140 100644
--- a/omusrmsg.c
+++ b/omusrmsg.c
@@ -98,11 +98,6 @@ CODESTARTfreeInstance
ENDfreeInstance
-BEGINneedUDPSocket
-CODESTARTneedUDPSocket
-ENDneedUDPSocket
-
-
BEGINdbgPrintInstInfo
register int i;
CODESTARTdbgPrintInstInfo
diff --git a/plugins/omgssapi/omgssapi.c b/plugins/omgssapi/omgssapi.c
index 57f9cf32..97a7e7e7 100644
--- a/plugins/omgssapi/omgssapi.c
+++ b/plugins/omgssapi/omgssapi.c
@@ -630,12 +630,6 @@ CODE_STD_FINALIZERparseSelectorAct
ENDparseSelectorAct
-BEGINneedUDPSocket
-CODESTARTneedUDPSocket
- iRet = RS_RET_FALSE;
-ENDneedUDPSocket
-
-
BEGINmodExit
CODESTARTmodExit
objRelease(errmsg, CORE_COMPONENT);
diff --git a/plugins/omlibdbi/omlibdbi.c b/plugins/omlibdbi/omlibdbi.c
index 299180c0..a942a453 100644
--- a/plugins/omlibdbi/omlibdbi.c
+++ b/plugins/omlibdbi/omlibdbi.c
@@ -110,11 +110,6 @@ CODESTARTfreeInstance
ENDfreeInstance
-BEGINneedUDPSocket
-CODESTARTneedUDPSocket
-ENDneedUDPSocket
-
-
BEGINdbgPrintInstInfo
CODESTARTdbgPrintInstInfo
/* nothing special here */
diff --git a/plugins/ommysql/ommysql.c b/plugins/ommysql/ommysql.c
index 5876b754..0522e31d 100644
--- a/plugins/ommysql/ommysql.c
+++ b/plugins/ommysql/ommysql.c
@@ -95,11 +95,6 @@ CODESTARTfreeInstance
ENDfreeInstance
-BEGINneedUDPSocket
-CODESTARTneedUDPSocket
-ENDneedUDPSocket
-
-
BEGINdbgPrintInstInfo
CODESTARTdbgPrintInstInfo
/* nothing special here */
diff --git a/plugins/ompgsql/ompgsql.c b/plugins/ompgsql/ompgsql.c
index 9e84956a..1d7b2eb7 100644
--- a/plugins/ompgsql/ompgsql.c
+++ b/plugins/ompgsql/ompgsql.c
@@ -92,11 +92,6 @@ CODESTARTfreeInstance
ENDfreeInstance
-BEGINneedUDPSocket
-CODESTARTneedUDPSocket
-ENDneedUDPSocket
-
-
BEGINdbgPrintInstInfo
CODESTARTdbgPrintInstInfo
/* nothing special here */
diff --git a/plugins/omrelp/omrelp.c b/plugins/omrelp/omrelp.c
index f498385c..63f945df 100644
--- a/plugins/omrelp/omrelp.c
+++ b/plugins/omrelp/omrelp.c
@@ -288,12 +288,6 @@ CODE_STD_FINALIZERparseSelectorAct
ENDparseSelectorAct
-BEGINneedUDPSocket
-CODESTARTneedUDPSocket
- iRet = RS_RET_TRUE;
-ENDneedUDPSocket
-
-
BEGINmodExit
CODESTARTmodExit
relpEngineDestruct(&pRelpEngine);
diff --git a/plugins/omsnmp/omsnmp.c b/plugins/omsnmp/omsnmp.c
index c3afb5d4..d518ae3b 100644
--- a/plugins/omsnmp/omsnmp.c
+++ b/plugins/omsnmp/omsnmp.c
@@ -442,10 +442,6 @@ CODE_STD_FINALIZERparseSelectorAct
ENDparseSelectorAct
-BEGINneedUDPSocket
-CODESTARTneedUDPSocket
-ENDneedUDPSocket
-
/* Reset config variables for this module to default values.
*/
static rsRetVal resetConfigVariables(uchar __attribute__((unused)) *pp, void __attribute__((unused)) *pVal)
diff --git a/plugins/omtesting/omtesting.c b/plugins/omtesting/omtesting.c
index 11ef8381..15d3cb80 100644
--- a/plugins/omtesting/omtesting.c
+++ b/plugins/omtesting/omtesting.c
@@ -162,11 +162,6 @@ CODE_STD_FINALIZERparseSelectorAct
ENDparseSelectorAct
-BEGINneedUDPSocket
-CODESTARTneedUDPSocket
-ENDneedUDPSocket
-
-
BEGINmodExit
CODESTARTmodExit
ENDmodExit
diff --git a/syslogd.c b/syslogd.c
index 58ecb16a..588c5b91 100644
--- a/syslogd.c
+++ b/syslogd.c
@@ -310,7 +310,6 @@ static int logEveryMsg = 0;/* no repeat message processing - read-only after st
uchar *pszWorkDir = NULL;/* name of rsyslog's spool directory (without trailing slash) */
/* end global config file state variables */
-static unsigned int Forwarding = 0;
char LocalHostName[MAXHOSTNAMELEN+1];/* our hostname - read-only after startup */
char *LocalDomain; /* our local domain name - read-only after startup */
int MarkInterval = 20 * 60; /* interval between marks in seconds - read-only after startup */
@@ -2224,7 +2223,6 @@ init(void)
pDfltHostnameCmp = NULL;
pDfltProgNameCmp = NULL;
eDfltHostnameCmpMode = HN_NO_COMP;
- Forwarding = 0;
dbgprintf("rsyslog %s.\n", VERSION);
dbgprintf("Called init.\n");
@@ -2394,42 +2392,6 @@ init(void)
}
-/* helper to selectorAddListCheckActions()
- * This is the fucntion to be executed by llExecFunc
- */
-DEFFUNC_llExecFunc(selectorAddListCheckActionsChecker)
-{
- DEFiRet;
- action_t *pAction = (action_t *) pData;
-
- assert(pAction != NULL);
-
- if(pAction->pMod->needUDPSocket(pAction->pModData) == RS_RET_TRUE) {
- Forwarding++;
- }
-
- RETiRet;
-}
-
-/* loop through a list of actions and perform necessary checks and
- * housekeeping. This function must only be called when the owning
- * selector_t looks valid and is not likely to be discarded. However,
- * if we do not return RS_RET_OK, the caller MUST discard the
- * owning selector_t. -- rgerhards, 2007-08-02
-*/
-static rsRetVal selectorAddListCheckActions(selector_t *f)
-{
- DEFiRet;
-
- assert(f != NULL);
-
- CHKiRet(llExecFunc(&f->llActList, selectorAddListCheckActionsChecker, NULL));
-
-finalize_it:
- RETiRet;
-}
-
-
/* add a completely-processed selector (after config line parsing) to
* the linked list of selectors. We now need to check
* if it has any actions associated and, if so, link it to the linked
@@ -2453,11 +2415,6 @@ selectorAddList(selector_t *f)
errmsg.LogError(NO_ERRCODE, "warning: selector line without actions will be discarded");
selectorDestruct(f);
} else {
- if((iRet = selectorAddListCheckActions(f)) != RS_RET_OK) {
- errmsg.LogError(NO_ERRCODE, "selector line will be discarded due to error in action(s)");
- selectorDestruct(f);
- goto finalize_it;
- }
/* successfully created an entry */
dbgprintf("selector line successfully processed\n");
/* TODO: we should use the linked list class for the selector list, else we need to add globals