diff options
author | Liong Sauw Ming <ming@teluu.com> | 2011-03-01 07:47:37 +0000 |
---|---|---|
committer | Liong Sauw Ming <ming@teluu.com> | 2011-03-01 07:47:37 +0000 |
commit | 5a7e9a8c7187c1f62d754eb9a1e2f3220a876d94 (patch) | |
tree | f09bd476d0bbb1318b19a695986f7f5af1bb194e /pjsip | |
parent | 3b8e444b9025860b62b0813481f567a159ee55ce (diff) |
Fix #1203: iPhone OS background mode detection
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@3429 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip')
-rw-r--r-- | pjsip/src/pjsua-lib/pjsua_core.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/pjsip/src/pjsua-lib/pjsua_core.c b/pjsip/src/pjsua-lib/pjsua_core.c index 086dabf7..16dda48a 100644 --- a/pjsip/src/pjsua-lib/pjsua_core.c +++ b/pjsip/src/pjsua-lib/pjsua_core.c @@ -701,6 +701,15 @@ PJ_DEF(pj_status_t) pjsua_init( const pjsua_config *ua_cfg, return status; } +#if defined(PJ_IPHONE_OS_HAS_MULTITASKING_SUPPORT) && \ + PJ_IPHONE_OS_HAS_MULTITASKING_SUPPORT != 0 + if (!(pj_get_sys_info()->flags & PJ_SYS_HAS_IOS_BG)) { + PJ_LOG(5, (THIS_FILE, "Device does not support " + "background mode")); + pj_activesock_enable_iphone_os_bg(PJ_FALSE); + } +#endif + /* If nameserver is configured, create DNS resolver instance and * set it to be used by SIP resolver. */ |