aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/libvlr
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2017-03-04 03:15:53 +0100
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2017-03-09 18:34:14 +0100
commitbe81545e401c2da91cfc98b308f2d843dbbb3950 (patch)
treefb44c289d06c1aec269e9ad7d4eeb1b8b7044bea /openbsc/src/libvlr
parent53436d2031ecb8706615a17c77c8359b6033f36e (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/src/libvlr')
-rw-r--r--openbsc/src/libvlr/vlr.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/openbsc/src/libvlr/vlr.c b/openbsc/src/libvlr/vlr.c
index bc8d43d92..db874f298 100644
--- a/openbsc/src/libvlr/vlr.c
+++ b/openbsc/src/libvlr/vlr.c
@@ -959,12 +959,13 @@ struct vlr_instance *vlr_alloc(void *ctx, const struct vlr_ops *ops)
return vlr;
}
-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)
{
OSMO_ASSERT(vlr);
- vlr->gsup_client = gsup_client_create(gsup_server_addr_str,
+ vlr->gsup_client = gsup_client_create(gsup_unit_name,
+ gsup_server_addr_str,
gsup_server_port,
&vlr_gsupc_read_cb, NULL);
if (!vlr->gsup_client)