summaryrefslogtreecommitdiff
path: root/pjlib
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2007-04-06 10:29:20 +0000
committerBenny Prijono <bennylp@teluu.com>2007-04-06 10:29:20 +0000
commitd73e5c4efb3ce395e82ef7f4f88afc2b57e52230 (patch)
treec1908636940a79cd1426b6db41340f87b2c290fe /pjlib
parentbeddeea87ffeabce44354b7016578f577d7887dc (diff)
Fixed ticket #216: Build error when PJ_HAS_TCP is set to zero (thanks ChenHuan)
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@1159 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjlib')
-rw-r--r--pjlib/src/pj/ioqueue_common_abs.c1
-rw-r--r--pjlib/src/pj/ioqueue_select.c11
-rw-r--r--pjlib/src/pj/ioqueue_winnt.c4
3 files changed, 14 insertions, 2 deletions
diff --git a/pjlib/src/pj/ioqueue_common_abs.c b/pjlib/src/pj/ioqueue_common_abs.c
index 2301ac96..82f962c2 100644
--- a/pjlib/src/pj/ioqueue_common_abs.c
+++ b/pjlib/src/pj/ioqueue_common_abs.c
@@ -155,6 +155,7 @@ PJ_INLINE(int) key_has_pending_accept(pj_ioqueue_key_t *key)
#if PJ_HAS_TCP
return !pj_list_empty(&key->accept_list);
#else
+ PJ_UNUSED_ARG(key);
return 0;
#endif
}
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);
diff --git a/pjlib/src/pj/ioqueue_winnt.c b/pjlib/src/pj/ioqueue_winnt.c
index ce8cd5d9..8d17878e 100644
--- a/pjlib/src/pj/ioqueue_winnt.c
+++ b/pjlib/src/pj/ioqueue_winnt.c
@@ -366,7 +366,9 @@ PJ_DEF(pj_status_t) pj_ioqueue_create( pj_pool_t *pool,
*/
PJ_DEF(pj_status_t) pj_ioqueue_destroy( pj_ioqueue_t *ioqueue )
{
+#if PJ_HAS_TCP
unsigned i;
+#endif
pj_ioqueue_key_t *key;
PJ_CHECK_STACK();
@@ -739,7 +741,9 @@ PJ_DEF(pj_status_t) pj_ioqueue_unregister( pj_ioqueue_key_t *key )
PJ_DEF(int) pj_ioqueue_poll( pj_ioqueue_t *ioqueue, const pj_time_val *timeout)
{
DWORD dwMsec;
+#if PJ_HAS_TCP
int connect_count = 0;
+#endif
int event_count = 0;
PJ_ASSERT_RETURN(ioqueue, -PJ_EINVAL);