diff options
author | Liong Sauw Ming <ming@teluu.com> | 2011-03-23 10:23:31 +0000 |
---|---|---|
committer | Liong Sauw Ming <ming@teluu.com> | 2011-03-23 10:23:31 +0000 |
commit | 4d29521bb80fc01db6cadcb6c02f999bf3461425 (patch) | |
tree | a973997ea598067581ad2c23d78f7d696fd870a8 /pjlib/src | |
parent | 05b795fa881f37772210bf24e26412eba1d03c96 (diff) |
Re #1221: Move setting the socket option to pjlib level (sock_bsd) instead of in the SIP transport.
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@3480 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjlib/src')
-rw-r--r-- | pjlib/src/pj/sock_bsd.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/pjlib/src/pj/sock_bsd.c b/pjlib/src/pj/sock_bsd.c index 4dbdc5c6..4150c270 100644 --- a/pjlib/src/pj/sock_bsd.c +++ b/pjlib/src/pj/sock_bsd.c @@ -549,9 +549,13 @@ PJ_DEF(pj_status_t) pj_sock_socket(int af, if (*sock == PJ_INVALID_SOCKET) return PJ_RETURN_OS_ERROR(pj_get_native_netos_error()); else { + pj_int32_t val = 1; + if (type == pj_SOCK_STREAM()) { + pj_sock_setsockopt(sock, pj_SOL_SOCKET(), pj_SO_NOSIGPIPE(), + &val, sizeof(val)); + } #if defined(PJ_IPHONE_OS_HAS_MULTITASKING_SUPPORT) && \ PJ_IPHONE_OS_HAS_MULTITASKING_SUPPORT!=0 - pj_int32_t val = 1; if (type == pj_SOCK_DGRAM()) { pj_sock_setsockopt(*sock, pj_SOL_SOCKET(), SO_NOSIGPIPE, &val, sizeof(val)); |