This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
osmith gerrit-no-reply at lists.osmocom.orgosmith has uploaded this change for review. ( https://gerrit.osmocom.org/13507
Change subject: sccp_scoc: move sccp_find_user() up
......................................................................
sccp_scoc: move sccp_find_user() up
Move it before sccp_scoc_rx_scrc_rout_fail(), so it can be used in
the latter function to figure out the local_ref from the user (follow
up commit).
Related: OS#3871
Change-Id: Ieabeda3126dcc0349a06c0fc7c9e468b900d7855
---
M src/sccp_scoc.c
1 file changed, 25 insertions(+), 25 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/07/13507/1
diff --git a/src/sccp_scoc.c b/src/sccp_scoc.c
index 726426c..82590a0 100644
--- a/src/sccp_scoc.c
+++ b/src/sccp_scoc.c
@@ -1329,6 +1329,31 @@
return xua;
}
+/* Find a SCCP user for given SUA message (based on SUA_IEI_DEST_ADDR */
+static struct osmo_sccp_user *sccp_find_user(struct osmo_sccp_instance *inst,
+ struct xua_msg *xua)
+{
+ int rc;
+ struct osmo_sccp_addr called_addr;
+
+ rc = sua_addr_parse(&called_addr, xua, SUA_IEI_DEST_ADDR);
+ if (rc < 0) {
+ LOGP(DLSCCP, LOGL_ERROR, "Cannot find SCCP User for XUA "
+ "Message %s without valid DEST_ADDR\n",
+ xua_hdr_dump(xua, &xua_dialect_sua));
+ return NULL;
+ }
+
+ if (!(called_addr.presence & OSMO_SCCP_ADDR_T_SSN)) {
+ LOGP(DLSCCP, LOGL_ERROR, "Cannot resolve SCCP User for "
+ "XUA Message %s without SSN in CalledAddr\n",
+ xua_hdr_dump(xua, &xua_dialect_sua));
+ return NULL;
+ }
+
+ return sccp_user_find(inst, called_addr.ssn, called_addr.pc);
+}
+
/*! \brief SCOC: Receive SCRC Routing Failure
* \param[in] inst SCCP Instance on which we operate
* \param[in] xua SUA message that was failed to route
@@ -1355,31 +1380,6 @@
}
}
-/* Find a SCCP user for given SUA message (based on SUA_IEI_DEST_ADDR */
-static struct osmo_sccp_user *sccp_find_user(struct osmo_sccp_instance *inst,
- struct xua_msg *xua)
-{
- int rc;
- struct osmo_sccp_addr called_addr;
-
- rc = sua_addr_parse(&called_addr, xua, SUA_IEI_DEST_ADDR);
- if (rc < 0) {
- LOGP(DLSCCP, LOGL_ERROR, "Cannot find SCCP User for XUA "
- "Message %s without valid DEST_ADDR\n",
- xua_hdr_dump(xua, &xua_dialect_sua));
- return NULL;
- }
-
- if (!(called_addr.presence & OSMO_SCCP_ADDR_T_SSN)) {
- LOGP(DLSCCP, LOGL_ERROR, "Cannot resolve SCCP User for "
- "XUA Message %s without SSN in CalledAddr\n",
- xua_hdr_dump(xua, &xua_dialect_sua));
- return NULL;
- }
-
- return sccp_user_find(inst, called_addr.ssn, called_addr.pc);
-}
-
/* Generate a COERR based in input arguments */
static struct xua_msg *gen_coerr(uint32_t route_ctx, uint32_t dest_ref,
uint32_t err_cause)
--
To view, visit https://gerrit.osmocom.org/13507
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ieabeda3126dcc0349a06c0fc7c9e468b900d7855
Gerrit-Change-Number: 13507
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190403/99827ca7/attachment.htm>