summaryrefslogtreecommitdiff
path: root/pjlib/src/pj/ioqueue_select.c
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2007-04-06 10:25:23 +0000
committerBenny Prijono <bennylp@teluu.com>2007-04-06 10:25:23 +0000
commit3867d2a30499fd9e87047b0c43d30e9e6511841e (patch)
treead6aebc5ceb044dc8db039638af838855c6a79ed /pjlib/src/pj/ioqueue_select.c
parent28001e6a56709413b59da8e42afdda8a35f4ff50 (diff)
Fixed ticket #215: Build error when PJ_HAS_TCP is set to zero (thanks ChenHuan)
git-svn-id: http://svn.pjsip.org/repos/pjproject/branches/pjproject-0.5-stable@1158 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjlib/src/pj/ioqueue_select.c')
-rw-r--r--pjlib/src/pj/ioqueue_select.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/pjlib/src/pj/ioqueue_select.c b/pjlib/src/pj/ioqueue_select.c
index 7595e635..f5e36904 100644
--- a/pjlib/src/pj/ioqueue_select.c
+++ b/pjlib/src/pj/ioqueue_select.c
@@ -556,8 +556,10 @@ static void ioqueue_remove_from_set( pj_ioqueue_t *ioqueue,
PJ_FD_CLR((pj_sock_t)key->fd, &ioqueue->rfdset);
else if (event_type == WRITEABLE_EVENT)
PJ_FD_CLR((pj_sock_t)key->fd, &ioqueue->wfdset);
+#if defined(PJ_HAS_TCP) && PJ_HAS_TCP!=0
else if (event_type == EXCEPTION_EVENT)
PJ_FD_CLR((pj_sock_t)key->fd, &ioqueue->xfdset);
+#endif
else
pj_assert(0);
@@ -580,8 +582,10 @@ static void ioqueue_add_to_set( pj_ioqueue_t *ioqueue,
PJ_FD_SET((pj_sock_t)key->fd, &ioqueue->rfdset);
else if (event_type == WRITEABLE_EVENT)
PJ_FD_SET((pj_sock_t)key->fd, &ioqueue->wfdset);
+#if defined(PJ_HAS_TCP) && PJ_HAS_TCP!=0
else if (event_type == EXCEPTION_EVENT)
PJ_FD_SET((pj_sock_t)key->fd, &ioqueue->xfdset);
+#endif
else
pj_assert(0);
@@ -649,8 +653,11 @@ PJ_DEF(int) pj_ioqueue_poll( pj_ioqueue_t *ioqueue, const pj_time_val *timeout)
* Otherwise select() will return error.
*/
if (PJ_FD_COUNT(&ioqueue->rfdset)==0 &&
- PJ_FD_COUNT(&ioqueue->wfdset)==0 &&
- PJ_FD_COUNT(&ioqueue->xfdset)==0)
+ PJ_FD_COUNT(&ioqueue->wfdset)==0
+#if defined(PJ_HAS_TCP) && PJ_HAS_TCP!=0
+ && PJ_FD_COUNT(&ioqueue->xfdset)==0
+#endif
+ )
{
#if PJ_IOQUEUE_HAS_SAFE_UNREG
scan_closing_keys(ioqueue);