base-bearer: remove default IP family property

There is no point in providing a configurable default IP family in the
bearer object, because we can always assume IPv4 as being the only
default expected.

Simplify the logic and also provide a new method to get the normalize
the IP family, using IPv4 as default always.
This commit is contained in:
Aleksander Morgado
2021-03-31 23:46:31 +02:00
parent 3179006351
commit 2c27a7aadc
8 changed files with 37 additions and 90 deletions
+1 -10
View File
@@ -345,16 +345,7 @@ connect_3gpp_context_step (GTask *task)
MMBearerIpFamily ip_family;
ip_family = mm_bearer_properties_get_ip_type (mm_base_bearer_peek_config (MM_BASE_BEARER (self)));
if (ip_family == MM_BEARER_IP_FAMILY_NONE ||
ip_family == MM_BEARER_IP_FAMILY_ANY) {
gchar *ip_family_str;
ip_family = mm_base_bearer_get_default_ip_family (MM_BASE_BEARER (self));
ip_family_str = mm_bearer_ip_family_build_string_from_mask (ip_family);
mm_obj_dbg (self, "no specific IP family requested, defaulting to %s", ip_family_str);
g_free (ip_family_str);
}
mm_3gpp_normalize_ip_family (&ip_family, self);
if (ip_family != MM_BEARER_IP_FAMILY_IPV4) {
g_task_return_new_error (task,
MM_CORE_ERROR,