From 6668b2b29a5c1e8b7a22c66df95795485e204a8a Mon Sep 17 00:00:00 2001 From: Pau Espin Pedrol Date: Tue, 3 Dec 2024 14:31:24 +0100 Subject: [PATCH] vty: Avoid accessing gsupclient object fields directly Use new APIs recently added. Depends: osmo-hlr.git Change-Id I401af83232022f1c141eef1f428cbe206a8aaaa2 Change-Id: Ie443ef0bd983635a5b29e434d79b93ef3f7ce370 --- TODO-RELEASE | 1 + src/sgsn/sgsn_vty.c | 9 ++++----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/TODO-RELEASE b/TODO-RELEASE index 261da7b0b..662cdb504 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -10,3 +10,4 @@ libgtp >1.12.0 new field dir_tun_flags in struct pdp_t libgtp >1.12.0 gtp_set_cb_update_context_ind(), gtp_update_context_resp() libosmocore >1.10.0 enum gsm48_gprs_ie_mm: GSM48_IE_GMM_UE_NET_CAP, GSM48_IE_GMM_VD_PREF_UE_USAGE +libosmo-gsup-client >1.8.0 osmo_gsup_client_is_connected(), osmo_gsup_client_get_rem_addr(), osmo_gsup_client_get_rem_port() diff --git a/src/sgsn/sgsn_vty.c b/src/sgsn/sgsn_vty.c index a7e804529..2cb88198d 100644 --- a/src/sgsn/sgsn_vty.c +++ b/src/sgsn/sgsn_vty.c @@ -670,11 +670,10 @@ DEFUN(show_sgsn, show_sgsn_cmd, "show sgsn", SHOW_STR "Display information about the SGSN") { if (sgsn->gsup_client) { - struct ipa_client_conn *link = sgsn->gsup_client->link; - vty_out(vty, - " Remote authorization: %sconnected to %s:%d via GSUP%s", - sgsn->gsup_client->is_connected ? "" : "not ", - link->addr, link->port, + vty_out(vty, " Remote authorization: %sconnected to %s:%d via GSUP%s", + osmo_gsup_client_is_connected(sgsn->gsup_client) ? "" : "not ", + osmo_gsup_client_get_rem_addr(sgsn->gsup_client), + osmo_gsup_client_get_rem_port(sgsn->gsup_client), VTY_NEWLINE); } if (sgsn->gsn)