Browse code

- fixed parse via param bug on";hidden,"

Andrei Pelinescu-Onciul authored on 20/03/2002 19:58:31
Showing 3 changed files
... ...
@@ -87,7 +87,7 @@ DEFS+= -DNAME='"$(NAME)"' -DVERSION='"$(RELEASE)"' -DARCH='"$(ARCH)"' \
87 87
 	 -DWAIT -DNEW_HNAME \
88 88
 	 -DSILENT_FR \
89 89
 	 -DNO_DEBUG \
90
-	 -DVERY_NOISY_REPLIES\
90
+	 #-DVERY_NOISY_REPLIES\
91 91
 	 #-DNOISY_REPLIES \
92 92
 	 #-DADAPTIVE_WAIT -DADAPTIVE_WAIT_LOOPS=0 \
93 93
 	 #-DNOSMP \
... ...
@@ -254,6 +254,36 @@ char* parse_via_param(	char* p, char* end, int* pstate,
254 254
 						goto endofparam;
255 255
 				}
256 256
 				break;
257
+			case ',':
258
+				switch(state){
259
+					case FIN_HIDDEN:
260
+						*tmp=0;
261
+						param->type=state;
262
+						param->name.len=tmp-param->name.s;
263
+						state=F_VIA;
264
+						goto endofvalue;
265
+					case FIN_BRANCH:
266
+					case FIN_MADDR:
267
+					case FIN_TTL:
268
+					case FIN_RECEIVED:
269
+						LOG(L_ERR, "ERROR: parse_via_param: new via found" 
270
+								"(',') when '=' expected (state %d=)\n",
271
+								state);
272
+						goto error; /* or we could ignore this bad param*/
273
+					case F_CR:
274
+					case F_LF:
275
+					case F_CRLF:
276
+						state=END_OF_HEADER;
277
+						goto end_via;
278
+					case GEN_PARAM:
279
+					default:
280
+						*tmp=0;
281
+						param->type=GEN_PARAM;
282
+						param->name.len=tmp-param->name.s;
283
+						state=F_VIA;
284
+						goto endofvalue;
285
+				}
286
+				break; 
257 287
 
258 288
 				/* param names */
259 289
 			case 'h':
... ...
@@ -5,7 +5,7 @@
5 5
 #
6 6
 
7 7
 
8
-debug=3          # debug level (cmd line: -dddddddddd)
8
+debug=9          # debug level (cmd line: -dddddddddd)
9 9
 #fork=yes          # (cmd. line: -D)
10 10
 fork=yes
11 11
 fork=no
... ...
@@ -21,7 +21,7 @@ rev_dns=off      # (cmd. line: -R)
21 21
 #listen=10.0.0.179
22 22
 #listen=127.0.0.1
23 23
 #listen=192.168.57.33
24
-listen=192.168.57.72
24
+#listen=192.168.57.72
25 25
 loop_checks=0
26 26
 # for more info: sip_router -h
27 27