From 6c0c26dc96544aa5814d00045b3d559c99fc1b2e Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Fri, 14 Dec 2007 16:51:34 +0000 Subject: on the way to a real input module interface and threading class... --- modules.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'modules.c') 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; } -- cgit v1.2.3