Skip to content
Snippets Groups Projects
Commit 89da27b7 authored by Matthew Nicholson's avatar Matthew Nicholson
Browse files

Merged revisions 317196 via svnmerge from

https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r317196 | mnicholson | 2011-05-05 13:02:52 -0500 (Thu, 05 May 2011) | 8 lines
  
  Set SO_KEEPALIVE on SIP TCP sockets so that they eventually go away when a peer
  abruptly disappears.  This mostly occurs after a successful registration.
  
  (closes issue #17544)
  Reported by: marcelloceschia
  Patches:
        (modified) tcptls.patch uploaded by st (license 907)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@317198 65c4cc65-6c06-0410-ace0-fbb531ad65f3
parent 00dc1556
No related merge requests found
...@@ -2542,6 +2542,12 @@ static void *_sip_tcp_helper_thread(struct sip_pvt *pvt, struct ast_tcptls_sessi ...@@ -2542,6 +2542,12 @@ static void *_sip_tcp_helper_thread(struct sip_pvt *pvt, struct ast_tcptls_sessi
} }
} }
   
flags = 1;
if (setsockopt(tcptls_session->fd, SOL_SOCKET, SO_KEEPALIVE, &flags, sizeof(flags))) {
ast_log(LOG_ERROR, "error enabling TCP keep-alives on sip socket: %s\n", strerror(errno));
goto cleanup;
}
me->threadid = pthread_self(); me->threadid = pthread_self();
ast_debug(2, "Starting thread for %s server\n", tcptls_session->ssl ? "SSL" : "TCP"); ast_debug(2, "Starting thread for %s server\n", tcptls_session->ssl ? "SSL" : "TCP");
   
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment