Review at  https://gerrit.osmocom.org/7567

RTP_Emulation: Fix receive templates

The connection ID part of the template must be updated after we
created the respective sockets. It was done to early.

Change-Id: I37306d841df3d27d30fd89fb99c863370517e3ff
---
M library/RTP_Emulation.ttcn
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/67/7567/1

diff --git a/library/RTP_Emulation.ttcn b/library/RTP_Emulation.ttcn
index 60f040a..be4bcc4 100644
--- a/library/RTP_Emulation.ttcn
+++ b/library/RTP_Emulation.ttcn
@@ -206,9 +206,7 @@
        };
        var template RTP_RecvFrom tr_rtp := tr;
        var template RTP_RecvFrom tr_rtcp := tr;
-       tr_rtp.connId := g_rtp_conn_id;
        tr_rtp.msg := { rtp := ? };
-       tr_rtp.connId := g_rtcp_conn_id;
        tr_rtcp.msg := { rtcp := ? };
 
        g_iuup_ent := valueof(t_IuUP_Entity(g_cfg.iuup_tx_init));
@@ -225,9 +223,11 @@
                        res := RTP_CodecPort_CtrlFunct.f_IPL4_listen(RTP, 
g_local_host,
                                                                g_local_port, 
{udp:={}});
                        g_rtp_conn_id := res.connId;
+                       tr_rtp.connId := g_rtp_conn_id;
                        res := RTP_CodecPort_CtrlFunct.f_IPL4_listen(RTP, 
g_local_host,
                                                                g_local_port+1, 
{udp:={}});
                        g_rtcp_conn_id := res.connId;
+                       tr_rtcp.connId := g_rtcp_conn_id;
                        CTRL.reply(RTPEM_bind:{g_local_host, g_local_port});
                }
                [] CTRL.getcall(RTPEM_connect:{?,?}) -> param (g_remote_host, 
g_remote_port) {

-- 
To view, visit https://gerrit.osmocom.org/7567
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I37306d841df3d27d30fd89fb99c863370517e3ff
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <[email protected]>

Reply via email to