[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
diff --git a/openbsc/src/input/misdn.c b/openbsc/src/input/misdn.c
index 1f24a27..77b1fd8 100644
--- a/openbsc/src/input/misdn.c
+++ b/openbsc/src/input/misdn.c
@@ -386,7 +386,7 @@
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 @@
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 @@
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);