diff options
author | Harald Welte <laforge@gnumonks.org> | 2011-02-13 14:26:54 +0100 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2011-02-13 15:49:27 +0100 |
commit | 174a51a7612413bdec368772c4f855154337426d (patch) | |
tree | 4408e6aa851de969411e319a33b5b0f4e37df563 /openbsc/src/input | |
parent | b3d70fd0bd8601f95ff55fba660781aa44cff597 (diff) |
DAHDI: Deliver ALARM/NOALARM as input signal to RBS2000 driver
... and re-start LAPD SABM as required
Diffstat (limited to 'openbsc/src/input')
-rw-r--r-- | openbsc/src/input/dahdi.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/openbsc/src/input/dahdi.c b/openbsc/src/input/dahdi.c index c142b8ae4..56851eed4 100644 --- a/openbsc/src/input/dahdi.c +++ b/openbsc/src/input/dahdi.c @@ -69,6 +69,7 @@ static const struct value_string dahdi_evt_names[] = { static void handle_dahdi_exception(struct e1inp_ts *ts) { int rc, evt; + struct input_signal_data isd; rc = ioctl(ts->driver.dahdi.fd.fd, DAHDI_GETEVENT, &evt); if (rc < 0) @@ -78,12 +79,16 @@ static void handle_dahdi_exception(struct e1inp_ts *ts) ts->line->num, ts->line->name, ts->num, get_value_string(dahdi_evt_names, evt)); + isd.line = ts->line; + switch (evt) { case DAHDI_EVENT_ALARM: - /* FIXME: we should notify the code that the line is gone */ + /* we should notify the code that the line is gone */ + dispatch_signal(SS_INPUT, S_INP_LINE_ALARM, &isd); break; case DAHDI_EVENT_NOALARM: - /* FIXME: alarm has gone, we should re-start the SABM requests */ + /* alarm has gone, we should re-start the SABM requests */ + dispatch_signal(SS_INPUT, S_INP_LINE_NOALARM, &isd); break; } } |