2
0
Эх сурвалжийг харах

*** empty log message ***

Bogdan-Andrei Iancu 23 жил өмнө
parent
commit
7ed9a7513b

+ 1 - 0
Makefile.defs

@@ -88,6 +88,7 @@ DEFS+= -DNAME='"$(NAME)"' -DVERSION='"$(RELEASE)"' -DARCH='"$(ARCH)"' \
 	 -DSILENT_FR \
 	 -DSILENT_FR \
 	 -DUSE_IPV6 \
 	 -DUSE_IPV6 \
 	 -DNOISY_REPLIES -DVERY_NOISY_REPLIES\
 	 -DNOISY_REPLIES -DVERY_NOISY_REPLIES\
+	 -DPINGTEL_TAG_HACK\
  	 #-DUSE_SYNONIM\
  	 #-DUSE_SYNONIM\
 	 #-DNO_DEBUG \
 	 #-DNO_DEBUG \
 	 #-DADAPTIVE_WAIT -DADAPTIVE_WAIT_LOOPS=0 \
 	 #-DADAPTIVE_WAIT -DADAPTIVE_WAIT_LOOPS=0 \

+ 4 - 9
parser/parse_to.c

@@ -213,7 +213,7 @@ char* parse_to_param(char *buffer, char *end, struct to_body *to_b,
 					case S_EQUAL:
 					case S_EQUAL:
 					case S_PARA_VALUE:
 					case S_PARA_VALUE:
 						if (param->type==TAG_PARAM)
 						if (param->type==TAG_PARAM)
-							param->value.s = tmp-1;
+							param->value.s = tmp;
 						else {
 						else {
 							LOG( L_ERR , "ERROR: parse_to_param : unexpected "
 							LOG( L_ERR , "ERROR: parse_to_param : unexpected "
 								"char [%c] in status %d: <<%.*s>> .\n",
 								"char [%c] in status %d: <<%.*s>> .\n",
@@ -222,7 +222,7 @@ char* parse_to_param(char *buffer, char *end, struct to_body *to_b,
 						}
 						}
 #endif
 #endif
 					case PARA_VALUE_TOKEN:
 					case PARA_VALUE_TOKEN:
-						param->value.len=tmp-param->value.s-1;
+						param->value.len=tmp-param->value.s;
 						add_param(param,to_b);
 						add_param(param,to_b);
 					case PARA_START:
 					case PARA_START:
 						*tmp=0;
 						*tmp=0;
@@ -413,15 +413,11 @@ char* parse_to_param(char *buffer, char *end, struct to_body *to_b,
 
 
 endofheader:
 endofheader:
 #ifdef PINGTEL_TAG_HACK
 #ifdef PINGTEL_TAG_HACK
-	if (param->type==TAG_PARAM ) {
-		if (saved_status==S_EQUAL||saved_status==S_PARA_VALUE) {
+	if (param->type==TAG_PARAM 
+	&& (saved_status==S_EQUAL||saved_status==S_PARA_VALUE) ) {
 			saved_status = E_PARA_VALUE;
 			saved_status = E_PARA_VALUE;
 			param->value.s=(char*)param->value.len=0;
 			param->value.s=(char*)param->value.len=0;
 			add_param(param, to_b);
 			add_param(param, to_b);
-		} else {
-			DBG("HELLO\n");
-			goto error;
-		}
 	}
 	}
 #endif
 #endif
 	*returned_status=saved_status;
 	*returned_status=saved_status;
@@ -674,7 +670,6 @@ char* parse_to(char* buffer, char *end, struct to_body *to_b)
 	}/*for*/
 	}/*for*/
 
 
 endofheader:
 endofheader:
-	DBG("DEBUG: status = %d \n",status);
 	status=saved_status;
 	status=saved_status;
 	DBG("end of header reached, state=%d\n", status);
 	DBG("end of header reached, state=%d\n", status);
 	/* check if error*/
 	/* check if error*/

+ 1 - 1
test/message.sip

@@ -1,7 +1,7 @@
 MESSAGE sip:[email protected] SIP/2.0
 MESSAGE sip:[email protected] SIP/2.0
 Via: SIP/2.0/UDP 195.37.78.169:11457
 Via: SIP/2.0/UDP 195.37.78.169:11457
 From: "bogdan" <sip:[email protected]>;tag=0e99b1e7-ff50-4875-94ef-4ca5c27e2705
 From: "bogdan" <sip:[email protected]>;tag=0e99b1e7-ff50-4875-94ef-4ca5c27e2705
-To: sip:[email protected];tag=
+To: sip:[email protected];cucu=bau;tag=xyz
 Call-ID: [email protected]
 Call-ID: [email protected]
 CSeq: 7 MESSAGE
 CSeq: 7 MESSAGE
 Contact: <sip:195.37.78.169:11457>
 Contact: <sip:195.37.78.169:11457>

+ 4 - 2
test/th-uri.cfg

@@ -6,8 +6,8 @@
 
 
 
 
 debug=9          # debug level (cmd line: -dddddddddd)
 debug=9          # debug level (cmd line: -dddddddddd)
-fork=yes          # (cmd. line: -D)
-#fork=no
+#fork=yes          # (cmd. line: -D)
+fork=no
 log_stderror=yes  # (cmd line: -E)
 log_stderror=yes  # (cmd line: -E)
 #log_stderror=no   # (cmd line: -E)
 #log_stderror=no   # (cmd line: -E)
 
 
@@ -38,6 +38,8 @@ loadmodule "modules/pike/pike.so"
 #modparam("sms","networks","  D1 [c=491710765000;m=10] ;d2[ c=3456;m=20]")
 #modparam("sms","networks","  D1 [c=491710765000;m=10] ;d2[ c=3456;m=20]")
 #modparam("sms","links","NOKIA[D1;d2]")
 #modparam("sms","links","NOKIA[D1;d2]")
 
 
+modparam("pike","timeout",30)
+
 route{
 route{
 	sl_filter_ACK();
 	sl_filter_ACK();