Răsfoiți Sursa

- fixed via shortcut translations (sip_msg_cloner now fixes also received, rport & the i param)

Andrei Pelinescu-Onciul 22 ani în urmă
părinte
comite
5df85411a0
2 a modificat fișierele cu 20 adăugiri și 6 ștergeri
  1. 3 3
      Makefile.defs
  2. 17 3
      modules/tm/sip_msg.c

+ 3 - 3
Makefile.defs

@@ -13,19 +13,19 @@
 #              created by andrei
 #  2003-02-24  added LOCALBASE, fixed doc-dir for freebsd - patch provided
 #               by Maxim Sobolev <[email protected]>
-#  2003-02-25  added -DDISABLE_NAGLE
+#  2003-02-25  added -DDISABLE_NAGLE (andrei)
 #  2003-03-02  added -DDIGEST_DOMAIN (janakj)
 #  2003-03-10  added -xcode=pic32 for module compilation w/ sun cc
 #               (too many symbols for pic13)  (andrei)
 #  2003-04-16  added CC_EXTRA_OPTS, s/march/mcpu, added CPU (cpu to optimize 
-#               for, used only with gcc-3.x)
+#               for, used only with gcc-3.x) (andrei)
 
 
 #version number
 VERSION = 0
 PATCHLEVEL = 8
 SUBLEVEL =   11
-EXTRAVERSION = pre22
+EXTRAVERSION = pre23
 
 RELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
 OS = $(shell uname -s | sed -e s/SunOS/solaris/ | tr "[A-Z]" "[a-z]")

+ 17 - 3
modules/tm/sip_msg.c

@@ -43,6 +43,7 @@
  *  2003-02-28  scratchpad compatibility abandoned (jiri)
  *  2003-03-31  removed msg->repl_add_rm (andrei)
  *  2003-04-04  parsed uris are recalculated on cloning (jiri)
+ *  2003-05-07  received, rport & i via shortcuts are also translated (andrei)
  */
 
 #include "defs.h"
@@ -132,9 +133,22 @@ inline struct via_body* via_body_cloner( char* new_buf,
 				(*p) += ROUND4(sizeof(struct via_param));
 				new_vp->name.s=translate_pointer(new_buf,org_buf,vp->name.s);
 				new_vp->value.s=translate_pointer(new_buf,org_buf,vp->value.s);
-
-				if (new_vp->type==PARAM_BRANCH)
-					new_via->branch = new_vp;
+				
+				/* "translate" the shportcuts */
+				switch(new_vp->type){
+					case PARAM_BRANCH:
+							new_via->branch = new_vp;
+							break;
+					case PARAM_RECEIVED:
+							new_via->received = new_vp;
+							break;
+					case PARAM_RPORT:
+							new_via->rport = new_vp;
+							break;
+					case PARAM_I:
+							new_via->i = new_vp;
+							break;
+				}
 
 				if (last_new_vp)
 					last_new_vp->next = new_vp;