[asterisk-commits] dvossel: branch 1.8 r320338 - in /branches/1.8: ./ main/tcptls.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri May 20 16:39:48 CDT 2011
Author: dvossel
Date: Fri May 20 16:39:36 2011
New Revision: 320338
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=320338
Log:
Merged revisions 320271 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2
........
r320271 | dvossel | 2011-05-20 16:24:48 -0500 (Fri, 20 May 2011) | 8 lines
Fixes issue with ast_tcptls_server_start failing on second attempt to bind.
(closes issue #19289)
Reported by: wdoekes
Patches:
issue19289_delay_old_address_setting_tcptls.patch uploaded by wdoekes (license 717)
........
Modified:
branches/1.8/ (props changed)
branches/1.8/main/tcptls.c
Propchange: branches/1.8/
------------------------------------------------------------------------------
Binary property 'branch-1.6.2-merged' - no diff available.
Modified: branches/1.8/main/tcptls.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/main/tcptls.c?view=diff&rev=320338&r1=320337&r2=320338
==============================================================================
--- branches/1.8/main/tcptls.c (original)
+++ branches/1.8/main/tcptls.c Fri May 20 16:39:36 2011
@@ -417,7 +417,8 @@
return NULL;
}
- ast_sockaddr_copy(&desc->old_address, &desc->remote_address);
+ /* If we return early, there is no connection */
+ ast_sockaddr_setnull(&desc->old_address);
if (desc->accept_fd != -1)
close(desc->accept_fd);
@@ -454,6 +455,8 @@
ast_sockaddr_copy(&tcptls_session->remote_address,
&desc->remote_address);
+ /* Set current info */
+ ast_sockaddr_copy(&desc->old_address, &desc->remote_address);
return tcptls_session;
error:
@@ -475,7 +478,8 @@
return;
}
- ast_sockaddr_copy(&desc->old_address, &desc->local_address);
+ /* If we return early, there is no one listening */
+ ast_sockaddr_setnull(&desc->old_address);
/* Shutdown a running server if there is one */
if (desc->master != AST_PTHREADT_NULL) {
@@ -521,6 +525,10 @@
strerror(errno));
goto error;
}
+
+ /* Set current info */
+ ast_sockaddr_copy(&desc->old_address, &desc->local_address);
+
return;
error:
More information about the asterisk-commits
mailing list