<p><a href="https://gerrit.osmocom.org/c/libosmocore/+/18506">View Change</a></p><p>1 comment:</p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/c/libosmocore/+/18506/2/src/gsm/gsm23236.c">File src/gsm/gsm23236.c:</a></p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/libosmocore/+/18506/2/src/gsm/gsm23236.c@36">Patch Set #2, Line 36:</a> <code style="font-family:monospace,monospace">int16_t</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">The function itself returns an error code: […]</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">whether this function fails or not is a separate aspect of whether, say, osmo-bsc's VTY config wants to indicate that a stored nri_v is invalid or not. For example, we may need to configure a separate NULL-NRI for each MSC. If I want to indicate in the config that some MSC has no NULL-NRI configured, I can set it negative (or need a separate bool). So I choose to have negative NRI to indicate invalid, and then of course I want to have one consistent data type everywhere. We can also use uint16_t with a #define OSMO_NRI_INVALID, if you prefer that, but using a signed integer is less code. Or I could add 'typedef int16_t osmo_nri_v'?</p><p style="white-space: pre-wrap; word-wrap: break-word;">Before, I had the nri_v as return value, being negative on error, but some review didn't like that. It is IMHO also nicer with a separate return value, consistently for both this and osmo_tmsi_nri_set(). So I will not go back to returning the nri_v.</p><p style="white-space: pre-wrap; word-wrap: break-word;">re "confusing": the api doc explains everything, which part do you find confusing? Should I add "is always positive" to the 'nri_v' api doc?</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.osmocom.org/c/libosmocore/+/18506">change 18506</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/+/18506"/><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: Icb57a2dd9323c7ea11b34003eccc7e68a0247bf5 </div>
<div style="display:none"> Gerrit-Change-Number: 18506 </div>
<div style="display:none"> Gerrit-PatchSet: 4 </div>
<div style="display:none"> Gerrit-Owner: neels <nhofmeyr@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-Reviewer: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-Reviewer: neels <nhofmeyr@sysmocom.de> </div>
<div style="display:none"> Gerrit-CC: Vadim Yanitskiy <vyanitskiy@sysmocom.de> </div>
<div style="display:none"> Gerrit-CC: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-Comment-Date: Wed, 03 Jun 2020 14:20:11 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-Has-Labels: No </div>
<div style="display:none"> Comment-In-Reply-To: Vadim Yanitskiy <vyanitskiy@sysmocom.de> </div>
<div style="display:none"> Comment-In-Reply-To: neels <nhofmeyr@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: comment </div>