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/pjlib/src/pj/sock_bsd.c

    r3238 r3299  
    514514    PJ_ASSERT_RETURN(PJ_INVALID_SOCKET==-1,  
    515515                     (*sock=PJ_INVALID_SOCKET, PJ_EINVAL)); 
    516  
     516     
    517517    *sock = socket(af, type, proto); 
    518518    if (*sock == PJ_INVALID_SOCKET) 
    519519        return PJ_RETURN_OS_ERROR(pj_get_native_netos_error()); 
    520     else  
    521         return PJ_SUCCESS; 
     520    else { 
     521#if defined(PJ_IPHONE_OS_HAS_MULTITASKING_SUPPORT) && \ 
     522    PJ_IPHONE_OS_HAS_MULTITASKING_SUPPORT!=0 
     523        pj_int32_t val = 1; 
     524        if (type == pj_SOCK_DGRAM()) { 
     525            pj_sock_setsockopt(*sock, pj_SOL_SOCKET(), SO_NOSIGPIPE,  
     526                               &val, sizeof(val)); 
     527        } 
     528#endif 
     529        return PJ_SUCCESS; 
     530    } 
    522531} 
    523532#endif 
Note: See TracChangeset for help on using the changeset viewer.