Skip to content

Commit

Permalink
misc/examples/kemi: convert port to string in log messages
Browse files Browse the repository at this point in the history
(cherry picked from commit 7612f67)
  • Loading branch information
miconda committed Feb 22, 2018
1 parent 6b6c304 commit 15ea8f6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions misc/examples/kemi/kamailio-basic-kemi-python.py
Expand Up @@ -146,13 +146,13 @@ def ksr_route_reqinit(self, msg):
# ip is already blocked
KSR.dbg("request from blocked IP - " + KSR.pv.get("$rm")
+ " from " + KSR.pv.get("$fu") + " (IP:"
+ KSR.pv.get("$si") + ":" + KSR.pv.get("$sp") + ")\n");
+ KSR.pv.get("$si") + ":" + str(KSR.pv.get("$sp")) + ")\n");
return -255;

if KSR.pike.pike_check_req()<0 :
KSR.err("ALERT: pike blocking " + KSR.pv.get("$rm")
+ " from " + KSR.pv.get("$fu") + " (IP:"
+ KSR.pv.get("$si") + ":" + KSR.pv.get("$sp") + ")\n");
+ KSR.pv.get("$si") + ":" + str(KSR.pv.get("$sp")) + ")\n");
KSR.pv.seti("$sht(ipban=>$si)", 1);
return -255;

Expand All @@ -174,7 +174,7 @@ def ksr_route_reqinit(self, msg):

if KSR.sanity.sanity_check(1511, 7)<0 :
KSR.err("Malformed SIP message from "
+ KSR.pv.get("$si") + ":" + KSR.pv.get("$sp") +"\n");
+ KSR.pv.get("$si") + ":" + str(KSR.pv.get("$sp")) +"\n");
return -255;


Expand Down

0 comments on commit 15ea8f6

Please sign in to comment.