From d39a04e2522e53d1a54fb7b9d06acb998739369e Mon Sep 17 00:00:00 2001 From: Liong Sauw Ming Date: Thu, 5 Sep 2013 04:16:19 +0000 Subject: Re #1697: Add internal compile time option to disable the use of Audio Session API (deprecated) git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4590 74dad513-b988-da41-8d7b-12977e46ad98 --- pjsip-apps/src/pjsua/ios/ipjsua/ipjsuaAppDelegate.m | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) (limited to 'pjsip-apps/src/pjsua/ios/ipjsua/ipjsuaAppDelegate.m') diff --git a/pjsip-apps/src/pjsua/ios/ipjsua/ipjsuaAppDelegate.m b/pjsip-apps/src/pjsua/ios/ipjsua/ipjsuaAppDelegate.m index 739d88ad..5bcf2409 100644 --- a/pjsip-apps/src/pjsua/ios/ipjsua/ipjsuaAppDelegate.m +++ b/pjsip-apps/src/pjsua/ios/ipjsua/ipjsuaAppDelegate.m @@ -151,26 +151,20 @@ static void pjsuaOnAppConfigCb(pjsua_app_config *cfg) } - (void)keepAlive { - int i, timeout = KEEP_ALIVE_INTERVAL; + int i; if (!pj_thread_is_registered()) { pj_thread_register("ipjsua", a_thread_desc, &a_thread); } + /* Since iOS requires that the minimum keep alive interval is 600s, + * application needs to make sure that the account's registration + * timeout is long enough. + */ for (i = 0; i < (int)pjsua_acc_get_count(); ++i) { if (pjsua_acc_is_valid(i)) { - pjsua_acc_config acc_cfg; - - pjsua_acc_get_config(i, &acc_cfg); - if (!acc_cfg.reg_uri.slen) - continue; - if (acc_cfg.reg_timeout < timeout) { - acc_cfg.reg_timeout = timeout; - pjsua_acc_modify(i, &acc_cfg); - } else { - pjsua_acc_set_registration(i, PJ_TRUE); - } + pjsua_acc_set_registration(i, PJ_TRUE); } } } -- cgit v1.2.3