aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/include
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2017-03-04 03:15:53 +0100
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2017-06-18 17:41:10 +0200
commit4be4afe9b792852be011e6a2af8e30fef76b8b53 (patch)
treeb344744b9940c77a4c2070b6ebb22c690b721821 /openbsc/include
parent8bca67a60af40de9f8653b3510f67f35c15c727e (diff)
gsup_client: allow passing a unit id to identify with HLR
Before, each GSUP client would contact the HLR with an identical unit id, i.e. "SGSN-00-00-00-00-00-00", with the result that some messages were sucked off by the wrong client. Pass explicit unit name from each gsup client user, so that OsmoMSC is "MSC" and OsmoSGSN is "SGSN". Hence the HLR can properly route the messages. Todo: also set some values instead of the zeros. Unrelated cosmetic change while editing the arguments: gsup_client_create()'s definition's oap client config arg name mismatched the one used in the declaration. Use oapc_config in both. Change-Id: I3f8d6dd47c7013920e2a4bde006ed77afd974e80
Diffstat (limited to 'openbsc/include')
-rw-r--r--openbsc/include/openbsc/gsup_client.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/openbsc/include/openbsc/gsup_client.h b/openbsc/include/openbsc/gsup_client.h
index a113225e1..4a25490f6 100644
--- a/openbsc/include/openbsc/gsup_client.h
+++ b/openbsc/include/openbsc/gsup_client.h
@@ -37,6 +37,8 @@ typedef int (*gsup_client_read_cb_t)(struct gsup_client *gsupc,
struct msgb *msg);
struct gsup_client {
+ const char *unit_name;
+
struct ipa_client_conn *link;
gsup_client_read_cb_t read_cb;
void *data;
@@ -49,10 +51,11 @@ struct gsup_client {
int got_ipa_pong;
};
-struct gsup_client *gsup_client_create(const char *ip_addr,
+struct gsup_client *gsup_client_create(const char *unit_name,
+ const char *ip_addr,
unsigned int tcp_port,
gsup_client_read_cb_t read_cb,
- struct oap_client_config *oap_config);
+ struct oap_client_config *oapc_config);
void gsup_client_destroy(struct gsup_client *gsupc);
int gsup_client_send(struct gsup_client *gsupc, struct msgb *msg);