Explorar o código

test/: add a space between comma and quote

Дилян Палаузов %!s(int64=2) %!d(string=hai) anos
pai
achega
dfddb4b763

+ 1 - 1
test/misc/cfg/acc-test.cfg

@@ -98,7 +98,7 @@ route{
 	log("LOG: Checking maxfwd\n");
 	if (!mf_process_maxfwd_header("10")) {
 		log("LOG: Too many hops\n");
-		sl_send_reply("483","Too Many Hops");
+		sl_send_reply("483", "Too Many Hops");
 		break;
 	};
 

+ 1 - 1
test/misc/cfg/gen.cfg

@@ -33,7 +33,7 @@ route{
 
 	if ( !mf_process_maxfwd_header("10") )
 	{
-		sl_send_reply("483","To Many Hops");
+		sl_send_reply("483", "To Many Hops");
 		drop();
 	};
 

+ 1 - 1
test/misc/cfg/mobile61.cfg

@@ -5,7 +5,7 @@ route{
 	(src_ip=~'(dorian)|(ekina)|(terix)' & method=~'^inv') \
 				forward(centauri.fokus.gmd.de);
 	src_ip=~"^192\.168\.[0-9]{1,3}\.[0-9]{1,3}$"  \
-				log(1,"msg. from a private network\n"); route(1);
+				log(1, "msg. from a private network\n"); route(1);
 	src_ip==0.0.0.0/0   log(1, " droping msg\n"); drop;
 }
 

+ 2 - 2
test/misc/cfg/nc.cfg

@@ -14,11 +14,11 @@ loadmodule "/home/srouter/sip_router/modules/textops/textops.so"
 
 route {
 	if (!search("^(From|f)\:.*sip\:[0-9]+@")) {
-		  log(1," From non-nummerical\n");
+		  log(1, " From non-nummerical\n");
           sl_send_reply("400", "entry nummerical from check failed\n");
           break;
     };
-    log(1," From nummerical\n");
+    log(1, " From nummerical\n");
     sl_send_reply("200", "entry nummerical from check ok\n");
 }
 

+ 1 - 1
test/misc/cfg/ser.cfg

@@ -22,7 +22,7 @@ route{
 	if (src_ip=~'(dorian)|(ekina)|(terix)' & method=~'^inv')
 				forward(centauri.fokus.gmd.de);
 	if src_ip=~"^192\.168\.[0-9]{1,3}\.[0-9]{1,3}$" {
-			log(1,"msg. from a private network\n");
+			log(1, "msg. from a private network\n");
 			route(1);
 			log(1, "after route(1)\n");
 			break;

+ 1 - 1
test/misc/cfg/stress.cfg

@@ -45,7 +45,7 @@ route{
 	append_branch("sip:[email protected]:5088");
 	append_branch("sip:[email protected]:5088");
 	t_on_negative("1");
-	t_relay_to("bat.iptel.org","5088");
+	t_relay_to("bat.iptel.org", "5088");
 }
 
 reply_route[1] {

+ 1 - 1
test/misc/cfg/test1.cfg

@@ -20,7 +20,7 @@ route{
 	( uri=~"test\n" &  ! src_ip=~"dorian") forward(dorian.fokus.gmd.de);
 
 	(src_ip==192.168.0.0/255.255.0.0 or dst_ip==127.0.0.1 and uri=~"s$") \
-		error("440","not forwarding"); log(2,"droping..."); drop;
+		error("440", "not forwarding"); log(2, "droping..."); drop;
 
 	src_ip==127.0.0.1 route(3); drop;
 }

+ 12 - 12
test/misc/cfg/th-uri.cfg

@@ -24,18 +24,18 @@ loadmodule "modules/im/im.so"
 loadmodule "modules/sms/sms.so"
 
 
-modparam("sms","modems","Falcom [d=/dev/ttyS1;b=9600;p=9254;m=new;l=2;r=1] ")
-modparam("sms","networks","D1[c=491710765000;m=10]")
-modparam("sms","links","Falcom[D1] ")
-#modparam("sms","domain","hope.fokus.gmd.de")
-modparam("sms","max_sms_parts",3)
-modparam("sms","use_contact",1)
-modparam("sms","sms_report_type",2)
+modparam("sms", "modems", "Falcom [d=/dev/ttyS1;b=9600;p=9254;m=new;l=2;r=1] ")
+modparam("sms", "networks", "D1[c=491710765000;m=10]")
+modparam("sms", "links", "Falcom[D1] ")
+#modparam("sms", "domain", "hope.fokus.gmd.de")
+modparam("sms", "max_sms_parts", 3)
+modparam("sms", "use_contact", 1)
+modparam("sms", "sms_report_type", 2)
 
 route{
 	if ( !mf_process_maxfwd_header("10") )
 	{
-		sl_send_reply("483","To Many Hops");
+		sl_send_reply("483", "To Many Hops");
 		drop();
 	};
 
@@ -47,18 +47,18 @@ route{
 			log("MESSAGE received -> sending as sms\n");
 			if (sms_send_msg_to_net("D1"))
 			{
-				sl_send_reply("200","Accepted");
+				sl_send_reply("200", "Accepted");
 			}else{
-				sl_send_reply("502","Bad gateway");
+				sl_send_reply("502", "Bad gateway");
 			};
 		}else{
 			log("NON_Message request received for sms gateway->dropt!\n");
-			sl_send_reply("501","Not implemented");
+			sl_send_reply("501", "Not implemented");
 		};
 		break;
 	};
 
 
-	sl_send_reply("502","Not Implemented");
+	sl_send_reply("502", "Not Implemented");
 	#forward(uri:host,uri:port);
 }

+ 8 - 8
test/misc/cfg/use_jab.cfg

@@ -31,15 +31,15 @@ loadmodule "modules/sl/sl.so"
 loadmodule "modules/jabber/jabber.so"
 #loadmodule "modules/cpl/cpl.so"
 
-modparam("jabber","jaddress","gorn.fokus.gmd.de")
-modparam("jabber","jport",5222)
+modparam("jabber", "jaddress", "gorn.fokus.gmd.de")
+modparam("jabber", "jport", 5222)
 
 route{
 	sl_filter_ACK();
 
 	if ( !mf_process_maxfwd_header("10") )
 	{
-		sl_send_reply("483","To Many Hops");
+		sl_send_reply("483", "To Many Hops");
 		drop();
 	};
 
@@ -52,12 +52,12 @@ route{
 			log("SER : Error during running CPL script!\n");
 		}else{
 			if ( cpl_is_response_reject() ) {
-				sl_send_reply("603","I am not available!");
+				sl_send_reply("603", "I am not available!");
 				drop();
 			}else if ( cpl_is_response_redirect() ) {
 				log("SER : redirect\n");
 				cpl_update_contact();
-				sl_send_reply("302","Moved temporarily");
+				sl_send_reply("302", "Moved temporarily");
 				drop();
 			};
 		};
@@ -71,13 +71,13 @@ route{
 			log("MESSAGE received -> sending as JABBER\n");
 			if (jab_send_message())
 			{
-				sl_send_reply("202","Accepted");
+				sl_send_reply("202", "Accepted");
 			}else{
-				sl_send_reply("502","Bad gateway");
+				sl_send_reply("502", "Bad gateway");
 			};
 		}else{
 			log("NON_Message request received for JABBER gateway->dropt!\n");
-			sl_send_reply("501","Not implemented");
+			sl_send_reply("501", "Not implemented");
 		};
 		break;
 	};

+ 1 - 1
test/unit/11.cfg

@@ -37,7 +37,7 @@ modparam("usrloc", "db_url", DBURL)
 request_route {
 
 	if (!mf_process_maxfwd_header("10")) {
-		sl_send_reply("483","Too Many Hops");
+		sl_send_reply("483", "Too Many Hops");
 		exit;
 	}
 

+ 1 - 1
test/unit/13.cfg

@@ -17,7 +17,7 @@ modparam("mi_fifo", "fifo_name", "/tmp/kamailio_fifo")
 request_route {
 	# initial sanity checks
 	if (!mf_process_maxfwd_header("10")) {
-		sl_send_reply("483","Too Many Hops");
+		sl_send_reply("483", "Too Many Hops");
 		return;
 	};
 	cr_user_carrier("$fU", "$fd", "$avp(s:11)");

+ 1 - 1
test/unit/14.cfg

@@ -12,7 +12,7 @@ modparam("carrierroute", "config_file", "carrierroute.cfg")
 request_route {
 	# initial sanity checks
 	if (!mf_process_maxfwd_header("10")) {
-		sl_send_reply("483","Too Many Hops");
+		sl_send_reply("483", "Too Many Hops");
 		return;
 	};
 	if (method == "REGISTER") {

+ 1 - 1
test/unit/19.cfg

@@ -31,7 +31,7 @@ modparam("usrloc", "db_url", "mysql://kamailio:kamailiorw@localhost/kamailio")
 #-----------------------Routing configuration---------------------------------#
 request_route{
 	if (!mf_process_maxfwd_header("10")) {
-		sl_send_reply("483","Too Many Hops");
+		sl_send_reply("483", "Too Many Hops");
 		exit();
 	}
 

+ 1 - 1
test/unit/20.cfg

@@ -35,7 +35,7 @@ modparam("db_mysql", "timeout_interval", 2)
 
 request_route {
 	if (!mf_process_maxfwd_header("10")) {
-		sl_send_reply("483","Too Many Hops");
+		sl_send_reply("483", "Too Many Hops");
 		exit;
 	}
 

+ 3 - 3
test/unit/21.cfg

@@ -70,7 +70,7 @@ route{
 
 	if (is_method("ACK")) {
 		xlog("ACK\n");
-		sl_send_reply("200","OK");
+		sl_send_reply("200", "OK");
 		exit;
 	}
 
@@ -80,7 +80,7 @@ route{
 				www_challenge("localhost", "0");
 			} else {
 				if(check_to() && check_from()) {
-					sl_send_reply("200","OK");
+					sl_send_reply("200", "OK");
 				}
 			}
 		} else {
@@ -88,7 +88,7 @@ route{
 				proxy_challenge("localhost", "0");
 			} else {
 				if(check_to() && check_from() && does_uri_exist()) {
-					sl_send_reply("200","OK");
+					sl_send_reply("200", "OK");
 				}
 			}
 		}

+ 1 - 1
test/unit/22.cfg

@@ -31,7 +31,7 @@ modparam("usrloc", "db_url", "postgres://kamailio:kamailiorw@localhost/kamailio"
 request_route {
 
 	if (!mf_process_maxfwd_header("10")) {
-		sl_send_reply("483","Too Many Hops");
+		sl_send_reply("483", "Too Many Hops");
 		exit;
 	}
 

+ 1 - 1
test/unit/25.cfg

@@ -21,7 +21,7 @@ request_route {
 	#xlog("user: $rU\n");
 
 	if (!mf_process_maxfwd_header("10")) {
-		sl_send_reply("483","Too Many Hops");
+		sl_send_reply("483", "Too Many Hops");
 		exit;
 	}
 

+ 1 - 1
test/unit/26.cfg

@@ -16,7 +16,7 @@ modparam("mi_fifo", "fifo_name", "/tmp/kamailio_fifo")
 route{
 	# initial sanity checks
 	if (!mf_process_maxfwd_header("10")) {
-		sl_send_reply("483","Too Many Hops");
+		sl_send_reply("483", "Too Many Hops");
 		return;
 	}
 	if (msg:len > 4096) {

+ 1 - 1
test/unit/28.cfg

@@ -15,7 +15,7 @@ request_route {
 		# run incoming script
 		if ( !cpl_run_script("incoming", "force_stateful") ) {
 			# script execution failed
-			sl_send_reply("500","CPL script execution failed");
+			sl_send_reply("500", "CPL script execution failed");
 			exit;
 		}
 	}

+ 1 - 1
test/unit/30.cfg

@@ -9,7 +9,7 @@ loadmodule "carrierroute/carrierroute.so"
 route{
 	# initial sanity checks
 	if (!mf_process_maxfwd_header("10")) {
-		sl_send_reply("483","Too Many Hops");
+		sl_send_reply("483", "Too Many Hops");
 		return;
 	}
 

+ 1 - 1
test/unit/35.cfg

@@ -30,7 +30,7 @@ modparam("usrloc|permissions", "db_url", "mysql://kamailio:kamailiorw@localhost/
 #-----------------------Routing configuration---------------------------------#
 route{
 if (!mf_process_maxfwd_header("10")) {
-	sl_send_reply("483","Too Many Hops");
+	sl_send_reply("483", "Too Many Hops");
 	exit();
 }
 

+ 1 - 1
test/unit/41.cfg

@@ -15,7 +15,7 @@ loadmodule "xlog/xlog.so"
 modparam("usrloc", "db_mode", 3)
 modparam("usrloc|avpops", "db_url", "mysql://kamailio:kamailiorw@localhost/kamailio")
 
-modparam("avpops","avp_table","usr_preferences")
+modparam("avpops", "avp_table", "usr_preferences")
 modparam("mi_fifo", "fifo_name", "/tmp/kamailio_fifo")
 
 route{

+ 1 - 1
test/unit/45.cfg

@@ -33,7 +33,7 @@ modparam("memcached", "memory", 0)
 #-----------------------Routing configuration---------------------------------#
 route{
 	if (!mf_process_maxfwd_header("10")) {
-		sl_send_reply("483","Too Many Hops");
+		sl_send_reply("483", "Too Many Hops");
 		exit();
 	}
 

+ 6 - 6
test/unit/5.cfg

@@ -196,7 +196,7 @@ modparam("usrloc", "db_mode",   0)
 route{
 
 	if (!mf_process_maxfwd_header("10")) {
-		sl_send_reply("483","Too Many Hops");
+		sl_send_reply("483", "Too Many Hops");
 		exit;
 	}
 
@@ -226,7 +226,7 @@ route{
 					exit;
 				}
 			}
-			sl_send_reply("404","Not here");
+			sl_send_reply("404", "Not here");
 		}
 		exit;
 	}
@@ -251,7 +251,7 @@ route{
 	##		exit;
 	##	}
 	##	if (!check_from()) {
-	##		sl_send_reply("403","Forbidden auth ID");
+	##		sl_send_reply("403", "Forbidden auth ID");
 	##		exit;
 	##	}
 	##
@@ -309,7 +309,7 @@ route{
 		##
 		##if (!check_to()) 
 		##{
-		##	sl_send_reply("403","Forbidden auth ID");
+		##	sl_send_reply("403", "Forbidden auth ID");
 		##	exit;
 		##}
 
@@ -321,7 +321,7 @@ route{
 
 	if ($rU==NULL) {
 		# request with no Username in RURI
-		sl_send_reply("484","Address Incomplete");
+		sl_send_reply("484", "Address Incomplete");
 		exit;
 	}
 
@@ -409,7 +409,7 @@ failure_route[1] {
 	# uncomment the following lines if you want to block client 
 	# redirect based on 3xx replies.
 	##if (t_check_status("3[0-9][0-9]")) {
-	##t_reply("404","Not found");
+	##t_reply("404", "Not found");
 	##	exit;
 	##}
 

+ 1 - 1
test/unit/50.cfg

@@ -37,7 +37,7 @@ modparam("registrar", "min_expires", 60)
 route{
 
 	if (!mf_process_maxfwd_header("10")) {
-		sl_send_reply("483","Too Many Hops");
+		sl_send_reply("483", "Too Many Hops");
 		exit;
 	}
 

+ 9 - 9
test/unit/60.cfg

@@ -20,29 +20,29 @@ route {
 		if ($hdr(X-Case) == '60-test7') {
 			sdp_remove_line_by_prefix("s=");
 			msg_apply_changes();
-			set_reply_body($rb,"application/sdp");
-			sl_send_reply(200,"OK");
+			set_reply_body($rb, "application/sdp");
+			sl_send_reply(200, "OK");
 			exit;
 		}
 		if ($hdr(X-Case) == '60-test9') {
-			sdp_remove_line_by_prefix("a=rtcp","video");
+			sdp_remove_line_by_prefix("a=rtcp", "video");
 			msg_apply_changes();
-			set_reply_body($rb,"application/sdp");
-			sl_send_reply(200,"OK");
+			set_reply_body($rb, "application/sdp");
+			sl_send_reply(200, "OK");
 			exit;
 		}
-		sl_send_reply(500,"Unknown test case");
+		sl_send_reply(500, "Unknown test case");
 		exit;
 
 	} else {
 		$var(rc) = sdp_remove_line_by_prefix("a=X-cap");
 		if ( $var(rc) < 0 ) {
-			sl_send_reply(500,"Some error");
+			sl_send_reply(500, "Some error");
 			exit;
 		}
 		msg_apply_changes();
-		set_reply_body($rb,"application/sdp");
-		sl_send_reply(200,"OK");
+		set_reply_body($rb, "application/sdp");
+		sl_send_reply(200, "OK");
 		exit;
 	}
 }

+ 7 - 7
test/unit/61.cfg

@@ -21,30 +21,30 @@ request_route {
 	if ( is_present_hf("X-Case") ) {
 		if ( $hdr(X-Case) == '61-test0') {
 			if( !lua_dostring("sr.sdpops.sdp_remove_line_by_prefix([[a=rtcp]])") ) {
-				sl_send_reply(500,"Lua call failed retcode=$retcode ($hdr(X-Case))");
+				sl_send_reply(500, "Lua call failed retcode=$retcode ($hdr(X-Case))");
 				exit;
 			}
 		} else if ( $hdr(X-Case) == '61-test1') {
 			if( !lua_dostring("sr.sdpops.sdp_remove_line_by_prefix([[a=rtcp]], [[audio]])") ) {
-				sl_send_reply(500,"Lua call failed retcode=$retcode ($hdr(X-Case))");
+				sl_send_reply(500, "Lua call failed retcode=$retcode ($hdr(X-Case))");
 				exit;
 			}
 		} else if ( $hdr(X-Case) == '61-test2') {
 			if( !lua_dostring("sr.sdpops.sdp_remove_line_by_prefix([[a=rtcp]], [[video]])") ) {
-				sl_send_reply(500,"Lua call failed retcode=$retcode ($hdr(X-Case))");
+				sl_send_reply(500, "Lua call failed retcode=$retcode ($hdr(X-Case))");
 				exit;
 			}
 		} else {
-			sl_send_reply(500,"Unknown test case");
+			sl_send_reply(500, "Unknown test case");
 			exit;
 		}
 
  		msg_apply_changes();
-		set_reply_body($rb,"application/sdp");
-		sl_send_reply(200,"OK");
+		set_reply_body($rb, "application/sdp");
+		sl_send_reply(200, "OK");
 		exit;
 	}
-	sl_send_reply(500,"X-Case missing");
+	sl_send_reply(500, "X-Case missing");
 	exit;
 }
 

+ 1 - 1
test/unit/7.cfg

@@ -510,7 +510,7 @@ route[9]
 		setflag(27);
 		
 		xlog("L_INFO", "Anonymize caller - M=$rm RURI=$ru F=$fu T=$tu IP=$si ID=$ci\n");
-		uac_replace_from("Anonymous","sip:[email protected]");
+		uac_replace_from("Anonymous", "sip:[email protected]");
 		if(is_present_hf("Privacy"))
 		{
 			remove_hf("Privacy");

+ 1 - 1
test/unit/presence.cfg

@@ -53,7 +53,7 @@ request_route{
     # initial sanity checks -- messages with
     # max_forwards==0, or excessively long requests
     if (!mf_process_maxfwd_header("10")) {
-        sl_send_reply("483","Too Many Hops");
+        sl_send_reply("483", "Too Many Hops");
         exit;
     }