Ignore:
Timestamp:
Oct 11, 2010 10:59:37 AM (12 years ago)
Author:
ming
Message:

Fix #1145: API to enable/disable support for iOS BG feature during runtime

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjlib/src/pj/activesock.c

    r3317 r3336  
    3030    PJ_IPHONE_OS_HAS_MULTITASKING_SUPPORT!=0 
    3131#   include <CFNetwork/CFNetwork.h> 
     32 
     33    static pj_bool_t ios_bg_support = PJ_TRUE; 
    3234#endif 
    3335 
     
    134136static void activesock_create_iphone_os_stream(pj_activesock_t *asock) 
    135137{ 
    136     if (asock->bg_setting && asock->stream_oriented) { 
     138    if (ios_bg_support && asock->bg_setting && asock->stream_oriented) { 
    137139        activesock_destroy_iphone_os_stream(asock); 
    138140 
     
    164166    else 
    165167        activesock_destroy_iphone_os_stream(asock); 
     168} 
     169 
     170PJ_DEF(void) pj_activesock_enable_iphone_os_bg(pj_bool_t val) 
     171{ 
     172    ios_bg_support = val; 
    166173} 
    167174#endif 
Note: See TracChangeset for help on using the changeset viewer.