mirror of
https://gitea.osmocom.org/cellular-infrastructure/osmo-mgw.git
synced 2025-11-03 05:23:43 +00:00
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.
This commit is contained in:
@@ -144,6 +144,7 @@ enum signal_input {
|
|||||||
S_INP_NONE,
|
S_INP_NONE,
|
||||||
S_INP_TEI_UP,
|
S_INP_TEI_UP,
|
||||||
S_INP_TEI_DN,
|
S_INP_TEI_DN,
|
||||||
|
S_INP_LINE_INIT,
|
||||||
};
|
};
|
||||||
|
|
||||||
struct gsm_subscriber;
|
struct gsm_subscriber;
|
||||||
@@ -244,6 +245,7 @@ struct ho_signal_data {
|
|||||||
struct input_signal_data {
|
struct input_signal_data {
|
||||||
int link_type;
|
int link_type;
|
||||||
struct gsm_bts_trx *trx;
|
struct gsm_bts_trx *trx;
|
||||||
|
struct e1inp_line *line;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -594,10 +594,21 @@ struct e1inp_driver *e1inp_driver_find(const char *name)
|
|||||||
|
|
||||||
int e1inp_line_update(struct e1inp_line *line)
|
int e1inp_line_update(struct e1inp_line *line)
|
||||||
{
|
{
|
||||||
|
struct input_signal_data isd;
|
||||||
|
int rc;
|
||||||
|
|
||||||
if (line->driver && line->driver->line_update)
|
if (line->driver && line->driver->line_update)
|
||||||
return line->driver->line_update(line);
|
rc = line->driver->line_update(line);
|
||||||
else
|
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,
|
static int e1i_sig_cb(unsigned int subsys, unsigned int signal,
|
||||||
|
|||||||
Reference in New Issue
Block a user