aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/bsc_vty.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-11-15 20:29:46 +0100
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-11-15 20:30:38 +0100
commitdab8e27755c56a2eee93317caf79ef32c145c59c (patch)
treedb2ab6190d0679501a8d352e656967f701631600 /openbsc/src/bsc_vty.c
parente19d6fc1ee306413d4a1b0ab91c94199f8f82ca1 (diff)
ipaccess: Fix dropping the OML/RSL connection.
Use the ipaccess_drop_oml and ipaccess_drop_rsl functions instead of closing the socket and hoping this is picked up somehow. This just leads to some weird hangs. And gdb was not really helpful to say where it was coming from.
Diffstat (limited to 'openbsc/src/bsc_vty.c')
-rw-r--r--openbsc/src/bsc_vty.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/openbsc/src/bsc_vty.c b/openbsc/src/bsc_vty.c
index aabb7827f..02d8b03bf 100644
--- a/openbsc/src/bsc_vty.c
+++ b/openbsc/src/bsc_vty.c
@@ -45,6 +45,7 @@
#include <openbsc/system_information.h>
#include <openbsc/debug.h>
#include <openbsc/paging.h>
+#include <openbsc/ipaccess.h>
#include "../bscconfig.h"
@@ -2299,13 +2300,11 @@ DEFUN(drop_bts,
/* close all connections */
if (strcmp(argv[1], "oml") == 0) {
- if (bts->oml_link)
- close(bts->oml_link->ts->driver.ipaccess.fd.fd);
+ ipaccess_drop_oml(bts);
} else if (strcmp(argv[1], "rsl") == 0) {
/* close all rsl connections */
llist_for_each_entry(trx, &bts->trx_list, list) {
- if (trx->rsl_link)
- close(trx->rsl_link->ts->driver.ipaccess.fd.fd);
+ ipaccess_drop_rsl(trx);
}
} else {
vty_out(vty, "Argument must be 'oml# or 'rsl'.%s", VTY_NEWLINE);