Ignore:
Timestamp:
Mar 23, 2011 6:08:36 AM (11 years ago)
Author:
ming
Message:

Fixed #1221: Crash when SIP transport tried to write to a broken pipe.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/src/pjsip/sip_transport_tcp.c

    r3138 r3478  
    545545    pj_activesock_cb tcp_callback; 
    546546    const pj_str_t ka_pkt = PJSIP_TCP_KEEP_ALIVE_DATA; 
     547    pj_int32_t val = 1; 
    547548    pj_status_t status; 
    548549     
     
    632633    pj_ioqueue_op_key_init(&tcp->ka_op_key.key, sizeof(pj_ioqueue_op_key_t)); 
    633634    pj_strdup(tcp->base.pool, &tcp->ka_pkt, &ka_pkt); 
     635     
     636    /* Prevent SIGPIPE */ 
     637    pj_sock_setsockopt(tcp->sock, pj_SOL_SOCKET(), pj_SO_NOSIGPIPE(), 
     638                       &val, sizeof(val)); 
    634639 
    635640    /* Done setting up basic transport. */ 
Note: See TracChangeset for help on using the changeset viewer.