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

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Tue Dec 12 15:37:08 MST 2006


Author: rizzo
Date: Tue Dec 12 16:37:08 2006
New Revision: 48418

URL: http://svn.digium.com/view/asterisk?view=rev&rev=48418
Log:
fix a potential bug with 'invitestate' not being handled
properly when the other party requests authentication.
See a description on the -dev mailing list
http://lists.digium.com/pipermail/asterisk-dev/2006-December/025320.html

Although i am not 100% sure this is the proper fix,
this bug affects 1.4 and trunk as well.


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=48418&r1=48417&r2=48418
==============================================================================
--- team/rizzo/astobj2/channels/chan_sip.c (original)
+++ team/rizzo/astobj2/channels/chan_sip.c Tue Dec 12 16:37:08 2006
@@ -7869,7 +7869,7 @@
 {
 	struct sip_request resp;
 
-	if (sipmethod == SIP_ACK)
+	if (0 && sipmethod == SIP_ACK)
 		p->invitestate = INV_CONFIRMED;
 
 	reqprep(&resp, p, sipmethod, seqno, newbranch);
@@ -12335,6 +12335,7 @@
 		/* Then we AUTH */
 		ast_string_field_free(p, theirtag);	/* forget their old tag, so we don't match tags when getting response */
 		if (!req_ignore(req)) {
+			p->invitestate = INV_CALLING;	/* XXX reset state */
 			if (p->authtries == MAX_AUTHTRIES || do_proxy_auth(p, req, resp, SIP_INVITE, 1)) {
 				ast_log(LOG_NOTICE, "Failed to authenticate on INVITE to '%s'\n", get_header(&p->initreq, "From"));
 				set_destroy(p);	



More information about the asterisk-commits mailing list