[asterisk-commits] rizzo: branch rizzo/astobj2 r47565 - /team/rizzo/astobj2/channels/chan_sip.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Mon Nov 13 11:18:59 MST 2006


Author: rizzo
Date: Mon Nov 13 12:18:58 2006
New Revision: 47565

URL: http://svn.digium.com/view/asterisk?view=rev&rev=47565
Log:
put missing braces around a block (caused the set_destroy()
to be executed unconditionally.

trunk candidate. maybe 1.4 as well.
Olle ?


Modified:
    team/rizzo/astobj2/channels/chan_sip.c

Modified: team/rizzo/astobj2/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/rizzo/astobj2/channels/chan_sip.c?view=diff&rev=47565&r1=47564&r2=47565
==============================================================================
--- team/rizzo/astobj2/channels/chan_sip.c (original)
+++ team/rizzo/astobj2/channels/chan_sip.c Mon Nov 13 12:18:58 2006
@@ -12546,10 +12546,11 @@
 			else if (p->registry && sipmethod == SIP_REGISTER)
 				res = handle_response_register(p, resp, rest, req, seqno);
 			else if (sipmethod == SIP_BYE) {
-				if (ast_strlen_zero(p->authname))
+				if (ast_strlen_zero(p->authname)) {
 					ast_log(LOG_WARNING, "Asked to authenticate %s, to %s:%d but we have no matching peer!\n",
 							msg, ast_inet_ntoa(p->recv.sin_addr), ntohs(p->recv.sin_port));
 					set_destroy(p);
+				}
 				if (p->authtries == MAX_AUTHTRIES || do_proxy_auth(p, req, 407, sipmethod, 0)) {
 					ast_log(LOG_NOTICE, "Failed to authenticate on %s to '%s'\n", msg, get_header(&p->initreq, "From"));
 					set_destroy(p);



More information about the asterisk-commits mailing list