<p>Harald Welte has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/13990">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">Make f_gen_tr_ss_ies() work for both 'latest' and 'master'<br><br>This fixes the partial revert of c43c8cd275b4f71b0bc6a50fc81564c812d5b406<br>to work for both situtions:  Messages that have the OSMO_GSUP_MESSAGE_CLASS_USSD<br>and messages that don't.<br><br>The particular implementation is rather ugly, but we're waiting for<br>a response to https://www.eclipse.org/forums/index.php/t/1098847/<br>on how to solve this kind of problem in a more elegant way.  Meanwile,<br>we make it work first.<br><br>Change-Id: Ibf137de6a41aaa43894cc0b6da8341ceb88b0756<br>---<br>M library/GSUP_Types.ttcn<br>1 file changed, 9 insertions(+), 1 deletion(-)<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/90/13990/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/library/GSUP_Types.ttcn b/library/GSUP_Types.ttcn</span><br><span>index 7e26e19..44b9f26 100644</span><br><span>--- a/library/GSUP_Types.ttcn</span><br><span>+++ b/library/GSUP_Types.ttcn</span><br><span>@@ -1091,15 +1091,23 @@</span><br><span>          tr_GSUP_IE_SessionId(sid),</span><br><span>           tr_GSUP_IE_SessionState(state)</span><br><span>       };</span><br><span style="color: hsl(120, 100%, 40%);">+    var integer last_idx := 3;</span><br><span> </span><br><span>       /* Optional SS payload */</span><br><span>    if (istemplatekind(ss, "*")) {</span><br><span>             ies[3] := *;</span><br><span style="color: hsl(120, 100%, 40%);">+          last_idx := last_idx + 1;</span><br><span>    } else if (not istemplatekind(ss, "omit")) {</span><br><span>               ies[3] := tr_GSUP_IE_SSInfo(ss);</span><br><span style="color: hsl(120, 100%, 40%);">+              last_idx := last_idx + 1;</span><br><span>    }</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-   return ies;</span><br><span style="color: hsl(120, 100%, 40%);">+   /* the GSUP Message Class IE is optional, as old implementations don't have it yet */</span><br><span style="color: hsl(120, 100%, 40%);">+     var template GSUP_IEs ies2 := ies;</span><br><span style="color: hsl(120, 100%, 40%);">+    ies2[last_idx] := tr_GSUP_IE_Message_Class(OSMO_GSUP_MESSAGE_CLASS_USSD);</span><br><span style="color: hsl(120, 100%, 40%);">+     last_idx := last_idx + 1;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+   return (ies, ies2);</span><br><span> }</span><br><span> </span><br><span> template (value) GSUP_PDU ts_GSUP_PROC_SS_REQ(</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/13990">change 13990</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/13990"/><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-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: Ibf137de6a41aaa43894cc0b6da8341ceb88b0756 </div>
<div style="display:none"> Gerrit-Change-Number: 13990 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Harald Welte <laforge@gnumonks.org> </div>