From c03d3ae7af27edc035316f9d21aab5437f934b07 Mon Sep 17 00:00:00 2001 From: Max Date: Thu, 23 Jun 2016 17:59:51 +0200 Subject: DTXu: move copy-pasted code to common part Abstract code for checking/setting lchan's UL SID flag and RTP Marker into generic function and use it for LC15 and sysmoBTS. Change-Id: Ica5392e92bab29164711163e7b01adb174272883 Related: OS#1750 --- src/common/msg_utils.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/common/msg_utils.c') diff --git a/src/common/msg_utils.c b/src/common/msg_utils.c index 6f42f73b..4c0a2cc4 100644 --- a/src/common/msg_utils.c +++ b/src/common/msg_utils.c @@ -86,6 +86,17 @@ static int check_manuf(struct msgb *msg, struct abis_om_hdr *omh, size_t msg_siz return type; } +/* update lchan SID status */ +void lchan_set_marker(bool t, struct gsm_lchan *lchan) +{ + if (t) + lchan->tch.ul_sid = true; + else if (lchan->tch.ul_sid) { + lchan->tch.ul_sid = false; + lchan->rtp_tx_marker = true; + } +} + /* store the last SID frame in lchan context */ void save_last_sid(struct gsm_lchan *lchan, uint8_t *l1_payload, size_t length, uint32_t fn, bool update) -- cgit v1.2.3