path: root/openbsc/include
diff options
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2017-03-04 03:15:53 +0100
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2017-03-16 15:32:29 +0100
commit9267123b882d1e35a4cb6a3bf746d33c4e84c8ce (patch)
tree1e138c8f75ea531f4c3d9da49f01d71860a42feb /openbsc/include
parent615ce2437f1bfe66278101903e86d2f367b3174a (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. Change-Id: I3f8d6dd47c7013920e2a4bde006ed77afd974e80
Diffstat (limited to 'openbsc/include')
2 files changed, 7 insertions, 5 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);
diff --git a/openbsc/include/openbsc/vlr.h b/openbsc/include/openbsc/vlr.h
index 9c469cec9..a72970848 100644
--- a/openbsc/include/openbsc/vlr.h
+++ b/openbsc/include/openbsc/vlr.h
@@ -259,9 +259,8 @@ int vlr_subscr_rx_imsi_detach(struct vlr_subscr *vsub);
void vlr_subscr_conn_timeout(struct vlr_subscr *vsub);
struct vlr_instance *vlr_alloc(void *ctx, const struct vlr_ops *ops);
-int vlr_start(struct vlr_instance *vlr, const char *gsup_server_addr_str,
- uint16_t gsup_server_port);
+int vlr_start(const char *gsup_unit_name, struct vlr_instance *vlr,
+ const char *gsup_server_addr_str, uint16_t gsup_server_port);
/* internal use only */