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

Change subject: tests/osmo-pcap/osmux: Replace deprecated API 
osmux_xfrm_output_init2()
......................................................................

tests/osmo-pcap/osmux: Replace deprecated API osmux_xfrm_output_init2()

Replacing this one with the newer API was missed a few commits ago when
this API was marked as deprectated. Do it now.

Change-Id: Ia0958dfae951d82feafe427eff2112d327d3b0a4
---
M tests/osmo-pcap-test/osmux_test.c
1 file changed, 9 insertions(+), 4 deletions(-)

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



diff --git a/tests/osmo-pcap-test/osmux_test.c 
b/tests/osmo-pcap-test/osmux_test.c
index a1aa199..bbb395c 100644
--- a/tests/osmo-pcap-test/osmux_test.c
+++ b/tests/osmo-pcap-test/osmux_test.c
@@ -37,7 +37,7 @@
  * This is the output handle for osmux, it stores last RTP sequence and
  * timestamp that has been used. There should be one per circuit ID.
  */
-static struct osmux_out_handle h_output;
+static struct osmux_out_handle *h_output;

 static void tx_cb(struct msgb *msg, void *data)
 {
@@ -57,7 +57,7 @@

        /* This code below belongs to the osmux receiver */
        while((osmuxh = osmux_xfrm_output_pull(batch_msg)) != NULL)
-               osmux_xfrm_output_sched(&h_output, osmuxh);
+               osmux_xfrm_output_sched(h_output, osmuxh);
        msgb_free(batch_msg);
 }

@@ -190,8 +190,11 @@
        osmo_pcap.timer.cb = osmo_pcap_pkt_timer_cb;

        osmux_xfrm_input_init(&h_input);
-       osmux_xfrm_output_init2(&h_output, 0, 98);
-       osmux_xfrm_output_set_tx_cb(&h_output, tx_cb, NULL);
+
+       h_output = osmux_xfrm_output_alloc(tall_test);
+       osmux_xfrm_output_set_rtp_ssrc(h_output, 0);
+       osmux_xfrm_output_set_rtp_pl_type(h_output, 98);
+       osmux_xfrm_output_set_tx_cb(h_output, tx_cb, NULL);

        /* first run */
        osmo_pcap_pkt_timer_cb(NULL);
@@ -200,5 +203,7 @@
                osmo_select_main(0);
        }

+       talloc_free(h_output);
+
        return ret;
 }

--
To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/29527
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: Ia0958dfae951d82feafe427eff2112d327d3b0a4
Gerrit-Change-Number: 29527
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <[email protected]>
Gerrit-Reviewer: laforge <[email protected]>
Gerrit-Reviewer: pespin <[email protected]>
Gerrit-MessageType: merged

Reply via email to