diff options
author | Harald Welte <laforge@gnumonks.org> | 2011-02-05 15:57:42 +0100 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2011-02-05 15:57:42 +0100 |
commit | 07bb0daaff8d10aad4da264621e25b0986007fc5 (patch) | |
tree | 359b1c7e736d985cb75a2d74df5cea9f4bd2469b /openbsc | |
parent | 889f16eac3e856318ba88587a0c9e2c72cd4db89 (diff) |
[E1 input] make sure config file with new E1 input config saves correctly
Diffstat (limited to 'openbsc')
-rw-r--r-- | openbsc/src/e1_input.c | 10 | ||||
-rw-r--r-- | openbsc/src/e1_input_vty.c | 4 | ||||
-rw-r--r-- | openbsc/src/input/misdn.c | 2 |
3 files changed, 12 insertions, 4 deletions
diff --git a/openbsc/src/e1_input.c b/openbsc/src/e1_input.c index e8587c902..67a62e4c9 100644 --- a/openbsc/src/e1_input.c +++ b/openbsc/src/e1_input.c @@ -341,12 +341,18 @@ struct e1inp_line *e1inp_line_create(u_int8_t e1_nr, const char *driver_name) int i; line = e1inp_line_get(e1_nr); - if (line) + if (line) { + LOGP(DINP, LOGL_ERROR, "E1 Line %u already exists\n", + e1_nr); return NULL; + } driver = e1inp_driver_find(driver_name); - if (!driver) + if (!driver) { + LOGP(DINP, LOGL_ERROR, "No such E1 driver '%s'\n", + driver_name); return NULL; + } line = talloc_zero(tall_bsc_ctx, struct e1inp_line); if (!line) diff --git a/openbsc/src/e1_input_vty.c b/openbsc/src/e1_input_vty.c index 6d44a95ba..b8050a87f 100644 --- a/openbsc/src/e1_input_vty.c +++ b/openbsc/src/e1_input_vty.c @@ -38,7 +38,7 @@ #include "../bscconfig.h" -#define E1_DRIVER_NAMES "(misdn)" +#define E1_DRIVER_NAMES "(misdn|misdn)" #define E1_DRIVER_HELP "mISDN supported E1 Card\n" DEFUN(cfg_e1line_driver, cfg_e1_line_driver_cmd, @@ -76,6 +76,8 @@ static int e1inp_config_write(struct vty *vty) { struct e1inp_line *line; + vty_out(vty, "e1_input%s", VTY_NEWLINE); + llist_for_each_entry(line, &e1inp_line_list, list) { vty_out(vty, " e1_line %u driver %s%s", line->num, line->driver->name, VTY_NEWLINE); diff --git a/openbsc/src/input/misdn.c b/openbsc/src/input/misdn.c index 77b1fd898..7604d01e3 100644 --- a/openbsc/src/input/misdn.c +++ b/openbsc/src/input/misdn.c @@ -386,7 +386,7 @@ static int activate_bchan(struct e1inp_line *line, int ts, int act) static int mi_e1_line_update(struct e1inp_line *line); struct e1inp_driver misdn_driver = { - .name = "mISDN", + .name = "misdn", .want_write = ts_want_write, .default_delay = 50000, .line_update = &mi_e1_line_update, |