jolly has uploaded this change for review.

View Change

lapdm: Do not return an error when enqueuing a frame

If tx_ph_data_enqueue() is called, frames will be written into a queue,
if there is a pending frame or if polling of TX frames is used. In
this case the return value must be 0.

Sending a RSL_MT_UNIT_DATA_REQ from upper layer causes a call to
tx_ph_data_enqueue(). The return code is returned to the sender. The
sender must not get an error returned, if the message is enqueued.

Change-Id: Iaeaf7c66cb3cf5cc81bc8e15d468e8e7704c1407
---
M src/gsm/lapdm.c
1 file changed, 18 insertions(+), 1 deletion(-)

git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/17/33217/1
diff --git a/src/gsm/lapdm.c b/src/gsm/lapdm.c
index 8ca1342..e8d9e78 100644
--- a/src/gsm/lapdm.c
+++ b/src/gsm/lapdm.c
@@ -362,7 +362,7 @@
*msgb_push(msg, 1) = link_id;
*msgb_push(msg, 1) = chan_nr;
msgb_enqueue(&dl->dl.tx_queue, msg);
- return -EBUSY;
+ return 0;
}

osmo_prim_init(&pp.oph, SAP_GSM_PH, PRIM_PH_DATA,

To view, visit change 33217. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Iaeaf7c66cb3cf5cc81bc8e15d468e8e7704c1407
Gerrit-Change-Number: 33217
Gerrit-PatchSet: 1
Gerrit-Owner: jolly <andreas@eversberg.eu>
Gerrit-MessageType: newchange