jolly has uploaded this change for review.
Send raw data with e1d as it arrives from application
The application is responsible to send raw data in sync with the raw
data it receives. It also cares about sending data in advance, to
prevent underruns, if required. The length of data can vary.
(Now it is same procedure as with mISDN driver.)
OSMO_FD_WRITE flag must be disabled, if there is no message left
in the transmit queue.
Change-Id: I3e3ef623a02bffe75b168dc42514455b4df1007f
---
M src/input/e1d.c
1 file changed, 19 insertions(+), 11 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/00/31500/1
diff --git a/src/input/e1d.c b/src/input/e1d.c
index 4ab7c36..d2c6339 100644
--- a/src/input/e1d.c
+++ b/src/input/e1d.c
@@ -194,15 +194,9 @@
/* get the next msg for this timeslot */
msg = e1inp_tx_ts(e1i_ts, NULL);
- if (!msg)
+ if (!msg) {
+ osmo_fd_write_disable(bfd);
return 0;
-
- if (msg->len != D_BCHAN_TX_GRAN) {
- /* This might lead to a transmit underrun, as we call tx
- * from the rx path, as there's no select/poll on dahdi
- * */
- LOGPITS(e1i_ts, DLINP, LOGL_NOTICE, "unexpected msg->len = %u, "
- "expected %u\n", msg->len, D_BCHAN_TX_GRAN);
}
LOGPITS(e1i_ts, DLMIB, LOGL_DEBUG, "RAW CHAN TX: %s\n", osmo_hexdump(msg->data, msg->len));
@@ -244,9 +238,6 @@
msg->l2h = msg->data;
LOGPITS(e1i_ts, DLMIB, LOGL_DEBUG, "RAW CHAN RX: %s\n", msgb_hexdump_l2(msg));
ret = e1inp_rx_ts(e1i_ts, msg, 0, 0);
- /* physical layer indicates that data has been sent,
- * we thus can send some more data */
- ret = handle_ts_raw_write(bfd);
return ret;
}
To view, visit change 31500. To unsubscribe, or for help writing mail filters, visit settings.