[sr-dev] git:master:5eb2eca0: tools: allow one whitespace between route and name, kamailio parser accept it as well

Henning Westerholt hw at skalatan.de
Fri Sep 27 11:38:23 CEST 2019


Module: kamailio
Branch: master
Commit: 5eb2eca034d07f0fdb65cbcee2847945d476cbe2
URL: https://github.com/kamailio/kamailio/commit/5eb2eca034d07f0fdb65cbcee2847945d476cbe2

Author: Henning Westerholt <hw at skalatan.de>
Committer: Henning Westerholt <hw at skalatan.de>
Date: 2019-09-27T11:36:28+02:00

tools: allow one whitespace between route and name, kamailio parser accept it as well

---

Modified: misc/tools/route_graph/route_graph.py

---

Diff:  https://github.com/kamailio/kamailio/commit/5eb2eca034d07f0fdb65cbcee2847945d476cbe2.diff
Patch: https://github.com/kamailio/kamailio/commit/5eb2eca034d07f0fdb65cbcee2847945d476cbe2.patch

---

diff --git a/misc/tools/route_graph/route_graph.py b/misc/tools/route_graph/route_graph.py
index f5633c92fd..c6545ec9df 100755
--- a/misc/tools/route_graph/route_graph.py
+++ b/misc/tools/route_graph/route_graph.py
@@ -32,7 +32,7 @@
 debug = 0
 
 re_main_route = re.compile("^([a-z]+_)*route[\s\t]*(?![\(\)])[\s\t]*\{?", re.I)
-re_def_route = re.compile("^([a-z]+_)*route(\[\"?([A-Za-z0-9-_:]+)\"?\])+[\s\t]*\{?", re.I)
+re_def_route = re.compile("^([a-z]+_)*route ?(\[\"?([A-Za-z0-9-_:]+)\"?\])+[\s\t]*\{?", re.I)
 re_call_route = re.compile("^(.*\([\s\t!]*)?route\(\"?([A-Za-z0-9-_]+)\"?\)", re.I)
 routes = {}
 f_routes = {}




More information about the sr-dev mailing list