dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-abis/+/31307 )
Change subject: e1_input: add timeslot type NONE ......................................................................
e1_input: add timeslot type NONE
Allow to configure a timeslot as type E1INP_TS_TYPE_NONE. The timeslot is then put back in its unconfigured state
Change-Id: I073cfaba0d5073447842f22665e213135ea3f635 Related: OS#5198 --- M include/osmocom/abis/e1_input.h M src/e1_input.c 2 files changed, 14 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/07/31307/1
diff --git a/include/osmocom/abis/e1_input.h b/include/osmocom/abis/e1_input.h index 91bf181..eb29e8a 100644 --- a/include/osmocom/abis/e1_input.h +++ b/include/osmocom/abis/e1_input.h @@ -305,6 +305,9 @@ void (*hdlc_recv_cb)(struct e1inp_ts *ts, struct msgb *msg));
+/* configure and initialize one timeslot dedicated to nothing */ +int e1inp_ts_config_none(struct e1inp_ts *ts, struct e1inp_line *line); + /* obtain a string identifier/name for the given timeslot */ void e1inp_ts_name(char *out, size_t out_len, const struct e1inp_ts *ts);
diff --git a/src/e1_input.c b/src/e1_input.c index 6c82d08..78615e6 100644 --- a/src/e1_input.c +++ b/src/e1_input.c @@ -444,6 +444,17 @@ return 0; }
+int e1inp_ts_config_none(struct e1inp_ts *ts, struct e1inp_line *line) +{ + if (ts->type == E1INP_TS_TYPE_NONE && ts->line && line) + return 0; + + ts->type = E1INP_TS_TYPE_NONE; + ts->line = line; + + return 0; +} + static int e1inp_line_use_cb(struct osmo_use_count_entry *use_count_entry, int32_t old_use_count, const char *file, int file_line) {