[asterisk-commits] dvossel: trunk r284562 - in /trunk: ./ channels/chan_sip.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Sep 1 16:48:36 CDT 2010


Author: dvossel
Date: Wed Sep  1 16:48:32 2010
New Revision: 284562

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

........
  r284561 | dvossel | 2010-09-01 16:47:01 -0500 (Wed, 01 Sep 2010) | 9 lines
  
  During request to dialog matching, verify init_ruri is present before comparing.
  
  During request to dialog matching, we attempt a best effort routine for fork
  detection which requires several elements to be in place.  The dialog's
  initial request uri is one of those elements.  Since it is best effort,
  if the init_ruri is not present for some reason we can not proceed with that
  routine.
........

Modified:
    trunk/   (props changed)
    trunk/channels/chan_sip.c

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

Modified: trunk/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_sip.c?view=diff&rev=284562&r1=284561&r2=284562
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Wed Sep  1 16:48:32 2010
@@ -7204,7 +7204,10 @@
  */
 static enum match_req_res match_req_to_dialog(struct sip_pvt *sip_pvt_ptr, struct match_req_args *arg)
 {
-	const char *init_ruri = REQ_OFFSET_TO_STR(&sip_pvt_ptr->initreq, rlPart2);
+	const char *init_ruri = NULL;
+	if (sip_pvt_ptr->initreq.headers) {
+		init_ruri = REQ_OFFSET_TO_STR(&sip_pvt_ptr->initreq, rlPart2);
+	}
 
 	/*
 	 * Match Tags and call-id to Dialog
@@ -7263,8 +7266,8 @@
 	if ((arg->method != SIP_RESPONSE) &&                 /* must be a Request */
 		ast_strlen_zero(arg->totag) &&                   /* must not have a totag */
 		(sip_pvt_ptr->init_icseq == arg->seqno) &&       /* the cseq must be the same as this dialogs initial cseq */
-		!ast_strlen_zero(sip_pvt_ptr->initviabranch)) {  /* The dialog must have started with a RFC3261 compliant branch tag */
-
+		!ast_strlen_zero(sip_pvt_ptr->initviabranch) &&  /* The dialog must have started with a RFC3261 compliant branch tag */
+		init_ruri) {                                     /* the dialog must have an initial request uri associated with it */
 		/* This Request matches all the criteria required for Loop/Merge detection.
 		 * Now we must go down the path of comparing VIA's and RURIs. */
 		if (ast_strlen_zero(arg->viabranch) ||




More information about the asterisk-commits mailing list