[svn-commits] mmichelson: branch 1.6.2 r199966 - in /branches/1.6.2: ./ channels/chan_sip.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed Jun 10 15:18:45 CDT 2009


Author: mmichelson
Date: Wed Jun 10 15:18:39 2009
New Revision: 199966

URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=199966
Log:
Merged revisions 199958 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

........
  r199958 | mmichelson | 2009-06-10 15:15:48 -0500 (Wed, 10 Jun 2009) | 6 lines
  
  Only try to use the invite_branch on outgoing INVITEs with auth credentials.
  
  I have added a comment to the code to help ease understanding of the logic here
  as well.
........

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

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

Modified: branches/1.6.2/channels/chan_sip.c
URL: http://svn.asterisk.org/svn-view/asterisk/branches/1.6.2/channels/chan_sip.c?view=diff&rev=199966&r1=199965&r2=199966
==============================================================================
--- branches/1.6.2/channels/chan_sip.c (original)
+++ branches/1.6.2/channels/chan_sip.c Wed Jun 10 15:18:39 2009
@@ -8745,7 +8745,11 @@
 		seqno = p->ocseq;
 	}
 	
-	if (sipmethod == SIP_CANCEL || sipmethod == SIP_INVITE) {
+	/* A CANCEL must have the same branch as the INVITE that it is canceling.
+	 * Similarly, if we need to re-send an INVITE with auth credentials, then we
+	 * need to use the same branch as we did the first time we sent the INVITE.
+	 */
+	if (sipmethod == SIP_CANCEL || (sipmethod == SIP_INVITE && !ast_strlen_zero(p->options->auth))) {
 		p->branch = p->invite_branch;
 		build_via(p);
 	} else if (newbranch) {




More information about the svn-commits mailing list