summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPablo Neira Ayuso2011-06-07 17:15:10 +0200
committerPablo Neira Ayuso2011-06-07 17:15:10 +0200
commit211d2ca7a1c5ff4b9626215dd5ce611efc01ccbc (patch)
treec01b7fa631166b149757b379e310a1e610715d98 /src
parentsrc: add libosmo_abis_init(void *ctx) to set the talloc context (diff)
downloadlibosmo-abis-211d2ca7a1c5ff4b9626215dd5ce611efc01ccbc.tar.gz
libosmo-abis-211d2ca7a1c5ff4b9626215dd5ce611efc01ccbc.tar.xz
libosmo-abis-211d2ca7a1c5ff4b9626215dd5ce611efc01ccbc.zip
e1input: fix TRAU frame handling
With this patch, we pass TRAU frames to the callback that e1inp_ts_config_trau(...) takes as parameter. Instead of passing it to the line->rx(...) callback. The function e1inp_ts_config_trau(...) should only be used by ISDN drivers.
Diffstat (limited to 'src')
-rw-r--r--src/e1_input.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/e1_input.c b/src/e1_input.c
index fb3d9a6..fcaada5 100644
--- a/src/e1_input.c
+++ b/src/e1_input.c
@@ -259,8 +259,8 @@ int abis_nm_sendmsg(struct msgb *msg)
/* Timeslot */
int e1inp_ts_config_trau(struct e1inp_ts *ts, struct e1inp_line *line,
- int (*subch_cb)(struct subch_demux *dmx, int ch,
- uint8_t *data, int len, void *_priv))
+ int (*trau_rcv_cb)(struct subch_demux *dmx, int ch,
+ uint8_t *data, int len, void *_priv))
{
if (ts->type == E1INP_TS_TYPE_TRAU && ts->line && line)
return 0;
@@ -269,7 +269,7 @@ int e1inp_ts_config_trau(struct e1inp_ts *ts, struct e1inp_line *line,
ts->line = line;
subchan_mux_init(&ts->trau.mux);
- ts->trau.demux.out_cb = subch_cb;
+ ts->trau.demux.out_cb = trau_rcv_cb;
ts->trau.demux.data = ts;
subch_demux_init(&ts->trau.demux);
return 0;
@@ -474,8 +474,7 @@ int e1inp_rx_ts(struct e1inp_ts *ts, struct msgb *msg,
ts->line->rx(msg, ts);
break;
case E1INP_TS_TYPE_TRAU:
- ts->line->rx(msg, ts);
-// ret = subch_demux_in(&ts->trau.demux, msg->l2h, msgb_l2len(msg));
+ ret = subch_demux_in(&ts->trau.demux, msg->l2h, msgb_l2len(msg));
break;
default:
ret = -EINVAL;