summaryrefslogtreecommitdiffstats
path: root/openbsc/src/input/misdn.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2009-08-06 19:20:38 +0200
committerHarald Welte <laforge@gnumonks.org>2009-08-06 19:20:38 +0200
commitb90288c8caba5cc77c26332650a5739ac9cf2e86 (patch)
treedd78038f9437c1875cf0fe38f074c975fc173c67 /openbsc/src/input/misdn.c
parente211da49b98162cbf9653da7b80e30634f2b1637 (diff)
parent67ce073110b390997fd08c69b44c6b5d9f6a3cef (diff)
Merge branch 'master' into proxyproxy
Diffstat (limited to 'openbsc/src/input/misdn.c')
-rw-r--r--openbsc/src/input/misdn.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/openbsc/src/input/misdn.c b/openbsc/src/input/misdn.c
index a04c2ab..2ec74b8 100644
--- a/openbsc/src/input/misdn.c
+++ b/openbsc/src/input/misdn.c
@@ -477,14 +477,7 @@ int mi_setup(int cardnr, struct e1inp_line *line, int release_l2)
int sk, ret, cnt;
struct mISDN_devinfo devinfo;
- /* register the driver with the core */
- /* FIXME: do this in the plugin initializer function */
- ret = e1inp_driver_register(&misdn_driver);
- if (ret)
- return ret;
-
/* create the actual line instance */
- /* FIXME: do this independent of driver registration */
e1h = talloc(tall_bsc_ctx, struct mi_e1_handle);
memset(e1h, 0, sizeof(*e1h));
@@ -531,14 +524,15 @@ int mi_setup(int cardnr, struct e1inp_line *line, int release_l2)
return -EINVAL;
}
- if (devinfo.nrbchan != 30) {
- fprintf(stderr, "error: E1 card has no 30 B-channels\n");
- return -EINVAL;
- }
-
ret = mi_e1_setup(line, release_l2);
if (ret)
return ret;
return e1inp_line_register(line);
}
+
+static __attribute__((constructor)) void on_dso_load_sms(void)
+{
+ /* register the driver with the core */
+ e1inp_driver_register(&misdn_driver);
+}