<p>laforge <strong>submitted</strong> this change.</p><p><a href="https://gerrit.osmocom.org/c/libosmocore/+/21725">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  Jenkins Builder: Verified
  laforge: Looks good to me, approved
  daniel: Looks good to me, but someone else must approve

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">gprs_ns2: don't pass the return code of reject_status_msg<br><br>When reject_stats_msg() fails the code can't do anything about it.<br>Stick to the original failure code and log it<br><br>Change-Id: I105363957e59c41a68835b7a9830c048dba73e93<br>---<br>M src/gb/gprs_ns2.c<br>1 file changed, 5 insertions(+), 10 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/gb/gprs_ns2.c b/src/gb/gprs_ns2.c</span><br><span>index 49606d8..5603fce 100644</span><br><span>--- a/src/gb/gprs_ns2.c</span><br><span>+++ b/src/gb/gprs_ns2.c</span><br><span>@@ -832,18 +832,13 @@</span><br><span>                 }</span><br><span> </span><br><span>                rc = reject_status_msg(msg, &tp, reject, NS_CAUSE_PDU_INCOMP_PSTATE);</span><br><span style="color: hsl(0, 100%, 40%);">-               if (rc < 0) {</span><br><span style="color: hsl(120, 100%, 40%);">+              if (rc < 0)</span><br><span>                       LOGP(DLNS, LOGL_ERROR, "Failed to generate reject message (%d)\n", rc);</span><br><span style="color: hsl(0, 100%, 40%);">-                       return rc;</span><br><span style="color: hsl(0, 100%, 40%);">-              }</span><br><span>            return GPRS_NS2_CS_REJECTED;</span><br><span>         default:</span><br><span>             rc = reject_status_msg(msg, &tp, reject, NS_CAUSE_PDU_INCOMP_PSTATE);</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-               if (rc < 0) {</span><br><span style="color: hsl(120, 100%, 40%);">+              if (rc < 0)</span><br><span>                       LOGP(DLNS, LOGL_ERROR, "Failed to generate reject message (%d)\n", rc);</span><br><span style="color: hsl(0, 100%, 40%);">-                       return rc;</span><br><span style="color: hsl(0, 100%, 40%);">-              }</span><br><span>            return GPRS_NS2_CS_REJECTED;</span><br><span>         }</span><br><span> </span><br><span>@@ -854,10 +849,8 @@</span><br><span>                 LOGP(DLNS, LOGL_ERROR, "Rx NS RESET Error %d during "</span><br><span>                                     "TLV Parse\n", tlv);</span><br><span>                rc = reject_status_msg(msg, &tp, reject, NS_CAUSE_PROTO_ERR_UNSPEC);</span><br><span style="color: hsl(0, 100%, 40%);">-                if (rc < 0) {</span><br><span style="color: hsl(120, 100%, 40%);">+              if (rc < 0)</span><br><span>                       LOGP(DLNS, LOGL_ERROR, "Failed to generate reject message (%d)\n", rc);</span><br><span style="color: hsl(0, 100%, 40%);">-                       return rc;</span><br><span style="color: hsl(0, 100%, 40%);">-              }</span><br><span>            return GPRS_NS2_CS_REJECTED;</span><br><span>         }</span><br><span> </span><br><span>@@ -865,6 +858,8 @@</span><br><span>      !TLVP_PRES_LEN(&tp, NS_IE_VCI, 2) || !TLVP_PRES_LEN(&tp, NS_IE_NSEI, 2)) {</span><br><span>               LOGP(DLNS, LOGL_ERROR, "NS RESET Missing mandatory IE\n");</span><br><span>                 rc = reject_status_msg(msg, &tp, reject, NS_CAUSE_MISSING_ESSENT_IE);</span><br><span style="color: hsl(120, 100%, 40%);">+             if (rc < 0)</span><br><span style="color: hsl(120, 100%, 40%);">+                        LOGP(DLNS, LOGL_ERROR, "Failed to generate reject message (%d)\n", rc);</span><br><span>            return GPRS_NS2_CS_REJECTED;</span><br><span>         }</span><br><span> </span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/libosmocore/+/21725">change 21725</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/libosmocore/+/21725"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: libosmocore </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I105363957e59c41a68835b7a9830c048dba73e93 </div>
<div style="display:none"> Gerrit-Change-Number: 21725 </div>
<div style="display:none"> Gerrit-PatchSet: 3 </div>
<div style="display:none"> Gerrit-Owner: lynxis lazus <lynxis@fe80.eu> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-Reviewer: daniel <dwillmann@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-MessageType: merged </div>