diff options
-rw-r--r-- | ChangeLog | 2 | ||||
-rw-r--r-- | module-template.h | 24 | ||||
-rw-r--r-- | modules.c | 1 | ||||
-rw-r--r-- | modules.h | 4 | ||||
-rw-r--r-- | omdiscard.c | 5 | ||||
-rw-r--r-- | omfile.c | 5 | ||||
-rw-r--r-- | omfwd.c | 6 | ||||
-rw-r--r-- | omshell.c | 5 | ||||
-rw-r--r-- | omusrmsg.c | 5 | ||||
-rw-r--r-- | plugins/omgssapi/omgssapi.c | 6 | ||||
-rw-r--r-- | plugins/omlibdbi/omlibdbi.c | 5 | ||||
-rw-r--r-- | plugins/ommysql/ommysql.c | 5 | ||||
-rw-r--r-- | plugins/ompgsql/ompgsql.c | 5 | ||||
-rw-r--r-- | plugins/omrelp/omrelp.c | 6 | ||||
-rw-r--r-- | plugins/omsnmp/omsnmp.c | 4 | ||||
-rw-r--r-- | plugins/omtesting/omtesting.c | 5 | ||||
-rw-r--r-- | syslogd.c | 43 |
17 files changed, 4 insertions, 132 deletions
@@ -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;\ } @@ -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: @@ -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 @@ -626,11 +626,6 @@ CODESTARTfreeInstance ENDfreeInstance -BEGINneedUDPSocket -CODESTARTneedUDPSocket -ENDneedUDPSocket - - BEGINtryResume CODESTARTtryResume ENDtryResume @@ -598,12 +598,6 @@ CODE_STD_FINALIZERparseSelectorAct ENDparseSelectorAct -BEGINneedUDPSocket -CODESTARTneedUDPSocket - iRet = RS_RET_TRUE; -ENDneedUDPSocket - - BEGINmodExit CODESTARTmodExit /* release what we no longer need */ @@ -124,11 +124,6 @@ CODE_STD_FINALIZERparseSelectorAct ENDparseSelectorAct -BEGINneedUDPSocket -CODESTARTneedUDPSocket -ENDneedUDPSocket - - BEGINmodExit CODESTARTmodExit ENDmodExit @@ -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 @@ -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 |