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
55c3026643
This commit is contained in:
Thomas Haller 2019-02-05 12:37:56 +01:00
parent 8cb2d193e4
commit f444188b63

View file

@ -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;
}