aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/e1_input.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2011-02-11 16:49:41 +0100
committerHarald Welte <laforge@gnumonks.org>2011-02-11 16:49:41 +0100
commitf27d043032e6263f5b8f3b0c1db9594d3bba4156 (patch)
treed612c28d223b1c9ba32abf9176fac3dc80487f36 /openbsc/src/e1_input.c
parentf338a03b0cc85ca20bfe8e1ebe3b98e86bcef3c1 (diff)
E1 Input: Add new S_INP_LINE_INIT signal
This allows other code to listen ot a signal about a new line that was just configured.
Diffstat (limited to 'openbsc/src/e1_input.c')
-rw-r--r--openbsc/src/e1_input.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/openbsc/src/e1_input.c b/openbsc/src/e1_input.c
index 92bfb242a..b131844bb 100644
--- a/openbsc/src/e1_input.c
+++ b/openbsc/src/e1_input.c
@@ -594,10 +594,21 @@ struct e1inp_driver *e1inp_driver_find(const char *name)
int e1inp_line_update(struct e1inp_line *line)
{
+ struct input_signal_data isd;
+ int rc;
+
if (line->driver && line->driver->line_update)
- return line->driver->line_update(line);
+ rc = line->driver->line_update(line);
else
- return 0;
+ rc = 0;
+
+ /* Send a signal to anyone who is interested in new lines being
+ * configured */
+ memset(&isd, 0, sizeof(isd));
+ isd.line = line;
+ dispatch_signal(SS_INPUT, S_INP_LINE_INIT, &isd);
+
+ return rc;
}
static int e1i_sig_cb(unsigned int subsys, unsigned int signal,