diff options
author | Harald Welte <laforge@gnumonks.org> | 2011-02-05 13:54:41 +0100 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2011-02-05 15:31:34 +0100 |
commit | 3016d9f299ea4cfc8961376d20862b9418cfb059 (patch) | |
tree | abea7922884d1b96b8e1e6d8df66e01e1ffe7d6b /openbsc/src/input | |
parent | 5455243306bdc57f39a38da4d2d191d7d549b67c (diff) |
[E1 INPUT] explicitly configure the E1 input driver for each line
This introduces a new 'e1_input' config node with a command to be
used like:
e1_line 0 driver misdn
This allows us to have different input drivers in the future
Diffstat (limited to 'openbsc/src/input')
-rw-r--r-- | openbsc/src/input/misdn.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/openbsc/src/input/misdn.c b/openbsc/src/input/misdn.c index 1f24a2782..77b1fd898 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 = "mISDNuser", + .name = "mISDN", .want_write = ts_want_write, .default_delay = 50000, .line_update = &mi_e1_line_update, @@ -486,16 +486,6 @@ static int mi_e1_line_update(struct e1inp_line *line) struct mISDN_devinfo devinfo; int sk, ret, cnt; - if (!line->driver) { - /* this must be the first update */ - line->driver = &misdn_driver; - } else { - /* this is a subsequent update */ - /* FIXME: first close all sockets */ - fprintf(stderr, "incremental line updates not supported yet\n"); - return 0; - } - if (line->driver != &misdn_driver) return -EINVAL; @@ -544,7 +534,7 @@ static int mi_e1_line_update(struct e1inp_line *line) return 0; } -static __attribute__((constructor)) void on_dso_load_sms(void) +void e1inp_misdn_init(void) { /* register the driver with the core */ e1inp_driver_register(&misdn_driver); |