[svn-commits] kharwell: branch 13 r431219 - in /branches/13: ./ main/tcptls.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Tue Jan 27 16:56:42 CST 2015


Author: kharwell
Date: Tue Jan 27 16:56:39 2015
New Revision: 431219

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=431219
Log:
tcptls: Bad file descriptor error when reloading chan_sip

While running through some scenarios using chan_sip and tcp a problem would
occur that resulted in a flood of bad file descriptor messages on the cli:

tcptls.c:712 ast_tcptls_server_root: Accept failed: Bad file descriptor

The message is received because the underlying socket has been closed, so is
valid. This is probably happening because unloading of chan_sip is not atomic.
That however is outside the scope of this patch. This patch simply stops the
logging of multiple occurrences of that message.

ASTERISK-24728 #close
Reported by: Thomas Thompson
Review: https://reviewboard.asterisk.org/r/4380/
........

Merged revisions 431218 from http://svn.asterisk.org/svn/asterisk/branches/11

Modified:
    branches/13/   (props changed)
    branches/13/main/tcptls.c

Propchange: branches/13/
------------------------------------------------------------------------------
--- branch-11-merged (original)
+++ branch-11-merged Tue Jan 27 16:56:39 2015
@@ -1,1 +1,1 @@
-/branches/11:1-429517,429539,429632,429783,429804,429825,429867,429893,429982,430009,430126,430415,430487,430506,430564,430589,430795,430798,430920,430993,430996-430997,431049,431135,431187
+/branches/11:1-429517,429539,429632,429783,429804,429825,429867,429893,429982,430009,430126,430415,430487,430506,430564,430589,430795,430798,430920,430993,430996-430997,431049,431135,431187,431218

Modified: branches/13/main/tcptls.c
URL: http://svnview.digium.com/svn/asterisk/branches/13/main/tcptls.c?view=diff&rev=431219&r1=431218&r2=431219
==============================================================================
--- branches/13/main/tcptls.c (original)
+++ branches/13/main/tcptls.c Tue Jan 27 16:56:39 2015
@@ -708,8 +708,9 @@
 		}
 		fd = ast_accept(desc->accept_fd, &addr);
 		if (fd < 0) {
-			if ((errno != EAGAIN) && (errno != EINTR)) {
+			if ((errno != EAGAIN) && (errno != EWOULDBLOCK) && (errno != EINTR) && (errno != ECONNABORTED)) {
 				ast_log(LOG_ERROR, "Accept failed: %s\n", strerror(errno));
+				break;
 			}
 			continue;
 		}




More information about the svn-commits mailing list