jolly has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-abis/+/34035 )
Change subject: dahdi: Add missing msg->l2h ......................................................................
dahdi: Add missing msg->l2h
l2h is now set in all receive functions after putting received data to the msgb.
Change-Id: Ieec5e2e6bacc4bce465c29b2148537e8b2218a00 --- M src/input/dahdi.c 1 file changed, 16 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/35/34035/1
diff --git a/src/input/dahdi.c b/src/input/dahdi.c index b4e6657..2120575 100644 --- a/src/input/dahdi.c +++ b/src/input/dahdi.c @@ -181,11 +181,12 @@ LOGPITS(e1i_ts, DLMI, LOGL_ERROR, "%s read failed %d (%s)\n", __func__, ret, strerror(errno)); return ret; } - msgb_put(msg, ret - 2); if (ret <= 3) { LOGPITS(e1i_ts, DLMI, LOGL_ERROR, "%s read failed %d (%s)\n", __func__, ret, strerror(errno)); return ret; } + msgb_put(msg, ret - 2); + msg->l2h = msg->data;
return e1inp_rx_ts_lapd(e1i_ts, msg); } @@ -317,11 +318,12 @@ LOGPITS(e1i_ts, DLMI, LOGL_ERROR, "%s read failed %d (%s)\n", __func__, ret, strerror(errno)); return ret; } - msgb_put(msg, ret - 2); if (ret <= 3) { LOGPITS(e1i_ts, DLMI, LOGL_ERROR, "%s read failed %d (%s)\n", __func__, ret, strerror(errno)); return ret; } + msgb_put(msg, ret - 2); + msg->l2h = msg->data;
return e1inp_rx_ts(e1i_ts, msg, 0, 0); }