summaryrefslogtreecommitdiffstats
path: root/modules.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2007-12-14 16:51:34 +0000
committerRainer Gerhards <rgerhards@adiscon.com>2007-12-14 16:51:34 +0000
commit6c0c26dc96544aa5814d00045b3d559c99fc1b2e (patch)
tree20d558391ba1d881ab3b27f7fbcc636dcfbc67ad /modules.c
parent6a80d9ee504b57e2b815c91698785d4fcd06f62e (diff)
downloadrsyslog-6c0c26dc96544aa5814d00045b3d559c99fc1b2e.tar.gz
rsyslog-6c0c26dc96544aa5814d00045b3d559c99fc1b2e.tar.xz
rsyslog-6c0c26dc96544aa5814d00045b3d559c99fc1b2e.zip
on the way to a real input module interface and threading class...
Diffstat (limited to 'modules.c')
-rw-r--r--modules.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/modules.c b/modules.c
index b7ca71eb..6869ede6 100644
--- a/modules.c
+++ b/modules.c
@@ -160,13 +160,19 @@ modInfo_t *modGetNxt(modInfo_t *pThis)
/* this function is like modGetNxt(), but it returns pointers to
- * output modules only. As we currently deal just with output modules,
+ * modules of specific type only. As we currently deal just with output modules,
* it is a dummy, to be filled with real code later.
* rgerhards, 2007-07-24
*/
-modInfo_t *omodGetNxt(modInfo_t *pThis)
+modInfo_t *modGetNxtType(modInfo_t *pThis, eModType_t rqtdType)
{
- return(modGetNxt(pThis));
+ modInfo_t *pMod = pThis;
+
+ do {
+ pMod = modGetNxt(pMod);
+ } while(!(pMod == NULL || pMod->eType == rqtdType)); /* warning: do ... while() */
+
+ return pMod;
}