diff options
author | Thomas Haller <thaller@redhat.com> | 2019-02-05 12:37:56 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2019-02-05 13:42:36 +0100 |
commit | f444188b63d6d8ded2cb3748e4b8ee87f4a1e531 (patch) | |
tree | e2b3af924a0c0f742adf124d4fbe629d44b217a0 /src/devices/wwan/nm-modem-broadband.c | |
parent | 8cb2d193e47c7f4a460a9e187e544f5cfb544ec3 (diff) | |
download | NetworkManager-f444188b63d6d8ded2cb3748e4b8ee87f4a1e531.tar.gz |
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
Diffstat (limited to 'src/devices/wwan/nm-modem-broadband.c')
-rw-r--r-- | src/devices/wwan/nm-modem-broadband.c | 17 |
1 files changed, 11 insertions, 6 deletions
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; } |