This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
Harald Welte gerrit-no-reply at lists.osmocom.orgHarald Welte has submitted this change and it was merged.
Change subject: Fix metadata corruption
......................................................................
Fix metadata corruption
Use separate pointer for payload to make sure mblk->b_rptr is not
advanced (which breaks the use of rtp_get_* macros that assume
mblk->b_rptr is pointing to the RTP header, not the payload).
Committed by: Max <msuraev at sysmocom.de>
Change-Id: I205630e1da98693ba0ac25e86e21780284185077
Related: OS#1802
---
M src/trau/osmo_ortp.c
1 file changed, 3 insertions(+), 2 deletions(-)
Approvals:
Harald Welte: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/src/trau/osmo_ortp.c b/src/trau/osmo_ortp.c
index fc63e7f..e7c6fc4 100644
--- a/src/trau/osmo_ortp.c
+++ b/src/trau/osmo_ortp.c
@@ -145,14 +145,15 @@
static inline bool recv_with_cb(struct osmo_rtp_socket *rs)
{
+ uint8_t *payload;
mblk_t *mblk = rtp_session_recvm_with_ts(rs->sess, rs->rx_user_ts);
if (!mblk)
return false;
- int plen = rtp_get_payload(mblk, &mblk->b_rptr);
+ int plen = rtp_get_payload(mblk, &payload);
/* hand into receiver */
if (rs->rx_cb && plen > 0)
- rs->rx_cb(rs, mblk->b_rptr, plen, rtp_get_seqnumber(mblk),
+ rs->rx_cb(rs, payload, plen, rtp_get_seqnumber(mblk),
rtp_get_timestamp(mblk), rtp_get_markbit(mblk));
freemsg(mblk);
if (plen > 0)
--
To view, visit https://gerrit.osmocom.org/1171
To unsubscribe, visit https://gerrit.osmocom.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I205630e1da98693ba0ac25e86e21780284185077
Gerrit-PatchSet: 2
Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-Owner: Max <msuraev at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder