diff options
authorAndreas Eversberg <>2015-12-25 08:15:41 +0100
committerAndreas Eversberg <>2015-12-25 09:33:12 +0100
commit467b11a32759cf4608612546d837960be0578ece (patch)
parent27d23c414c2546c7a3eceb5716e4e3044ef701a7 (diff)
Fix for "Added runtime selection of gps device"
The gpsd line in the config file is now generated correctly, so that it is parsed correctly when loading the config on next startup.
1 files changed, 3 insertions, 4 deletions
diff --git a/src/host/layer23/src/mobile/vty_interface.c b/src/host/layer23/src/mobile/vty_interface.c
index cf8dac4f..167d99d9 100644
--- a/src/host/layer23/src/mobile/vty_interface.c
+++ b/src/host/layer23/src/mobile/vty_interface.c
@@ -1179,7 +1179,7 @@ DEFUN(cfg_no_gps_enable, cfg_no_gps_enable_cmd, "no gps enable",
#ifdef _HAVE_GPSD
-DEFUN(cfg_gps_host, cfg_gps_host_cmd, "gps host HOST:PORT",
+DEFUN(cfg_gpsd_host, cfg_gpsd_host_cmd, "gpsd host HOST:PORT",
"GPS receiver\nSelect gpsd host and port\n"
"IP and port (optional) of the host running gpsd")
@@ -1641,8 +1641,7 @@ static int config_write(struct vty *vty)
struct osmocom_ms *ms;
#ifdef _HAVE_GPSD
- vty_out(vty, "gpsd host %s%s", g.gpsd_host, VTY_NEWLINE);
- vty_out(vty, "gpsd port %s%s", g.gpsd_port, VTY_NEWLINE);
+ vty_out(vty, "gpsd host %s:%s%s", g.gpsd_host, g.gpsd_port, VTY_NEWLINE);
vty_out(vty, "gps device %s%s", g.device, VTY_NEWLINE);
if (g.baud)
@@ -3109,7 +3108,7 @@ int ms_vty_init(void *tall_ctx)
install_element(ENABLE_NODE, &delete_forbidden_plmn_cmd);
#ifdef _HAVE_GPSD
- install_element(CONFIG_NODE, &cfg_gps_host_cmd);
+ install_element(CONFIG_NODE, &cfg_gpsd_host_cmd);
install_element(CONFIG_NODE, &cfg_gps_device_cmd);
install_element(CONFIG_NODE, &cfg_gps_baud_cmd);