[svn-commits] dvossel: branch 1.8 r309084 - in /branches/1.8: ./ channels/chan_sip.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Tue Mar 1 10:09:19 CST 2011


Author: dvossel
Date: Tue Mar  1 10:09:11 2011
New Revision: 309084

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=309084
Log:
Merged revisions 309083 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

........
  r309083 | dvossel | 2011-03-01 10:05:25 -0600 (Tue, 01 Mar 2011) | 9 lines
  
  Fixes thread blocking issue in the sip TCP/TLS implementation.
  
  (closes issue #18497)
  Reported by: vois
  Patches:
        issues_18497.diff uploaded by dvossel (license 671)
  Tested by: vois, rossbeer, kowalma, Freddi_Fonet
........

Modified:
    branches/1.8/   (props changed)
    branches/1.8/channels/chan_sip.c

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

Modified: branches/1.8/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/channels/chan_sip.c?view=diff&rev=309084&r1=309083&r2=309084
==============================================================================
--- branches/1.8/channels/chan_sip.c (original)
+++ branches/1.8/channels/chan_sip.c Tue Mar  1 10:09:11 2011
@@ -2589,14 +2589,15 @@
 				ao2_lock(me);
 				if (!(packet = AST_LIST_REMOVE_HEAD(&me->packet_q, entry))) {
 					ast_log(LOG_WARNING, "TCPTLS thread alert_pipe indicated packet should be sent, but frame_q is empty");
-				} else if (ast_tcptls_server_write(tcptls_session, ast_str_buffer(packet->data), packet->len) == -1) {
-					ast_log(LOG_WARNING, "Failure to write to tcp/tls socket\n");
 				}
+				ao2_unlock(me);
 
 				if (packet) {
+					if (ast_tcptls_server_write(tcptls_session, ast_str_buffer(packet->data), packet->len) == -1) {
+						ast_log(LOG_WARNING, "Failure to write to tcp/tls socket\n");
+					}
 					ao2_t_ref(packet, -1, "tcptls packet sent, this is no longer needed");
 				}
-				ao2_unlock(me);
 				break;
 			default:
 				ast_log(LOG_ERROR, "Unknown tcptls thread alert '%d'\n", alert);




More information about the svn-commits mailing list