laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-abis/+/28064 )
Change subject: input/unixsocket: Remove write delay timer ......................................................................
input/unixsocket: Remove write delay timer
Unlike with classic E1 or nanoBTS, there is no reason why we would use a delay timer when talking over a unix domain socket between two osmocom programs. Let's remove the write-delay timer.
Change-Id: I642d2e4495a08ce45e9a4492e98255aacd0be39a --- M src/input/unixsocket.c 1 file changed, 1 insertion(+), 16 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/64/28064/1
diff --git a/src/input/unixsocket.c b/src/input/unixsocket.c index 069f9c6..b738b3f 100644 --- a/src/input/unixsocket.c +++ b/src/input/unixsocket.c @@ -128,14 +128,6 @@ return ret; }
-static void timeout_ts1_write(void *data) -{ - struct e1inp_ts *e1i_ts = (struct e1inp_ts *)data; - - /* trigger write of ts1, due to tx delay timer */ - ts_want_write(e1i_ts); -} - static int unixsocket_write_cb(struct osmo_fd *bfd) { struct e1inp_line *line = bfd->data; @@ -143,21 +135,14 @@ struct msgb *msg; struct e1inp_sign_link *sign_link;
- osmo_fd_write_disable(bfd); - /* get the next msg for this timeslot */ msg = e1inp_tx_ts(e1i_ts, &sign_link); if (!msg) { - /* no message after tx delay timer */ + osmo_fd_write_disable(bfd); LOGPITS(e1i_ts, DLINP, LOGL_INFO, "no message available (line=%p)\n", line); return 0; }
- /* set tx delay timer for next event */ - osmo_timer_setup(&e1i_ts->sign.tx_timer, timeout_ts1_write, e1i_ts); - - osmo_timer_schedule(&e1i_ts->sign.tx_timer, 0, e1i_ts->sign.delay); - LOGPITS(e1i_ts, DLINP, LOGL_DEBUG, "sending: %s (line=%p)\n", msgb_hexdump(msg), line); lapd_transmit(e1i_ts->lapd, sign_link->tei, sign_link->sapi, msg);