pespin has uploaded this change for review.

View Change

osmux: Use msgb_copy() API in osmux_replay_lost_packets()

Change-Id: I137872af77dbce68210ad8ef7f61bd337811c7c4
---
M src/osmux_input.c
1 file changed, 1 insertion(+), 4 deletions(-)

git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/49/30149/1
diff --git a/src/osmux_input.c b/src/osmux_input.c
index de54174..eff2423 100644
--- a/src/osmux_input.c
+++ b/src/osmux_input.c
@@ -385,13 +385,10 @@
struct msgb *clone;

/* Clone last RTP packet seen */
- clone = msgb_alloc(last->data_len, "RTP clone");
+ clone = msgb_copy(last, "RTP clone");
if (!clone)
continue;

- memcpy(clone->data, last->data, last->len);
- msgb_put(clone, last->len);
-
/* The original RTP message has been already sanity checked. */
rtph = osmo_rtp_get_hdr(clone);


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

Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: I137872af77dbce68210ad8ef7f61bd337811c7c4
Gerrit-Change-Number: 30149
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin@sysmocom.de>
Gerrit-MessageType: newchange