diff options
author | Riza Sulistyo <riza@teluu.com> | 2013-03-07 05:08:10 +0000 |
---|---|---|
committer | Riza Sulistyo <riza@teluu.com> | 2013-03-07 05:08:10 +0000 |
commit | b6ac91331973018c54341cf5a076e39199099fa6 (patch) | |
tree | 120b9f4f307c944da011a0481335a2863bffd980 /pjlib | |
parent | 0ea79636890aa26ad47dd06962cb1e668e3cfc30 (diff) |
Misc (re #1634): fixed compile errors/warnings on MSVC
git-svn-id: http://svn.pjsip.org/repos/pjproject/branches/1.x@4426 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjlib')
-rw-r--r-- | pjlib/src/pj/ioqueue_common_abs.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/pjlib/src/pj/ioqueue_common_abs.c b/pjlib/src/pj/ioqueue_common_abs.c index 8d68275b..9499d156 100644 --- a/pjlib/src/pj/ioqueue_common_abs.c +++ b/pjlib/src/pj/ioqueue_common_abs.c @@ -283,7 +283,7 @@ void ioqueue_dispatch_write_event(pj_ioqueue_t *ioqueue, pj_ioqueue_key_t *h) /* Socket is writable. */ struct write_operation *write_op; pj_ssize_t sent; - pj_status_t send_rc; + pj_status_t send_rc = PJ_SUCCESS; /* Get the first in the queue. */ write_op = h->write_list.next; @@ -312,8 +312,8 @@ void ioqueue_dispatch_write_event(pj_ioqueue_t *ioqueue, pj_ioqueue_key_t *h) */ //write_op->op = 0; } else if (write_op->op == PJ_IOQUEUE_OP_SEND_TO) { - int retry; - for (retry=0; retry<2; ++retry) { + int retry = 2; + while (--retry >= 0) { send_rc = pj_sock_sendto(h->fd, write_op->buf+write_op->written, &sent, write_op->flags, @@ -945,7 +945,11 @@ PJ_DEF(pj_status_t) pj_ioqueue_sendto( pj_ioqueue_key_t *key, PJ_ASSERT_RETURN(key && op_key && data && length, PJ_EINVAL); PJ_CHECK_STACK(); +#if defined(PJ_IPHONE_OS_HAS_MULTITASKING_SUPPORT) && \ + PJ_IPHONE_OS_HAS_MULTITASKING_SUPPORT!=0 retry_on_restart: +#endif + /* Check if key is closing. */ if (IS_CLOSING(key)) return PJ_ECANCELLED; |