Ignore:
Timestamp:
Aug 27, 2010 6:46:29 AM (14 years ago)
Author:
ming
Message:

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
File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip-apps/src/pjsua/pjsua_app.c

    r3243 r3299  
    158158 * Configuration manipulation 
    159159 */ 
     160 
     161#if (defined(PJ_IPHONE_OS_HAS_MULTITASKING_SUPPORT) && \ 
     162    PJ_IPHONE_OS_HAS_MULTITASKING_SUPPORT!=0) || \ 
     163    defined(__IPHONE_4_0) 
     164void keepAliveFunction(int timeout) 
     165{ 
     166    int i; 
     167    for (i=0; i<(int)pjsua_acc_get_count(); ++i) { 
     168        if (!pjsua_acc_is_valid(i)) 
     169            continue; 
     170 
     171        if (app_config.acc_cfg[i].reg_timeout < timeout) 
     172            app_config.acc_cfg[i].reg_timeout = timeout; 
     173        pjsua_acc_set_registration(i, PJ_TRUE); 
     174    } 
     175} 
     176#endif 
    160177 
    161178/* Show usage */ 
     
    24572474    pjsua_call_get_info(call_id, &call_info); 
    24582475 
     2476    if (current_call==PJSUA_INVALID_ID) 
     2477        current_call = call_id; 
     2478 
     2479#ifdef USE_GUI 
     2480    if (!showNotification(call_id)) 
     2481        return; 
     2482#endif 
     2483 
    24592484    /* Start ringback */ 
    24602485    ring_start(call_id); 
    2461  
    2462     if (current_call==PJSUA_INVALID_ID) 
    2463         current_call = call_id; 
    2464  
     2486     
    24652487    if (app_config.auto_answer > 0) { 
    24662488        pjsua_call_answer(call_id, app_config.auto_answer, NULL, NULL); 
Note: See TracChangeset for help on using the changeset viewer.