diff options
author | Benny Prijono <bennylp@teluu.com> | 2006-01-19 03:58:29 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2006-01-19 03:58:29 +0000 |
commit | 47e7de1c94be7f826080b3711451eafee894791f (patch) | |
tree | d27cdefeb8b9939c47d3126ddcb1ae2d55287d6e /pjlib/src/pj/ioqueue_common_abs.c | |
parent | 5bad79ed937c72db0f066e2e50ebd74fcdd4dbc3 (diff) |
Initial, quick and dirty WinCE port with EVC4
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@125 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjlib/src/pj/ioqueue_common_abs.c')
-rw-r--r-- | pjlib/src/pj/ioqueue_common_abs.c | 15 |
1 files changed, 9 insertions, 6 deletions
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); |