Change in libosmo-netif[master]: osmux: Allow forwarding AMR NO_DATA frames
pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-netif/+/30698 ) Change subject: osmux: Allow forwarding AMR NO_DATA frames ...................................................................... osmux: Allow forwarding AMR NO_DATA frames Related: SYS#6161 Change-Id: If8baebc532090ba9808af7f3dd0afec86f40a7d6 --- M src/osmux_input.c M src/osmux_output.c 2 files changed, 9 insertions(+), 5 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, but someone else must approve osmith: Looks good to me, but someone else must approve pespin: Looks good to me, approved diff --git a/src/osmux_input.c b/src/osmux_input.c index 284f08e..120f95f 100644 --- a/src/osmux_input.c +++ b/src/osmux_input.c @@ -196,9 +196,11 @@ link->osmuxh->amr_f = state->amrh->f; link->osmuxh->amr_q = state->amrh->q; - memcpy(state->out_msg->tail, osmo_amr_get_payload(state->amrh), - state->amr_payload_len); - msgb_put(state->out_msg, state->amr_payload_len); + if (state->amr_payload_len > 0) { + memcpy(state->out_msg->tail, osmo_amr_get_payload(state->amrh), + state->amr_payload_len); + msgb_put(state->out_msg, state->amr_payload_len); + } /* Update circuit state of last transmitted incoming RTP seqnum/ts: */ state->circuit->last_transmitted_rtp_seq = rtp_seqnum; diff --git a/src/osmux_output.c b/src/osmux_output.c index c240578..f48e1c9 100644 --- a/src/osmux_output.c +++ b/src/osmux_output.c @@ -158,8 +158,10 @@ msgb_put(out_msg, sizeof(struct amr_hdr)); /* add AMR speech data */ - memcpy(out_msg->tail, payload, payload_len); - msgb_put(out_msg, payload_len); + if (payload_len > 0) { + memcpy(out_msg->tail, payload, payload_len); + msgb_put(out_msg, payload_len); + } /* bump last RTP sequence number and timestamp that has been used */ h->rtp_seq++; -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/30698 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: If8baebc532090ba9808af7f3dd0afec86f40a7d6 Gerrit-Change-Number: 30698 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin@sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge@osmocom.org> Gerrit-Reviewer: osmith <osmith@sysmocom.de> Gerrit-Reviewer: pespin <pespin@sysmocom.de> Gerrit-MessageType: merged
participants (1)
-
pespin