[sr-dev] git:master:b64a2587: core: remove old code for BRANCH_IGNORE_3261_VIA and BRANCH_INCLUDE_FROMTO_BODY

Henning Westerholt hw at kamailio.org
Sun Oct 7 10:08:37 CEST 2018


Module: kamailio
Branch: master
Commit: b64a25874e376c00ce60570117d33550af568497
URL: https://github.com/kamailio/kamailio/commit/b64a25874e376c00ce60570117d33550af568497

Author: Henning Westerholt <hw at kamailio.org>
Committer: Henning Westerholt <hw at kamailio.org>
Date: 2018-10-07T09:56:59+02:00

core: remove old code for BRANCH_IGNORE_3261_VIA and BRANCH_INCLUDE_FROMTO_BODY

- remove old code for BRANCH_IGNORE_3261_VIA and BRANCH_INCLUDE_FROMTO_BODY
- this was used in pre-3.1 version times and deactivated in #ifdef since 2010

---

Modified: src/core/char_msg_val.h

---

Diff:  https://github.com/kamailio/kamailio/commit/b64a25874e376c00ce60570117d33550af568497.diff
Patch: https://github.com/kamailio/kamailio/commit/b64a25874e376c00ce60570117d33550af568497.patch

---

diff --git a/src/core/char_msg_val.h b/src/core/char_msg_val.h
index 4d6887d713..79461cd836 100644
--- a/src/core/char_msg_val.h
+++ b/src/core/char_msg_val.h
@@ -18,14 +18,6 @@
  * @file
  * @ingroup core
  * \author andrei
- *
- * Defines:
- *  BRANCH_INCLUDE_FROMTO_BODY - if defined the old (pre 3.1) mode of
- *   including the full from & to bodies will be used (instead of only the
- *   tags).
- * BRANCH_IGNORE_3261_VIA - if defined, no check and special/simpler handling
- *   of messages with 3261 cookies in the via branch will be made (same
- *   behaviour as in pre 3.1 versions).
 */
 
 #ifndef __char_msg_val_h
@@ -52,20 +44,6 @@ inline static int char_msg_val( struct sip_msg *msg, char *cv )
 		memset( cv, '0', MD5_LEN );
 		return 0;
 	}
-#ifndef BRANCH_IGNORE_3261_VIA
-	if (likely(msg->via1->branch && msg->via1->branch->value.len>MCOOKIE_LEN &&
-				memcmp(msg->via1->branch->value.s, MCOOKIE, MCOOKIE_LEN)==0)){
-		/* 3261 branch cookie present => hash only the received branch ID */
-		src[0]=msg->via1->branch->value;
-		MD5StringArray ( cv, src, 1 );
-		return 1; /* success */
-	}
-#endif /* BRANCH_IGNORE_3261_VIA */
-#ifdef BRANCH_INCLUDE_FROMTO_BODY
-	/* use the from & to full bodies */
-	src[0]= msg->from->body;
-	src[1]= msg->to->body;
-#else
 	/* to body is automatically parsed (via check_transactionquadruple / 
 	   parse_header), but the from body has to be parsed manually */
 	if (msg->from->parsed==0){
@@ -78,7 +56,6 @@ inline static int char_msg_val( struct sip_msg *msg, char *cv )
 	/* use only the from & to tags */
 	src[0]=get_from(msg)->tag_value;
 	src[1]=get_to(msg)->tag_value;
-#endif /* BRANCH_INCLUDE_FROMTO_BODY */
 	src[2]= msg->callid->body;
 	src[3]= msg->first_line.u.request.uri;
 	src[4]= get_cseq( msg )->number;




More information about the sr-dev mailing list