aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-bts-sysmo/l1_if.c
diff options
context:
space:
mode:
authorMax <msuraev@sysmocom.de>2016-09-16 19:46:00 +0200
committerMax <msuraev@sysmocom.de>2016-09-23 17:03:00 +0200
commit70460814ce3600b9491dea6b1f541144283dcfb1 (patch)
tree9af2c692e0ee85edcae6251c148c0fd6b57cd72d /src/osmo-bts-sysmo/l1_if.c
parent527dd402c714c3ee0832fa2057b219075f8f7646 (diff)
DTX: fix SID logic
Previously receiving SID via RTP always caused it's transmission to L1 regardless of the time which might have resulted in excess traffic. Fix this by only saving SID data and transmitting it later on as necessary according to 3GPP TS 26.093 A.5.1.1. Change-Id: Ifcdc5c60d0238b704a94f6778d4e00f2b087b090 Fixes: OS#1801
Diffstat (limited to 'src/osmo-bts-sysmo/l1_if.c')
-rw-r--r--src/osmo-bts-sysmo/l1_if.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/osmo-bts-sysmo/l1_if.c b/src/osmo-bts-sysmo/l1_if.c
index 787a91db..41b09a1c 100644
--- a/src/osmo-bts-sysmo/l1_if.c
+++ b/src/osmo-bts-sysmo/l1_if.c
@@ -459,10 +459,13 @@ static int ph_tch_req(struct gsm_bts_trx *trx, struct msgb *msg,
if (!nmsg)
return -ENOMEM;
l1p = msgb_l1prim(nmsg);
- l1if_tch_encode(lchan,
- l1p->u.phDataReq.msgUnitParam.u8Buffer,
- &l1p->u.phDataReq.msgUnitParam.u8Size,
- msg->data, msg->len, u32Fn);
+ if (!l1if_tch_encode(lchan,
+ l1p->u.phDataReq.msgUnitParam.u8Buffer,
+ &l1p->u.phDataReq.msgUnitParam.u8Size,
+ msg->data, msg->len, u32Fn)) {
+ msgb_free(nmsg);
+ nmsg = NULL;
+ }
}
/* no message/data, we generate an empty traffic msg */