[asterisk-commits] dvossel: trunk r320340 - in /trunk: ./ main/tcptls.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri May 20 16:40:30 CDT 2011
Author: dvossel
Date: Fri May 20 16:40:19 2011
New Revision: 320340
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=320340
Log:
Merged revisions 320338 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8
................
r320338 | dvossel | 2011-05-20 16:39:36 -0500 (Fri, 20 May 2011) | 14 lines
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:
trunk/ (props changed)
trunk/main/tcptls.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.8-merged' - no diff available.
Modified: trunk/main/tcptls.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/tcptls.c?view=diff&rev=320340&r1=320339&r2=320340
==============================================================================
--- trunk/main/tcptls.c (original)
+++ trunk/main/tcptls.c Fri May 20 16:40:19 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