diff options
author | Harald Welte <laforge@osmocom.org> | 2022-05-06 22:43:54 +0200 |
---|---|---|
committer | Harald Welte <laforge@osmocom.org> | 2022-10-27 13:40:04 +0200 |
commit | 4b77d42ea68ab7763f4967fbf7dd86979a513dc0 (patch) | |
tree | 870cfebfe6b3a7ae74e25a3731e97af271d1a0dd | |
parent | c4c3a856adf5c9a65acf7f8efa6b5f7362bdbeaa (diff) |
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
-rw-r--r-- | src/input/unixsocket.c | 17 |
1 files changed, 1 insertions, 16 deletions
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 @@ fail: 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 @@ static int unixsocket_write_cb(struct osmo_fd *bfd) 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); |