dect
/
asterisk
Archived
13
0
Fork 0

Merged revisions 309084 via svnmerge from

https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r309084 | dvossel | 2011-03-01 10:09:11 -0600 (Tue, 01 Mar 2011) | 15 lines
  
  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
  ........
................


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@309090 f38db490-d61c-443f-a65b-d21fe96a405b
This commit is contained in:
dvossel 2011-03-01 16:22:27 +00:00
parent 8e9f381963
commit 2c1de73e58
1 changed files with 7 additions and 6 deletions

View File

@ -2607,14 +2607,15 @@ static void *_sip_tcp_helper_thread(struct sip_pvt *pvt, struct ast_tcptls_sessi
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");
}
if (packet) {
ao2_t_ref(packet, -1, "tcptls packet sent, this is no longer needed");
}
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");
}
break;
default:
ast_log(LOG_ERROR, "Unknown tcptls thread alert '%d'\n", alert);