[svn-commits] mnicholson: trunk r317198 - in /trunk: ./ channels/chan_sip.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Thu May 5 13:09:28 CDT 2011


Author: mnicholson
Date: Thu May  5 13:09:23 2011
New Revision: 317198

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=317198
Log:
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)
........

Modified:
    trunk/   (props changed)
    trunk/channels/chan_sip.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.8-merged' - no diff available.

Modified: trunk/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_sip.c?view=diff&rev=317198&r1=317197&r2=317198
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Thu May  5 13:09:23 2011
@@ -2542,6 +2542,12 @@
 		}
 	}
 
+	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();
 	ast_debug(2, "Starting thread for %s server\n", tcptls_session->ssl ? "SSL" : "TCP");
 




More information about the svn-commits mailing list