<p>osmith <strong>merged</strong> this change.</p><p><a href="https://gerrit.osmocom.org/13549">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  Jenkins Builder: Verified
  Pau Espin Pedrol: Looks good to me, but someone else must approve
  Vadim Yanitskiy: Looks good to me, but someone else must approve
  osmith: Looks good to me, approved

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">Cosmetic: gsup_route_find: comment addr, addrlen<br><br>Describe the addr, addrlen parameters in gsup_route_find() and (more<br>commonly used) osmo_gsup_addr_send(). Without this description, it is<br>easy to get the parameters wrong and have routes not being found, as<br>shown with debug prints like these:<br><br>gsup_route_find: addr, addrlen: "MSC-13-37-00-00-00-00", 21<br>gsup_route_find: comparing with: "MSC-13-37-00-00-00-00\0", 22<br><br>Change-Id: Ib79878970bd07caac6eb921af8ae95403b90a4cb<br>---<br>M src/gsup_router.c<br>M src/gsup_send.c<br>2 files changed, 15 insertions(+), 2 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/gsup_router.c b/src/gsup_router.c</span><br><span>index 16ea202..4fedd38 100644</span><br><span>--- a/src/gsup_router.c</span><br><span>+++ b/src/gsup_router.c</span><br><span>@@ -33,7 +33,13 @@</span><br><span>         struct osmo_gsup_conn *conn;</span><br><span> };</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-/* find a route for the given address */</span><br><span style="color: hsl(120, 100%, 40%);">+/*! Find a route for the given address.</span><br><span style="color: hsl(120, 100%, 40%);">+ * \param[in] gs gsup server</span><br><span style="color: hsl(120, 100%, 40%);">+ * \param[in] addr IPA name of the client (SGSN, MSC/VLR). Although this is passed like a blob, together with the</span><br><span style="color: hsl(120, 100%, 40%);">+ *                 length, it must be nul-terminated! This is for legacy reasons, see the discussion here:</span><br><span style="color: hsl(120, 100%, 40%);">+ *                 https://gerrit.osmocom.org/#/c/osmo-hlr/+/13048/</span><br><span style="color: hsl(120, 100%, 40%);">+ * \param[in] addrlen length of addr, *including the nul-byte* (strlen(addr) + 1).</span><br><span style="color: hsl(120, 100%, 40%);">+ */</span><br><span> struct osmo_gsup_conn *gsup_route_find(struct osmo_gsup_server *gs,</span><br><span>                                    const uint8_t *addr, size_t addrlen)</span><br><span> {</span><br><span>diff --git a/src/gsup_send.c b/src/gsup_send.c</span><br><span>index b2c4e02..889cf63 100644</span><br><span>--- a/src/gsup_send.c</span><br><span>+++ b/src/gsup_send.c</span><br><span>@@ -26,7 +26,14 @@</span><br><span> </span><br><span> #include <osmocom/core/logging.h></span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-/* Send a msgb to a given address using routing */</span><br><span style="color: hsl(120, 100%, 40%);">+/*! Send a msgb to a given address using routing.</span><br><span style="color: hsl(120, 100%, 40%);">+ * \param[in] gs gsup server</span><br><span style="color: hsl(120, 100%, 40%);">+ * \param[in] addr IPA name of the client (SGSN, MSC/VLR). Although this is passed like a blob, together with the</span><br><span style="color: hsl(120, 100%, 40%);">+ *                 length, it must be nul-terminated! This is for legacy reasons, see the discussion here:</span><br><span style="color: hsl(120, 100%, 40%);">+ *                 https://gerrit.osmocom.org/#/c/osmo-hlr/+/13048/</span><br><span style="color: hsl(120, 100%, 40%);">+ * \param[in] addrlen length of addr, *including the nul-byte* (strlen(addr) + 1).</span><br><span style="color: hsl(120, 100%, 40%);">+ * \param[in] msg message buffer</span><br><span style="color: hsl(120, 100%, 40%);">+ */</span><br><span> int osmo_gsup_addr_send(struct osmo_gsup_server *gs,</span><br><span>                         const uint8_t *addr, size_t addrlen,</span><br><span>                         struct msgb *msg)</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/13549">change 13549</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/13549"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-hlr </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: merged </div>
<div style="display:none"> Gerrit-Change-Id: Ib79878970bd07caac6eb921af8ae95403b90a4cb </div>
<div style="display:none"> Gerrit-Change-Number: 13549 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: osmith <osmith@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Harald Welte <laforge@gnumonks.org> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder (1000002) </div>
<div style="display:none"> Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Pau Espin Pedrol <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Vadim Yanitskiy <axilirator@gmail.com> </div>
<div style="display:none"> Gerrit-Reviewer: osmith <osmith@sysmocom.de> </div>