Browse code

- fixed parse_via_param (now handles also ',')

Andrei Pelinescu-Onciul authored on 03/12/2001 20:22:07
Showing 2 changed files
... ...
@@ -31,16 +31,18 @@ NAME=ser
31 31
 # SHM_MEM    compiles in shared mem. support, needed by some modules and
32 32
 #            by USE_SHM_MEM
33 33
 # PKG_MALLOC uses a faster malloc (exclusive w/ USE_SHM_MEM)
34
-# USE_SHM_MEM all pkg_malloc => sh_malloc (most mallocs use a common sh. mem.
35
-#           segment); don't define PKG_MALLOC!
36
-DEFS=-DTHREAD -DNOCR -DMACROEATER -DDNS_IP_HACK  -DSHM_MEM -DUSE_SHM_MEM #-DNO_DEBUG 
34
+# USE_SHM_MEM all pkg_malloc => shm_malloc (most mallocs use a common sh. mem.
35
+#           segment); don't define PKG_MALLOC if you want this!
36
+DEFS=-DTHREAD -DNOCR -DMACROEATER -DDNS_IP_HACK  -DSHM_MEM -DUSE_SHM_MEM \
37
+	 -DPKG_MALLOC -DNO_DEBUG
38
+#-DNO_DEBUG 
37 39
 #-DPKG_MALLOC
38 40
 #-DNO_DEBUG#-DSTATS -DNO_DEBUG 
39 41
 #-DNO_LOG
40 42
 
41 43
 PROFILE=  # -pg #set this if you want profiling
42
-mode = debug
43
-#mode = release
44
+#mode = debug
45
+mode = release
44 46
 
45 47
 # platform dependent settings
46 48
 
... ...
@@ -700,7 +700,25 @@ find_value:
700 700
 						goto error;
701 701
 				}
702 702
 				break;
703
-			
703
+			case ',':
704
+				switch(state){
705
+					case P_VALUE:
706
+						*tmp=0;
707
+						param->value.len=tmp-param->value.s;
708
+						state=F_VIA;
709
+						goto endofvalue;
710
+					case P_STRING:
711
+						case F_LF:
712
+					case F_CR:
713
+					case F_CRLF:
714
+						state=END_OF_HEADER;
715
+						goto end_via;
716
+					default:
717
+						LOG(L_ERR, "ERROR: parse_via: invalid char <%c>"
718
+								" in state %d\n", state);
719
+						goto error;
720
+				}
721
+				break; /* what to do? */
704 722
 			case '"':
705 723
 				switch(state){
706 724
 					case F_VALUE: