Bläddra i källkod

- removed msg->repl_add_rm (msg->add_rm is used both for request & replies)

Andrei Pelinescu-Onciul 22 år sedan
förälder
incheckning
9ab18c5a30
2 ändrade filer med 22 tillägg och 28 borttagningar
  1. 7 14
      modules/tm/sip_msg.c
  2. 15 14
      modules/tm/t_reply.c

+ 7 - 14
modules/tm/sip_msg.c

@@ -37,10 +37,11 @@
  *
  * History:
  * --------
- * 2003-02-28 scratchpad compatibility abandoned (jiri)
- * 2003-02-25 - auth_body cloner added (janakj)
- * 2003-01-29 - scratchpad removed (jiri)
- * 2003-01-23 - msg_cloner clones msg->from->parsed too (janakj)
+ *  2003-02-28  scratchpad compatibility abandoned (jiri)
+ *  2003-02-25 - auth_body cloner added (janakj)
+ *  2003-01-29 - scratchpad removed (jiri)
+ *  2003-01-23 - msg_cloner clones msg->from->parsed too (janakj)
+ *  2003-03-31  removed msg->repl_add_rm (andrei)
  */
 
 #include "defs.h"
@@ -299,10 +300,7 @@ struct sip_msg*  sip_msg_cloner( struct sip_msg *org_msg )
 	}/*for all headers*/
 
 	/* length of the data lump structures */
-	if (org_msg->first_line.type==SIP_REQUEST)
-		lump_chain = org_msg->add_rm;
-	else
-		lump_chain = org_msg->repl_add_rm;
+	lump_chain = org_msg->add_rm;
 	while (lump_chain)
 	{
 		len += lump_len( lump_chain );
@@ -337,7 +335,7 @@ struct sip_msg*  sip_msg_cloner( struct sip_msg *org_msg )
 	/* sip msg structure */
 	memcpy( new_msg , org_msg , sizeof(struct sip_msg) );
 	p += ROUND4(sizeof(struct sip_msg));
-	new_msg->add_rm = new_msg->repl_add_rm = 0;
+	new_msg->add_rm = 0;
 	/* new_uri */
 	if (org_msg->new_uri.s && org_msg->new_uri.len)
 	{
@@ -572,13 +570,8 @@ struct sip_msg*  sip_msg_cloner( struct sip_msg *org_msg )
 	}
 
 	/* clonning data lump */
-	if (org_msg->first_line.type==SIP_REQUEST) {
 		lump_chain = org_msg->add_rm;
 		lump_anchor = &(new_msg->add_rm);
-	}else{
-		lump_chain = org_msg->repl_add_rm;
-		lump_anchor = &(new_msg->repl_add_rm);
-	}
 	while (lump_chain)
 	{
 		lump_clone( (*lump_anchor) , lump_chain , p );

+ 15 - 14
modules/tm/t_reply.c

@@ -27,19 +27,20 @@
  *
  * History:
  * --------
- * 2003-03-31  200 for INVITE/UAS resent even for UDP (jiri)
- * 2003-03-16  removed _TOTAG (jiri)
- * 2003-03-10  fixed new to tag bug/typo (if w/o {})  (andrei)
- * 2003-03-06  saving of to-tags for ACK/200 matching introduced, 
- *             voicemail changes accepted, udpated to new callback
- *             names (jiri)
- * 2003-03-01  kr set through a function now (jiri)
- * 2003-02-28 scratchpad compatibility abandoned (jiri)
- * 2003-02-18  replaced TOTAG_LEN w/ TOTAG_VALUE_LEN (TOTAG_LEN was defined
- *             twice with different values!)  (andrei)
- * 2003-02-13  updated to use rb->dst (andrei)
- * 2003-01-27  next baby-step to removing ZT - PRESERVE_ZT (jiri)
- * 2003-01-19  faked lump list created in on_reply handlers
+ *  2003-01-19  faked lump list created in on_reply handlers
+ *  2003-01-27  next baby-step to removing ZT - PRESERVE_ZT (jiri)
+ *  2003-02-13  updated to use rb->dst (andrei)
+ *  2003-02-18  replaced TOTAG_LEN w/ TOTAG_VALUE_LEN (TOTAG_LEN was defined
+ *               twice with different values!)  (andrei)
+ *  2003-02-28  scratchpad compatibility abandoned (jiri)
+ *  2003-03-01  kr set through a function now (jiri)
+ *  2003-03-06  saving of to-tags for ACK/200 matching introduced, 
+ *              voicemail changes accepted, udpated to new callback
+ *              names (jiri)
+ *  2003-03-10  fixed new to tag bug/typo (if w/o {})  (andrei)
+ *  2003-03-16  removed _TOTAG (jiri)
+ *  2003-03-31  200 for INVITE/UAS resent even for UDP (jiri)
+ *  2003-03-31  removed msg->repl_add_rm (andrei)
  */
 
 
@@ -858,7 +859,7 @@ enum rps relay_reply( struct cell *t, struct sip_msg *p_msg, int branch,
 			   structure
 			*/
 			if (branch!=relay) {
-				free_via_lump(&relayed_msg->repl_add_rm);
+				free_via_lump(&relayed_msg->add_rm);
 			}
 		}
 		update_reply_stats( relayed_code );