From f444188b63d6d8ded2cb3748e4b8ee87f4a1e531 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Tue, 5 Feb 2019 12:37:56 +0100 Subject: wwan: avoid deprecated mm_simple_connect_properties_set_number() Since 1.10, mm_simple_connect_properties_set_number() is deprecated and calling it does nothing. Moreover, it triggers a "deprecated-declarations" warning. Avoid calling it. https://gitlab.freedesktop.org/mobile-broadband/ModemManager/issues/99 https://gitlab.freedesktop.org/mobile-broadband/ModemManager/commit/55c3026643ee6c75c0a68171abd884edf035b9ba --- src/devices/wwan/nm-modem-broadband.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'src/devices/wwan/nm-modem-broadband.c') diff --git a/src/devices/wwan/nm-modem-broadband.c b/src/devices/wwan/nm-modem-broadband.c index 82e9e2f1ae..e8699c5b26 100644 --- a/src/devices/wwan/nm-modem-broadband.c +++ b/src/devices/wwan/nm-modem-broadband.c @@ -254,16 +254,21 @@ get_bearer_ip_method (MMBearerIpConfig *config) static MMSimpleConnectProperties * create_cdma_connect_properties (NMConnection *connection) { - NMSettingCdma *setting; MMSimpleConnectProperties *properties; - const char *str; - setting = nm_connection_get_setting_cdma (connection); properties = mm_simple_connect_properties_new (); - str = nm_setting_cdma_get_number (setting); - if (str) - mm_simple_connect_properties_set_number (properties, str); +#if !MM_CHECK_VERSION (1, 9, 1) + { + NMSettingCdma *setting; + const char *str; + + setting = nm_connection_get_setting_cdma (connection); + str = nm_setting_cdma_get_number (setting); + if (str) + mm_simple_connect_properties_set_number (properties, str); + } +#endif return properties; } -- cgit v1.2.1