aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2010-05-27 13:39:40 +0200
committerHarald Welte <laforge@gnumonks.org>2010-05-27 13:39:40 +0200
commit39231150ad131018efccffe5176c888cb1300bab (patch)
tree2e77a51f73a9d2474129771d98abe07380810b61 /openbsc
parentd3cf85d57c599238dfad97c52fe851f1e4e4a26f (diff)
VTY: Fix segfault during 'write file' from vty
This bug had been introduced by the recent switch to libosmovty
Diffstat (limited to 'openbsc')
-rw-r--r--openbsc/src/bsc_vty.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/openbsc/src/bsc_vty.c b/openbsc/src/bsc_vty.c
index ad49bd580..a55303bca 100644
--- a/openbsc/src/bsc_vty.c
+++ b/openbsc/src/bsc_vty.c
@@ -96,10 +96,19 @@ struct cmd_node ts_node = {
1,
};
+extern struct gsm_network *bsc_gsmnet;
+
struct gsm_network *gsmnet_from_vty(struct vty *v)
{
+ /* In case we read from the config file, the vty->priv cannot
+ * point to a struct telnet_connection, and thus conn->priv
+ * will not point to the gsm_network structure */
+#if 0
struct telnet_connection *conn = v->priv;
return (struct gsm_network *) conn->priv;
+#else
+ return bsc_gsmnet;
+#endif
}
static int dummy_config_write(struct vty *v)