From 47e7de1c94be7f826080b3711451eafee894791f Mon Sep 17 00:00:00 2001 From: Benny Prijono Date: Thu, 19 Jan 2006 03:58:29 +0000 Subject: Initial, quick and dirty WinCE port with EVC4 git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@125 74dad513-b988-da41-8d7b-12977e46ad98 --- pjlib/src/pj/ioqueue_common_abs.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'pjlib/src/pj/ioqueue_common_abs.c') diff --git a/pjlib/src/pj/ioqueue_common_abs.c b/pjlib/src/pj/ioqueue_common_abs.c index 285aefc9..9b59657e 100644 --- a/pjlib/src/pj/ioqueue_common_abs.c +++ b/pjlib/src/pj/ioqueue_common_abs.c @@ -215,12 +215,14 @@ void ioqueue_dispatch_write_event(pj_ioqueue_t *ioqueue, pj_ioqueue_key_t *h) * the right errno through error slippage. This is a combination * of suggestions from Douglas C. Schmidt and Ken Keys. */ - int gp_rc; - struct sockaddr_in addr; - socklen_t addrlen = sizeof(addr); + { + int gp_rc; + struct sockaddr_in addr; + socklen_t addrlen = sizeof(addr); - gp_rc = getpeername(h->fd, (struct sockaddr*)&addr, &addrlen); - bytes_transfered = gp_rc; + gp_rc = getpeername(h->fd, (struct sockaddr*)&addr, &addrlen); + bytes_transfered = gp_rc; + } #endif /* Call callback. */ @@ -399,7 +401,8 @@ void ioqueue_dispatch_read_event( pj_ioqueue_t *ioqueue, pj_ioqueue_key_t *h ) * read(). That's why we only specify PJ_LINUX here so * that error is easier to catch. */ -# if defined(PJ_WIN32) && PJ_WIN32 != 0 +# if defined(PJ_WIN32) && PJ_WIN32 != 0 || \ + defined(PJ_WIN32_WINCE) && PJ_WIN32_WINCE != 0 rc = pj_sock_recv(h->fd, read_op->buf, &bytes_read, 0); //rc = ReadFile((HANDLE)h->fd, read_op->buf, read_op->size, // &bytes_read, NULL); -- cgit v1.2.3