pespin has submitted this change. ( 
https://gerrit.osmocom.org/c/libosmo-netif/+/30149 )

Change subject: osmux: Use msgb_copy() API in osmux_replay_lost_packets()
......................................................................

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(-)

Approvals:
  Jenkins Builder: Verified
  laforge: Looks good to me, approved



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 https://gerrit.osmocom.org/c/libosmo-netif/+/30149
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: I137872af77dbce68210ad8ef7f61bd337811c7c4
Gerrit-Change-Number: 30149
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <[email protected]>
Gerrit-Reviewer: pespin <[email protected]>
Gerrit-MessageType: merged

Reply via email to