<p>Vadim Yanitskiy has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/9554">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">libmsc/gsm_09_11.c: properly indicate transaction errors<br><br>Previously it was intended that we are always parsing the<br>whole GSM 04.80 message, including the Invoke ID. But<br>there is no need to do that, since we are going to<br>forward the Facility IE payload to HLR in near future.<br><br>Moreover, there was a mistake (my bad) - transaction is<br>being established before parsing of the message, so the<br>req structure remains uninitialized until that.<br><br>Let's just send RELEASE COMPLETE message without any Cause or<br>Facility IEs. We could indicate a problem using the first one,<br>but according to GSM TS 04.80, the Cause IE only makes sense<br>when "its functional handling is specified in the service<br>description or GSM TS 09.11".<br><br>Change-Id: Iecba2dccada9bbcdeb3a9dfd868719aeedc07022<br>---<br>M src/libmsc/gsm_09_11.c<br>1 file changed, 6 insertions(+), 5 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/54/9554/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/libmsc/gsm_09_11.c b/src/libmsc/gsm_09_11.c</span><br><span>index 8f7e54f..fc588f5 100644</span><br><span>--- a/src/libmsc/gsm_09_11.c</span><br><span>+++ b/src/libmsc/gsm_09_11.c</span><br><span>@@ -94,9 +94,9 @@</span><br><span>                    LOGP(DMM, LOGL_ERROR, "Unexpected message (msg_type=%s), "</span><br><span>                                 "transaction is not allocated yet\n",</span><br><span>                              gsm48_pdisc_msgtype_name(pdisc, msg_type));</span><br><span style="color: hsl(0, 100%, 40%);">-                     gsm0480_send_ussd_reject(conn, &req,</span><br><span style="color: hsl(0, 100%, 40%);">-                                GSM_0480_PROBLEM_CODE_TAG_GENERAL,</span><br><span style="color: hsl(0, 100%, 40%);">-                              GSM_0480_GEN_PROB_CODE_UNRECOGNISED);</span><br><span style="color: hsl(120, 100%, 40%);">+                 gsm48_tx_simple(conn,</span><br><span style="color: hsl(120, 100%, 40%);">+                         GSM48_PDISC_NC_SS | (tid << 4),</span><br><span style="color: hsl(120, 100%, 40%);">+                         GSM0480_MTYPE_RELEASE_COMPLETE);</span><br><span>                     return -EINVAL;</span><br><span>              }</span><br><span> </span><br><span>@@ -105,8 +105,9 @@</span><br><span>                  pdisc, tid, new_callref++);</span><br><span>          if (!trans) {</span><br><span>                        DEBUGP(DMM, " -> No memory for trans\n");</span><br><span style="color: hsl(0, 100%, 40%);">-                  gsm0480_send_ussd_return_error(conn, &req,</span><br><span style="color: hsl(0, 100%, 40%);">-                          GSM0480_ERR_CODE_SYSTEM_FAILURE);</span><br><span style="color: hsl(120, 100%, 40%);">+                     gsm48_tx_simple(conn,</span><br><span style="color: hsl(120, 100%, 40%);">+                         GSM48_PDISC_NC_SS | (tid << 4),</span><br><span style="color: hsl(120, 100%, 40%);">+                         GSM0480_MTYPE_RELEASE_COMPLETE);</span><br><span>                     return -ENOMEM;</span><br><span>              }</span><br><span> </span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/9554">change 9554</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/9554"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-msc </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: Iecba2dccada9bbcdeb3a9dfd868719aeedc07022 </div>
<div style="display:none"> Gerrit-Change-Number: 9554 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Vadim Yanitskiy <axilirator@gmail.com> </div>