[sr-dev] git:master:28be94ea: misc/examples/kemi: make reply code integer everywhere

Daniel-Constantin Mierla miconda at gmail.com
Mon Apr 13 12:15:27 CEST 2020


Module: kamailio
Branch: master
Commit: 28be94ea97216ba7ac1420130cc01ebda167c5d8
URL: https://github.com/kamailio/kamailio/commit/28be94ea97216ba7ac1420130cc01ebda167c5d8

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2020-04-13T12:14:52+02:00

misc/examples/kemi: make reply code integer everywhere

---

Modified: misc/examples/kemi/kamailio-basic-kemi-jsdt.js
Modified: misc/examples/kemi/kamailio-basic-kemi-lua.lua
Modified: misc/examples/kemi/kamailio-basic-kemi-sqlang.sq

---

Diff:  https://github.com/kamailio/kamailio/commit/28be94ea97216ba7ac1420130cc01ebda167c5d8.diff
Patch: https://github.com/kamailio/kamailio/commit/28be94ea97216ba7ac1420130cc01ebda167c5d8.patch

---

diff --git a/misc/examples/kemi/kamailio-basic-kemi-jsdt.js b/misc/examples/kemi/kamailio-basic-kemi-jsdt.js
index 040af8656c..7cc880f290 100644
--- a/misc/examples/kemi/kamailio-basic-kemi-jsdt.js
+++ b/misc/examples/kemi/kamailio-basic-kemi-jsdt.js
@@ -219,10 +219,10 @@ function ksr_route_location()
 	if (rc<0) {
 		KSR.tm.t_newtran();
 		if (rc==-1 || rc==-3) {
-			KSR.sl.send_reply("404", "Not Found");
+			KSR.sl.send_reply(404, "Not Found");
 			KSR.x.exit();
 		} else if (rc==-2) {
-			KSR.sl.send_reply("405", "Method Not Allowed");
+			KSR.sl.send_reply(405, "Method Not Allowed");
 			KSR.x.exit();
 		}
 	}
diff --git a/misc/examples/kemi/kamailio-basic-kemi-lua.lua b/misc/examples/kemi/kamailio-basic-kemi-lua.lua
index b28eea0ff1..4be9b13587 100644
--- a/misc/examples/kemi/kamailio-basic-kemi-lua.lua
+++ b/misc/examples/kemi/kamailio-basic-kemi-lua.lua
@@ -220,10 +220,10 @@ function ksr_route_location()
 	if rc<0 then
 		KSR.tm.t_newtran();
 		if rc==-1 or rc==-3 then
-			KSR.sl.send_reply("404", "Not Found");
+			KSR.sl.send_reply(404, "Not Found");
 			KSR.x.exit();
 		elseif rc==-2 then
-			KSR.sl.send_reply("405", "Method Not Allowed");
+			KSR.sl.send_reply(405, "Method Not Allowed");
 			KSR.x.exit();
 		end
 	end
diff --git a/misc/examples/kemi/kamailio-basic-kemi-sqlang.sq b/misc/examples/kemi/kamailio-basic-kemi-sqlang.sq
index b1c3ae4a77..4926ec8317 100644
--- a/misc/examples/kemi/kamailio-basic-kemi-sqlang.sq
+++ b/misc/examples/kemi/kamailio-basic-kemi-sqlang.sq
@@ -223,10 +223,10 @@ function ksr_route_location()
 	if (rc<0) {
 		KSR.tm.t_newtran();
 		if (rc==-1 || rc==-3) {
-			KSR.sl.send_reply("404", "Not Found");
+			KSR.sl.send_reply(404, "Not Found");
 			KSR.x.exit();
 		} else if (rc==-2) {
-			KSR.sl.send_reply("405", "Method Not Allowed");
+			KSR.sl.send_reply(405, "Method Not Allowed");
 			KSR.x.exit();
 		}
 	}




More information about the sr-dev mailing list