summaryrefslogtreecommitdiffstats
path: root/runtime/nssel.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2008-04-23 15:07:19 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2008-04-23 15:07:19 +0200
commit1892fc75f9fad0b0741b4a3eb1fc382f900b2301 (patch)
treea863e25521c3dd5988bdea1499a41c47106ae81f /runtime/nssel.c
parent2be459c4d7645ad12f83723be7bb26199fe98b82 (diff)
downloadrsyslog-1892fc75f9fad0b0741b4a3eb1fc382f900b2301.tar.gz
rsyslog-1892fc75f9fad0b0741b4a3eb1fc382f900b2301.tar.xz
rsyslog-1892fc75f9fad0b0741b4a3eb1fc382f900b2301.zip
added new netstrms class
netstrms is at the top layer of the socket abstraction
Diffstat (limited to 'runtime/nssel.c')
-rw-r--r--runtime/nssel.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/runtime/nssel.c b/runtime/nssel.c
index f2844872..0cbda9b9 100644
--- a/runtime/nssel.c
+++ b/runtime/nssel.c
@@ -41,6 +41,7 @@
#include "rsyslog.h"
#include "obj.h"
#include "module-template.h"
+#include "netstrm.h"
#include "nssel.h"
MODULE_TYPE_LIB
@@ -103,18 +104,19 @@ finalize_it:
}
-/* Add a stream object to the current IOW. Note that a single stream may
- * have multiple "sockets" if it is a listener. If so, all of them are
- * begin added.
+/* Add a stream object to the current select() set.
+ * Note that a single stream may have multiple "sockets" if
+ * it is a listener. If so, all of them are begin added.
*/
static rsRetVal
-Add(nssel_t *pThis, netstrm_t *pStrm)
+Add(nssel_t *pThis, netstrm_t *pStrm, nsdsel_waitOp_t waitOp)
{
DEFiRet;
ISOBJ_TYPE_assert(pThis, nssel);
ISOBJ_TYPE_assert(pStrm, netstrm);
-
+
+ CHKiRet(pThis->Drvr.Add(pThis->pDrvrData, pStrm->pDrvrData, waitOp));
finalize_it:
RETiRet;
@@ -131,6 +133,7 @@ Wait(nssel_t *pThis, int *piNumReady)
DEFiRet;
ISOBJ_TYPE_assert(pThis, nssel);
assert(piNumReady != NULL);
+ iRet = pThis->Drvr.Select(pThis->pDrvrData, piNumReady);
RETiRet;
}
@@ -142,7 +145,7 @@ Wait(nssel_t *pThis, int *piNumReady)
* rgerhards, 2008-04-23
*/
static rsRetVal
-IsReady(nssel_t *pThis, netstrm_t *pStrm, int *pbIsReady, int *piNumReady)
+IsReady(nssel_t *pThis, netstrm_t *pStrm, nsdsel_waitOp_t waitOp, int *pbIsReady, int *piNumReady)
{
DEFiRet;
ISOBJ_TYPE_assert(pThis, nssel);