Module: kamailio
Branch: 4.3
Commit: d0c5a5835969660d43355fa91b39f1a8e08f6eb0
URL:
https://github.com/kamailio/kamailio/commit/d0c5a5835969660d43355fa91b39f1a…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2015-11-23T16:25:43+01:00
kamctl: require db or ctl engine made specific for dispatcher subcommands
(cherry picked from commit d2416957e4caec8a64abec82029ea18c52a7bc2d)
---
Modified: utils/kamctl/kamctl
---
Diff:
https://github.com/kamailio/kamailio/commit/d0c5a5835969660d43355fa91b39f1a…
Patch:
https://github.com/kamailio/kamailio/commit/d0c5a5835969660d43355fa91b39f1a…
---
diff --git a/utils/kamctl/kamctl b/utils/kamctl/kamctl
index 39e89eb..22d9643 100755
--- a/utils/kamctl/kamctl
+++ b/utils/kamctl/kamctl
@@ -1583,15 +1583,15 @@ cr() {
### DISPATCHER management
#
dispatcher() {
- require_dbengine
- require_ctlengine
case $1 in
show)
+ require_dbengine
mecho "dispatcher gateways"
QUERY="select * FROM $DISPATCHER_TABLE ORDER BY $DISPATCHER_SETID_COLUMN; "
$DBROCMD "$QUERY"
;;
addgw|add)
+ require_dbengine
shift
if [ $# -lt 2 ] ; then
merr "too few parameters"
@@ -1638,6 +1638,7 @@ dispatcher() {
;;
rmgw|rm)
+ require_dbengine
shift
if [ $# -ne 1 ] ; then
merr "missing gateway id to be removed"
@@ -1654,10 +1655,12 @@ dispatcher() {
;;
reload)
+ require_ctlengine
$CTLCMD ds_reload
;;
dump)
+ require_ctlengine
$CTLCMD ds_list
;;