diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2007-12-14 16:51:34 +0000 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2007-12-14 16:51:34 +0000 |
commit | 6c0c26dc96544aa5814d00045b3d559c99fc1b2e (patch) | |
tree | 20d558391ba1d881ab3b27f7fbcc636dcfbc67ad /modules.c | |
parent | 6a80d9ee504b57e2b815c91698785d4fcd06f62e (diff) | |
download | rsyslog-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.c | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -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; } |