Remove local libgsupclient; Use libosmo-gsup-client from osmo-hlr
osmo-hlr has recently (as of Change-Id
Iad227bb477d64da30dd6bfbbe1bd0c0a55be9474) a working shared library
implementation of libosmo-gsup-client.
We can remove the local implementation in osmo-msc and use the
system-installed shared library instead.
Change-Id: I6f542945403cf2e3ddac419186b09ec0e2d43b69
diff --git a/tests/msc_vlr/Makefile.am b/tests/msc_vlr/Makefile.am
index 8b29f79..e6b20e6 100644
--- a/tests/msc_vlr/Makefile.am
+++ b/tests/msc_vlr/Makefile.am
@@ -15,11 +15,12 @@
$(LIBOSMORANAP_CFLAGS) \
$(LIBASN1C_CFLAGS) \
$(LIBOSMOMGCPCLIENT_CFLAGS) \
+ $(LIBOSMOGSUPCLIENT_CFLAGS) \
$(NULL)
AM_LDFLAGS = \
- -Wl,--wrap=gsup_client_create \
- -Wl,--wrap=gsup_client_send \
+ -Wl,--wrap=osmo_gsup_client_create \
+ -Wl,--wrap=osmo_gsup_client_send \
-Wl,--wrap=a_iface_tx_dtap \
-Wl,--wrap=a_iface_tx_clear_cmd \
-Wl,--wrap=a_iface_tx_paging \
@@ -39,7 +40,6 @@
LDADD = \
$(top_builddir)/src/libmsc/libmsc.a \
$(top_builddir)/src/libvlr/libvlr.a \
- $(top_builddir)/src/libgsupclient/libgsupclient.a \
$(LIBSMPP34_LIBS) \
$(LIBOSMOCORE_LIBS) \
$(LIBOSMOGSM_LIBS) \
@@ -48,6 +48,7 @@
$(LIBOSMOSIGTRAN_LIBS) \
$(LIBOSMORANAP_LIBS) \
$(LIBOSMOMGCPCLIENT_LIBS) \
+ $(LIBOSMOGSUPCLIENT_LIBS) \
$(LIBRARY_GSM) \
-ldbi \
-lrt \
diff --git a/tests/msc_vlr/msc_vlr_tests.c b/tests/msc_vlr/msc_vlr_tests.c
index 1488109..f8551dd 100644
--- a/tests/msc_vlr/msc_vlr_tests.c
+++ b/tests/msc_vlr/msc_vlr_tests.c
@@ -30,7 +30,7 @@
#include <osmocom/core/application.h>
#include <osmocom/gsm/protocol/gsm_04_11.h>
#include <osmocom/gsm/gsup.h>
-#include <osmocom/msc/gsup_client.h>
+#include <osmocom/gsupclient/gsup_client.h>
#include <osmocom/msc/gsm_04_11.h>
#include <osmocom/msc/debug.h>
#include <osmocom/msc/gsm_04_08.h>
@@ -138,7 +138,7 @@
dtap_tx_confirmed = false;
}
-int vlr_gsupc_read_cb(struct gsup_client *gsupc, struct msgb *msg);
+int vlr_gsupc_read_cb(struct osmo_gsup_client *gsupc, struct msgb *msg);
void gsup_rx(const char *rx_hex, const char *expect_tx_hex)
{
@@ -494,24 +494,24 @@
}
/* override, requires '-Wl,--wrap=gsup_client_create' */
-struct gsup_client *
-__real_gsup_client_create(const char *ip_addr, unsigned int tcp_port,
- gsup_client_read_cb_t read_cb,
+struct osmo_gsup_client *
+__real_osmo_gsup_client_create(const char *ip_addr, unsigned int tcp_port,
+ osmo_gsup_client_read_cb_t read_cb,
struct osmo_oap_client_config *oap_config);
-struct gsup_client *
-__wrap_gsup_client_create(const char *ip_addr, unsigned int tcp_port,
- gsup_client_read_cb_t read_cb,
+struct osmo_gsup_client *
+__wrap_osmo_gsup_client_create(const char *ip_addr, unsigned int tcp_port,
+ osmo_gsup_client_read_cb_t read_cb,
struct osmo_oap_client_config *oap_config)
{
- struct gsup_client *gsupc;
- gsupc = talloc_zero(msc_vlr_tests_ctx, struct gsup_client);
+ struct osmo_gsup_client *gsupc;
+ gsupc = talloc_zero(msc_vlr_tests_ctx, struct osmo_gsup_client);
OSMO_ASSERT(gsupc);
return gsupc;
}
/* override, requires '-Wl,--wrap=gsup_client_send' */
-int __real_gsup_client_send(struct gsup_client *gsupc, struct msgb *msg);
-int __wrap_gsup_client_send(struct gsup_client *gsupc, struct msgb *msg)
+int __real_osmo_gsup_client_send(struct osmo_gsup_client *gsupc, struct msgb *msg);
+int __wrap_osmo_gsup_client_send(struct osmo_gsup_client *gsupc, struct msgb *msg)
{
const char *is = osmo_hexdump_nospc(msg->data, msg->len);
fprintf(stderr, "GSUP --> HLR: %s: %s\n",
@@ -831,7 +831,7 @@
/* Expecting these to stick around in msc_vlr_tests_ctx:
* talloc_total_blocks(tall_bsc_ctx) == 12
* full talloc report on 'msc_vlr_tests_ctx' (total 3636 bytes in 12 blocks)
- * struct gsup_client contains 248 bytes in 1 blocks (ref 0) 0x563a489c05f0
+ * struct osmo_gsup_client contains 248 bytes in 1 blocks (ref 0) 0x563a489c05f0
* struct gsm_network contains 2031 bytes in 4 blocks (ref 0) 0x563a489bfbb0
* struct vlr_instance contains 168 bytes in 1 blocks (ref 0) 0x563a489c04e0
* no_gsup_server contains 15 bytes in 1 blocks (ref 0) 0x563a489c0460
diff --git a/tests/sms_queue/Makefile.am b/tests/sms_queue/Makefile.am
index 61b8515..1ffbe1c 100644
--- a/tests/sms_queue/Makefile.am
+++ b/tests/sms_queue/Makefile.am
@@ -14,6 +14,7 @@
$(LIBOSMORANAP_CFLAGS) \
$(LIBASN1C_CFLAGS) \
$(LIBOSMOMGCPCLIENT_CFLAGS) \
+ $(LIBOSMOGSUPCLIENT_CFLAGS) \
$(NULL)
EXTRA_DIST = \
@@ -32,7 +33,6 @@
sms_queue_test_LDADD = \
$(top_builddir)/src/libmsc/libmsc.a \
$(top_builddir)/src/libvlr/libvlr.a \
- $(top_builddir)/src/libgsupclient/libgsupclient.a \
$(LIBSMPP34_LIBS) \
$(LIBOSMOCORE_LIBS) \
$(LIBOSMOGSM_LIBS) \
@@ -41,6 +41,7 @@
$(LIBOSMOSIGTRAN_LIBS) \
$(LIBOSMORANAP_LIBS) \
$(LIBOSMOMGCPCLIENT_LIBS) \
+ $(LIBOSMOGSUPCLIENT_LIBS) \
$(LIBRARY_GSM) \
-ldbi \
-lrt \