From 9fc351de69a2f3f451a2c44145fbabb156ef410a Mon Sep 17 00:00:00 2001 From: Philipp Maier Date: Mon, 17 Jul 2017 11:06:57 +0200 Subject: sccp: global addressbook search + api fix The sccp-addressbook only allows defining addresses for a specific ss7 instance. It is not possible to use an sscp-address, that is defined in the one ss7 instance in another ss7 instance. Add a second global list where all sscp-addresses are added, regardless on which instance they are defined. Fixup the search functions so that they always search the global list. Change the API, so that the address data is written to a destination pointer. This protects the stored address from unintentional changes. Also return the ss7 instance, where the address is associated with. Change-Id: I5acc1e5abc3b3081149a9f476038e4e53d23b763 --- include/osmocom/sigtran/sccp_sap.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/osmocom/sigtran/sccp_sap.h b/include/osmocom/sigtran/sccp_sap.h index 2258b0d..24d64d9 100644 --- a/include/osmocom/sigtran/sccp_sap.h +++ b/include/osmocom/sigtran/sccp_sap.h @@ -248,8 +248,8 @@ osmo_sccp_user_bind(struct osmo_sccp_instance *inst, const char *name, int osmo_sccp_user_sap_down(struct osmo_sccp_user *scu, struct osmo_prim_hdr *oph); -struct osmo_sccp_addr * -osmo_sccp_addr_by_name(const char *name, const struct osmo_ss7_instance *ss7); +struct osmo_ss7_instance * +osmo_sccp_addr_by_name(struct osmo_sccp_addr *dest_addr, + const char *name); -char * osmo_sccp_name_by_addr(const struct osmo_sccp_addr *addr, - const struct osmo_ss7_instance *ss7); +const char *osmo_sccp_name_by_addr(const struct osmo_sccp_addr *addr); -- cgit v1.2.3