pespin submitted this change.
2 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.
mtp: Introduce osmo_ss7_user_find_by_si() public API
This is needed by mtp_sap/ss7_user API users to figure out whether
there's a user set up already for a given Service Indicator.
Change-Id: I7db659dc443148f3aab70d2c6229c2271346cf38
---
M TODO-RELEASE
M include/osmocom/sigtran/osmo_ss7.h
M src/ss7_hmrt.c
M src/ss7_user.c
M src/ss7_user.h
M src/xua_snm.c
6 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/TODO-RELEASE b/TODO-RELEASE
index 28aed5b..8a42b9c 100644
--- a/TODO-RELEASE
+++ b/TODO-RELEASE
@@ -12,3 +12,4 @@
libosmo-sigtran add osmo_ss7_instance_get_network_indicator()
libosmo-sigtran add osmo_ss7_user_mtp_sap_prim_down()
libosmo-sigtran add osmo_mtp_prim_xfer_req_prepend()
+libosmo-sigtran add osmo_ss7_user_find_by_si()
diff --git a/include/osmocom/sigtran/osmo_ss7.h b/include/osmocom/sigtran/osmo_ss7.h
index b560caf..9ea929f 100644
--- a/include/osmocom/sigtran/osmo_ss7.h
+++ b/include/osmocom/sigtran/osmo_ss7.h
@@ -95,6 +95,7 @@
int osmo_ss7_user_register(struct osmo_ss7_user *user, uint8_t service_ind);
int osmo_ss7_user_unregister(struct osmo_ss7_user *user, uint8_t service_ind);
+struct osmo_ss7_user *osmo_ss7_user_find_by_si(const struct osmo_ss7_instance *inst, uint8_t service_indicator);
/* MTP User wants to submit a primitive down to MTP SAP */
int osmo_ss7_user_mtp_sap_prim_down(struct osmo_ss7_user *user,
diff --git a/src/ss7_hmrt.c b/src/ss7_hmrt.c
index 81a56a8..72b26d8 100644
--- a/src/ss7_hmrt.c
+++ b/src/ss7_hmrt.c
@@ -123,7 +123,7 @@
}
/* "User Part Available?" */
- osu = ss7_user_find(inst, service_ind);
+ osu = osmo_ss7_user_find_by_si(inst, service_ind);
if (!osu) {
/* "Discard Message" */
LOGSS7(inst, LOGL_NOTICE, "No MTP-User for SI %u\n", service_ind);
diff --git a/src/ss7_user.c b/src/ss7_user.c
index 0ec42ff..7137b7a 100644
--- a/src/ss7_user.c
+++ b/src/ss7_user.c
@@ -54,7 +54,7 @@
talloc_free(user);
}
-struct osmo_ss7_user *ss7_user_find(struct osmo_ss7_instance *inst, uint8_t service_indicator)
+struct osmo_ss7_user *osmo_ss7_user_find_by_si(const struct osmo_ss7_instance *inst, uint8_t service_indicator)
{
if (service_indicator >= ARRAY_SIZE(inst->user))
return NULL;
diff --git a/src/ss7_user.h b/src/ss7_user.h
index bec6c22..25259e8 100644
--- a/src/ss7_user.h
+++ b/src/ss7_user.h
@@ -23,7 +23,6 @@
void *priv;
};
-struct osmo_ss7_user *ss7_user_find(struct osmo_ss7_instance *inst, uint8_t service_indicator);
void ss7_user_unregister_all(struct osmo_ss7_user *user);
int ss7_user_mtp_sap_prim_up(const struct osmo_ss7_user *osu, struct osmo_mtp_prim *omp);
diff --git a/src/xua_snm.c b/src/xua_snm.c
index 4890f79..efa7e91 100644
--- a/src/xua_snm.c
+++ b/src/xua_snm.c
@@ -309,7 +309,7 @@
unsigned int num_rctx;
/* Translate to MTP-STATUS.ind towards MTP-User (SCCP will create N-PCSTATE.ind to SCU) */
- osu = ss7_user_find(s7i, user);
+ osu = osmo_ss7_user_find_by_si(s7i, user);
if (osu) {
struct osmo_mtp_prim *omp = mtp_prim_status_ind_alloc(dpc, cause, false, 0);
ss7_user_mtp_sap_prim_up(osu, omp);
To view, visit change 41429. To unsubscribe, or for help writing mail filters, visit settings.