diff options
author | Liong Sauw Ming <ming@teluu.com> | 2010-08-27 06:46:29 +0000 |
---|---|---|
committer | Liong Sauw Ming <ming@teluu.com> | 2010-08-27 06:46:29 +0000 |
commit | a5c285d7fd046c862ef2ba11cd8bef71786db939 (patch) | |
tree | 13247c6735d6bb8f6a4b6d5253b39dd8a4b0e6a3 /pjlib/src/pj/ioqueue_common_abs.c | |
parent | 41b2998504157f24d6b991d372e77addbed55030 (diff) |
Closed ticket #1107: iOS4 background feature
* pjlib:
* add support for activesock TCP to work in background mode.
* add feature in ioqueue to recreate closed UDP sockets.
* pjsip-apps:
* ipjsua: add support for iPhone OS 4 background mode
* ipjsystest: add support for iPhone OS 4 background mode
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@3299 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 | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/pjlib/src/pj/ioqueue_common_abs.c b/pjlib/src/pj/ioqueue_common_abs.c index bcd4f6a3..07ed838c 100644 --- a/pjlib/src/pj/ioqueue_common_abs.c +++ b/pjlib/src/pj/ioqueue_common_abs.c @@ -529,6 +529,16 @@ void ioqueue_dispatch_read_event( pj_ioqueue_t *ioqueue, pj_ioqueue_key_t *h ) /* In any case we would report this to caller. */ bytes_read = -rc; + +#if defined(PJ_IPHONE_OS_HAS_MULTITASKING_SUPPORT) && \ + PJ_IPHONE_OS_HAS_MULTITASKING_SUPPORT!=0 + /* Special treatment for dead UDP sockets here, see ticket #1107 */ + if (rc == PJ_STATUS_FROM_OS(ENOTCONN) && !IS_CLOSING(h) && + h->fd_type==pj_SOCK_DGRAM()) + { + replace_udp_sock(h); + } +#endif } /* Unlock; from this point we don't need to hold key's mutex |