summaryrefslogtreecommitdiffstats
path: root/openbsc/src/libcommon/gsup_client.c
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2016-12-08 23:58:31 +0100
committerHarald Welte <laforge@gnumonks.org>2016-12-13 14:54:02 +0000
commit37f9252361c85249b59d5a9202147136782b5415 (patch)
tree231819f71697201e3bba98bf5e82bc81cc7a50eb /openbsc/src/libcommon/gsup_client.c
parent2fa74faf927ed1ca9fc311a206c1e18a7295be7a (diff)
oap_client: make use of OAP optional: disable for NULL config
When passing a NULL config to osmo_oap_client_init(), set OAP to disabled state. Along with the previous fix that ensures message rejection in the disabled state, this makes use of OAP in the GSUP client optional. oap_client_test: expect null config to set state to disabled. Related: OS#1592 Change-Id: Ie4d622fcfd24cb7d89d19f93e4b2571d8fadd1a3
Diffstat (limited to 'openbsc/src/libcommon/gsup_client.c')
-rw-r--r--openbsc/src/libcommon/gsup_client.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/openbsc/src/libcommon/gsup_client.c b/openbsc/src/libcommon/gsup_client.c
index 4c1fe6111..2e920a6b6 100644
--- a/openbsc/src/libcommon/gsup_client.c
+++ b/openbsc/src/libcommon/gsup_client.c
@@ -266,7 +266,7 @@ static void start_test_procedure(struct gsup_client *gsupc)
struct gsup_client *gsup_client_create(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)
{
struct gsup_client *gsupc;
int rc;
@@ -274,7 +274,8 @@ struct gsup_client *gsup_client_create(const char *ip_addr,
gsupc = talloc_zero(tall_bsc_ctx, struct gsup_client);
OSMO_ASSERT(gsupc);
- rc = oap_client_init(oap_config, &gsupc->oap_state);
+ /* a NULL oapc_config will mark oap_state disabled. */
+ rc = oap_client_init(oapc_config, &gsupc->oap_state);
if (rc != 0)
goto failed;