Changeset 3478
- Timestamp:
- Mar 23, 2011 6:08:36 AM (14 years ago)
- Location:
- pjproject/trunk
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjlib/include/pj/sock.h
r3145 r3478 298 298 extern const pj_uint16_t PJ_SO_REUSEADDR; 299 299 300 /** Do not generate SIGPIPE. @see pj_SO_NOSIGPIPE */ 301 extern const pj_uint16_t PJ_SO_NOSIGPIPE; 302 300 303 /** Set the protocol-defined priority for all packets to be sent on socket. 301 304 */ … … 334 337 PJ_DECL(pj_uint16_t) pj_SO_REUSEADDR(void); 335 338 339 /** Get #PJ_SO_NOSIGPIPE constant */ 340 PJ_DECL(pj_uint16_t) pj_SO_NOSIGPIPE(void); 341 336 342 /** Get #PJ_SO_PRIORITY constant */ 337 343 PJ_DECL(pj_uint16_t) pj_SO_PRIORITY(void); … … 366 372 /** Get #PJ_SO_REUSEADDR constant */ 367 373 # define pj_SO_REUSEADDR() PJ_SO_REUSEADDR 374 375 /** Get #PJ_SO_NOSIGPIPE constant */ 376 # define pj_SO_NOSIGPIPE() PJ_SO_NOSIGPIPE 368 377 369 378 /** Get #PJ_SO_PRIORITY constant */ -
pjproject/trunk/pjlib/src/pj/sock_bsd.c
r3408 r3478 136 136 const pj_uint16_t PJ_TCP_NODELAY= TCP_NODELAY; 137 137 const pj_uint16_t PJ_SO_REUSEADDR= SO_REUSEADDR; 138 #ifdef SO_NOSIGPIPE 139 const pj_uint16_t PJ_SO_NOSIGPIPE = SO_NOSIGPIPE; 140 #else 141 const pj_uint16_t PJ_SO_NOSIGPIPE = 0xFFFF; 142 #endif 138 143 #if defined(SO_PRIORITY) 139 144 const pj_uint16_t PJ_SO_PRIORITY = SO_PRIORITY; -
pjproject/trunk/pjlib/src/pj/sock_common.c
r3186 r3478 1138 1138 } 1139 1139 1140 PJ_DEF(pj_uint16_t) pj_SO_NOSIGPIPE(void) 1141 { 1142 return PJ_SO_NOSIGPIPE; 1143 } 1144 1140 1145 PJ_DEF(pj_uint16_t) pj_SO_PRIORITY(void) 1141 1146 { -
pjproject/trunk/pjlib/src/pj/sock_symbian.cpp
r2966 r3478 54 54 const pj_uint16_t PJ_SOL_UDP = 0xFFFF; 55 55 const pj_uint16_t PJ_SOL_IPV6 = 0xFFFF; 56 const pj_uint16_t PJ_SO_NOSIGPIPE = 0xFFFF; 56 57 57 58 /* TOS */ -
pjproject/trunk/pjsip-apps/src/pjsua/main.c
r2892 r3478 67 67 } 68 68 69 static void setup_socket_signal() 70 { 71 } 72 69 73 #else 74 #include <signal.h> 70 75 71 76 static void setup_signal_handler(void) 72 77 { 78 } 79 80 static void setup_socket_signal() 81 { 82 signal(SIGPIPE, SIG_IGN); 73 83 } 74 84 … … 77 87 int main(int argc, char *argv[]) 78 88 { 89 setup_socket_signal(); 90 79 91 do { 80 92 app_restart = PJ_FALSE; -
pjproject/trunk/pjsip/src/pjsip/sip_transport_tcp.c
r3138 r3478 545 545 pj_activesock_cb tcp_callback; 546 546 const pj_str_t ka_pkt = PJSIP_TCP_KEEP_ALIVE_DATA; 547 pj_int32_t val = 1; 547 548 pj_status_t status; 548 549 … … 632 633 pj_ioqueue_op_key_init(&tcp->ka_op_key.key, sizeof(pj_ioqueue_op_key_t)); 633 634 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)); 634 639 635 640 /* Done setting up basic transport. */ -
pjproject/trunk/pjsip/src/pjsip/sip_transport_tls.c
r3148 r3478 528 528 struct tls_transport *tls; 529 529 const pj_str_t ka_pkt = PJSIP_TLS_KEEP_ALIVE_DATA; 530 pj_int32_t val = 1; 530 531 pj_status_t status; 531 532 … … 617 618 pj_strdup(tls->base.pool, &tls->ka_pkt, &ka_pkt); 618 619 620 /* Prevent SIGPIPE */ 621 pj_sock_setsockopt(tcp->sock, pj_SOL_SOCKET(), pj_SO_NOSIGPIPE(), 622 &val, sizeof(val)); 623 619 624 /* Done setting up basic transport. */ 620 625 *p_tls = tls; -
pjproject/trunk/pjsip/src/pjsip/sip_transport_tls_ossl.c
r2394 r3478 1230 1230 pj_ioqueue_callback tls_callback; 1231 1231 int rc; 1232 pj_int32_t val = 1; 1232 1233 pj_status_t status; 1233 1234 … … 1332 1333 tls->ka_timer.user_data = (void*) tls; 1333 1334 tls->ka_timer.cb = &tls_keep_alive_timer; 1335 1336 /* Prevent SIGPIPE */ 1337 pj_sock_setsockopt(tcp->sock, pj_SOL_SOCKET(), pj_SO_NOSIGPIPE(), 1338 &val, sizeof(val)); 1334 1339 1335 1340
Note: See TracChangeset
for help on using the changeset viewer.