Browse code

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

Andrei Pelinescu-Onciul authored on 07/05/2003 14:11:21
Showing 2 changed files
... ...
@@ -13,19 +13,19 @@
13 13
 #              created by andrei
14 14
 #  2003-02-24  added LOCALBASE, fixed doc-dir for freebsd - patch provided
15 15
 #               by Maxim Sobolev <sobomax@FreeBSD.org>
16
-#  2003-02-25  added -DDISABLE_NAGLE
16
+#  2003-02-25  added -DDISABLE_NAGLE (andrei)
17 17
 #  2003-03-02  added -DDIGEST_DOMAIN (janakj)
18 18
 #  2003-03-10  added -xcode=pic32 for module compilation w/ sun cc
19 19
 #               (too many symbols for pic13)  (andrei)
20 20
 #  2003-04-16  added CC_EXTRA_OPTS, s/march/mcpu, added CPU (cpu to optimize 
21
-#               for, used only with gcc-3.x)
21
+#               for, used only with gcc-3.x) (andrei)
22 22
 
23 23
 
24 24
 #version number
25 25
 VERSION = 0
26 26
 PATCHLEVEL = 8
27 27
 SUBLEVEL =   11
28
-EXTRAVERSION = pre22
28
+EXTRAVERSION = pre23
29 29
 
30 30
 RELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
31 31
 OS = $(shell uname -s | sed -e s/SunOS/solaris/ | tr "[A-Z]" "[a-z]")
... ...
@@ -43,6 +43,7 @@
43 43
  *  2003-02-28  scratchpad compatibility abandoned (jiri)
44 44
  *  2003-03-31  removed msg->repl_add_rm (andrei)
45 45
  *  2003-04-04  parsed uris are recalculated on cloning (jiri)
46
+ *  2003-05-07  received, rport & i via shortcuts are also translated (andrei)
46 47
  */
47 48
 
48 49
 #include "defs.h"
... ...
@@ -132,9 +133,22 @@ inline struct via_body* via_body_cloner( char* new_buf,
132 133
 				(*p) += ROUND4(sizeof(struct via_param));
133 134
 				new_vp->name.s=translate_pointer(new_buf,org_buf,vp->name.s);
134 135
 				new_vp->value.s=translate_pointer(new_buf,org_buf,vp->value.s);
135
-
136
-				if (new_vp->type==PARAM_BRANCH)
137
-					new_via->branch = new_vp;
136
+				
137
+				/* "translate" the shportcuts */
138
+				switch(new_vp->type){
139
+					case PARAM_BRANCH:
140
+							new_via->branch = new_vp;
141
+							break;
142
+					case PARAM_RECEIVED:
143
+							new_via->received = new_vp;
144
+							break;
145
+					case PARAM_RPORT:
146
+							new_via->rport = new_vp;
147
+							break;
148
+					case PARAM_I:
149
+							new_via->i = new_vp;
150
+							break;
151
+				}
138 152
 
139 153
 				if (last_new_vp)
140 154
 					last_new_vp->next = new_vp;