<p>pespin has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/26685">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">RTP IuUP Emulation: Avoid spamming with retransmitted Init<br><br>Until now, an Init was sent on each RTP transmit period, clogging the<br>pcap files. Moreover, this is break by design, since transmitting<br>another Init so close the the previous one would give no time to the<br>transmitter to receive the Init ACk and move state, which means the<br>other end would potentially be reconfigured each time (for each Init).<br><br>Change-Id: I8e299a3fe49f9d31cae182f7ed4dc0ea3fc22ba2<br>---<br>M library/IuUP_Emulation.ttcn<br>M library/RTP_Emulation.ttcn<br>2 files changed, 10 insertions(+), 2 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/85/26685/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/library/IuUP_Emulation.ttcn b/library/IuUP_Emulation.ttcn</span><br><span>index b35602c..a4ca659 100644</span><br><span>--- a/library/IuUP_Emulation.ttcn</span><br><span>+++ b/library/IuUP_Emulation.ttcn</span><br><span>@@ -124,8 +124,12 @@</span><br><span>     select (st.state) {</span><br><span>          case (ST_INIT) {</span><br><span>                     if (st.cfg.active_init) {</span><br><span style="color: hsl(0, 100%, 40%);">-                               /* send INIT */</span><br><span style="color: hsl(0, 100%, 40%);">-                         pdu := valueof(ts_IuUP_INIT('160051673C01270000820000001710000100'O));</span><br><span style="color: hsl(120, 100%, 40%);">+                                if (not isvalue(st.pending_tx_pdu)) {</span><br><span style="color: hsl(120, 100%, 40%);">+                                 /* send INIT */</span><br><span style="color: hsl(120, 100%, 40%);">+                                       pdu := valueof(ts_IuUP_INIT('160051673C01270000820000001710000100'O));</span><br><span style="color: hsl(120, 100%, 40%);">+                                        st.pending_tx_pdu := pdu;</span><br><span style="color: hsl(120, 100%, 40%);">+                             } /* else: wait for INIT-ACK return ''O at the end */</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>                      } else {</span><br><span>                             /* wait for INIT */</span><br><span>                          if (isvalue(st.pending_tx_pdu)) {</span><br><span>diff --git a/library/RTP_Emulation.ttcn b/library/RTP_Emulation.ttcn</span><br><span>index b2360dc..bdca75d 100644</span><br><span>--- a/library/RTP_Emulation.ttcn</span><br><span>+++ b/library/RTP_Emulation.ttcn</span><br><span>@@ -345,6 +345,10 @@</span><br><span> private function f_tx_rtp(octetstring payload, BIT1 marker := '0'B) runs on RTP_Emulation_CT {</span><br><span>      if (g_cfg.iuup_mode) {</span><br><span>               payload := f_IuUP_Em_tx_encap(g_iuup_ent, payload);</span><br><span style="color: hsl(120, 100%, 40%);">+           if (lengthof(payload) == 0) {</span><br><span style="color: hsl(120, 100%, 40%);">+                 /* Nothing to transmit, waiting for INIT-ACK */</span><br><span style="color: hsl(120, 100%, 40%);">+                       return;</span><br><span style="color: hsl(120, 100%, 40%);">+               }</span><br><span>    }</span><br><span>    var PDU_RTP rtp := valueof(ts_RTP(g_cfg.tx_ssrc, g_cfg.tx_payload_type, g_tx_next_seq,</span><br><span>                                         g_tx_next_ts, payload, marker));</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/26685">change 26685</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/26685"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-ttcn3-hacks </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I8e299a3fe49f9d31cae182f7ed4dc0ea3fc22ba2 </div>
<div style="display:none"> Gerrit-Change-Number: 26685 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>