Change in osmo-hlr[master]: Cosmetic: gsup_route_find: comment addr, addrlen
osmith
gerrit-no-reply at lists.osmocom.org
Mon Apr 8 15:35:01 UTC 2019
osmith has submitted this change and it was merged. ( https://gerrit.osmocom.org/13549 )
Change subject: Cosmetic: gsup_route_find: comment addr, addrlen
......................................................................
Cosmetic: gsup_route_find: comment addr, addrlen
Describe the addr, addrlen parameters in gsup_route_find() and (more
commonly used) osmo_gsup_addr_send(). Without this description, it is
easy to get the parameters wrong and have routes not being found, as
shown with debug prints like these:
gsup_route_find: addr, addrlen: "MSC-13-37-00-00-00-00", 21
gsup_route_find: comparing with: "MSC-13-37-00-00-00-00\0", 22
Change-Id: Ib79878970bd07caac6eb921af8ae95403b90a4cb
---
M src/gsup_router.c
M src/gsup_send.c
2 files changed, 15 insertions(+), 2 deletions(-)
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
diff --git a/src/gsup_router.c b/src/gsup_router.c
index 16ea202..4fedd38 100644
--- a/src/gsup_router.c
+++ b/src/gsup_router.c
@@ -33,7 +33,13 @@
struct osmo_gsup_conn *conn;
};
-/* find a route for the given address */
+/*! Find a route for the given address.
+ * \param[in] gs gsup server
+ * \param[in] addr IPA name of the client (SGSN, MSC/VLR). Although this is passed like a blob, together with the
+ * length, it must be nul-terminated! This is for legacy reasons, see the discussion here:
+ * https://gerrit.osmocom.org/#/c/osmo-hlr/+/13048/
+ * \param[in] addrlen length of addr, *including the nul-byte* (strlen(addr) + 1).
+ */
struct osmo_gsup_conn *gsup_route_find(struct osmo_gsup_server *gs,
const uint8_t *addr, size_t addrlen)
{
diff --git a/src/gsup_send.c b/src/gsup_send.c
index b2c4e02..889cf63 100644
--- a/src/gsup_send.c
+++ b/src/gsup_send.c
@@ -26,7 +26,14 @@
#include <osmocom/core/logging.h>
-/* Send a msgb to a given address using routing */
+/*! Send a msgb to a given address using routing.
+ * \param[in] gs gsup server
+ * \param[in] addr IPA name of the client (SGSN, MSC/VLR). Although this is passed like a blob, together with the
+ * length, it must be nul-terminated! This is for legacy reasons, see the discussion here:
+ * https://gerrit.osmocom.org/#/c/osmo-hlr/+/13048/
+ * \param[in] addrlen length of addr, *including the nul-byte* (strlen(addr) + 1).
+ * \param[in] msg message buffer
+ */
int osmo_gsup_addr_send(struct osmo_gsup_server *gs,
const uint8_t *addr, size_t addrlen,
struct msgb *msg)
--
To view, visit https://gerrit.osmocom.org/13549
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ib79878970bd07caac6eb921af8ae95403b90a4cb
Gerrit-Change-Number: 13549
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Pau Espin Pedrol <pespin at sysmocom.de>
Gerrit-Reviewer: Vadim Yanitskiy <axilirator at gmail.com>
Gerrit-Reviewer: osmith <osmith at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190408/a7849a44/attachment.html>
More information about the gerrit-log
mailing list