Browse code

- fixed parse_via_param: params. starting with [op] had incorect name/len (thanks to Gabriel)

Andrei Pelinescu-Onciul authored on 25/06/2003 20:45:10
Showing 3 changed files
... ...
@@ -40,8 +40,9 @@
40 40
  *  2003-01-27  modified parse_via to set new via_param->start member and
41 41
  *               via->params.s (andrei)
42 42
  *  2003-01-28  zero-terminations replaced with VIA_ZT (jiri)
43
- *  2003-02-28 scratchpad compatibility abandoned (jiri)
44
- *  2003-04-26 ZSW (jiri)
43
+ *  2003-02-28  scratchpad compatibility abandoned (jiri)
44
+ *  2003-04-26  ZSW (jiri)
45
+ *  2003-06-23  fixed  parse_via_param [op].* param. parsing bug (andrei)
45 46
  */
46 47
 
47 48
 
... ...
@@ -646,6 +647,10 @@ static /*inline*/ char* parse_via_param(char* p, char* end,
646 647
 			case 'p':
647 648
 			case 'P':
648 649
 				switch(state){
650
+					case F_PARAM:
651
+						state=GEN_PARAM;
652
+						param->name.s=tmp;
653
+						break;
649 654
 					case RECEIVED1:
650 655
 						state=RPORT1;
651 656
 						break;
... ...
@@ -661,6 +666,10 @@ static /*inline*/ char* parse_via_param(char* p, char* end,
661 666
 			case 'o':
662 667
 			case 'O':
663 668
 				switch(state){
669
+					case F_PARAM:
670
+						state=GEN_PARAM;
671
+						param->name.s=tmp;
672
+						break;
664 673
 					case RPORT1:
665 674
 						state=RPORT2;
666 675
 						break;
... ...
@@ -88,12 +88,6 @@ struct tcp_connection{
88 88
 	int id; /* id (unique!) used to retrieve a specific connection when
89 89
 	           reply-ing*/
90 90
 	struct receive_info rcv; /* src & dst ip, ports, proto a.s.o*/
91
-#if 0
92
-	struct ip_addr ip; /* peer ip */
93
-	int port; /* peer port */
94
-	int sock_idx; /* receiving socket index in the tcp_info array */
95
-	union sockaddr_union su;
96
-#endif
97 91
 	struct tcp_req req; /* request data */
98 92
 	volatile int refcnt;
99 93
 	int bad; /* if set this is a "bad" connection */
... ...
@@ -118,7 +118,6 @@ struct tcp_connection* tcpconn_new(int sock, union sockaddr_union* su,
118 118
 {
119 119
 	struct tcp_connection *c;
120 120
 	
121
-
122 121
 	c=(struct tcp_connection*)shm_malloc(sizeof(struct tcp_connection));
123 122
 	if (c==0){
124 123
 		LOG(L_ERR, "ERROR: tcpconn_add: mem. allocation failure\n");