modem-helpers: ip family normalization doesn't need log_object

This commit is contained in:
Aleksander Morgado
2021-04-01 11:19:47 +02:00
parent 2c27a7aadc
commit 851a708442
6 changed files with 7 additions and 9 deletions

View File

@@ -345,7 +345,7 @@ connect_3gpp_context_step (GTask *task)
MMBearerIpFamily ip_family; MMBearerIpFamily ip_family;
ip_family = mm_bearer_properties_get_ip_type (mm_base_bearer_peek_config (MM_BASE_BEARER (self))); ip_family = mm_bearer_properties_get_ip_type (mm_base_bearer_peek_config (MM_BASE_BEARER (self)));
mm_3gpp_normalize_ip_family (&ip_family, self); mm_3gpp_normalize_ip_family (&ip_family);
if (ip_family != MM_BEARER_IP_FAMILY_IPV4) { if (ip_family != MM_BEARER_IP_FAMILY_IPV4) {
g_task_return_new_error (task, g_task_return_new_error (task,
MM_CORE_ERROR, MM_CORE_ERROR,

View File

@@ -1054,7 +1054,7 @@ connect_context_step (GTask *task)
} }
ip_family = mm_bearer_properties_get_ip_type (ctx->properties); ip_family = mm_bearer_properties_get_ip_type (ctx->properties);
mm_3gpp_normalize_ip_family (&ip_family, self); mm_3gpp_normalize_ip_family (&ip_family);
ctx->requested_ip_type = mm_bearer_ip_family_to_mbim_context_ip_type (ip_family, &error); ctx->requested_ip_type = mm_bearer_ip_family_to_mbim_context_ip_type (ip_family, &error);
if (error) { if (error) {
g_task_return_error (task, error); g_task_return_error (task, error);

View File

@@ -2068,7 +2068,7 @@ _connect (MMBaseBearer *_self,
ctx->password = g_strdup (mm_bearer_properties_get_password (properties)); ctx->password = g_strdup (mm_bearer_properties_get_password (properties));
ip_family = mm_bearer_properties_get_ip_type (properties); ip_family = mm_bearer_properties_get_ip_type (properties);
if (mm_3gpp_normalize_ip_family (&ip_family, self)) if (mm_3gpp_normalize_ip_family (&ip_family))
ctx->no_ip_family_preference = TRUE; ctx->no_ip_family_preference = TRUE;
if (ip_family & MM_BEARER_IP_FAMILY_IPV4) if (ip_family & MM_BEARER_IP_FAMILY_IPV4)

View File

@@ -132,7 +132,7 @@ detailed_connect_context_new (MMBroadbandBearer *self,
ctx->secondary = (secondary ? g_object_ref (secondary) : NULL); ctx->secondary = (secondary ? g_object_ref (secondary) : NULL);
ctx->ip_family = mm_bearer_properties_get_ip_type (mm_base_bearer_peek_config (MM_BASE_BEARER (self))); ctx->ip_family = mm_bearer_properties_get_ip_type (mm_base_bearer_peek_config (MM_BASE_BEARER (self)));
mm_3gpp_normalize_ip_family (&ctx->ip_family, self); mm_3gpp_normalize_ip_family (&ctx->ip_family);
return ctx; return ctx;
} }
@@ -908,7 +908,7 @@ cid_selection_3gpp (MMBroadbandBearer *self,
ctx->cancellable = g_object_ref (cancellable); ctx->cancellable = g_object_ref (cancellable);
ctx->ip_family = mm_bearer_properties_get_ip_type (mm_base_bearer_peek_config (MM_BASE_BEARER (self))); ctx->ip_family = mm_bearer_properties_get_ip_type (mm_base_bearer_peek_config (MM_BASE_BEARER (self)));
mm_3gpp_normalize_ip_family (&ctx->ip_family, self); mm_3gpp_normalize_ip_family (&ctx->ip_family);
g_task_set_task_data (task, ctx, (GDestroyNotify) cid_selection_3gpp_context_free); g_task_set_task_data (task, ctx, (GDestroyNotify) cid_selection_3gpp_context_free);

View File

@@ -4100,8 +4100,7 @@ mm_3gpp_get_ip_family_from_pdp_type (const gchar *pdp_type)
} }
gboolean gboolean
mm_3gpp_normalize_ip_family (MMBearerIpFamily *family, mm_3gpp_normalize_ip_family (MMBearerIpFamily *family)
gpointer log_object)
{ {
/* if nothing specific requested, default to IPv4 */ /* if nothing specific requested, default to IPv4 */
if (*family == MM_BEARER_IP_FAMILY_NONE || *family == MM_BEARER_IP_FAMILY_ANY) { if (*family == MM_BEARER_IP_FAMILY_NONE || *family == MM_BEARER_IP_FAMILY_ANY) {

View File

@@ -439,8 +439,7 @@ gboolean mm_3gpp_parse_operator_id (const gchar *operator_id,
const gchar *mm_3gpp_get_pdp_type_from_ip_family (MMBearerIpFamily family); const gchar *mm_3gpp_get_pdp_type_from_ip_family (MMBearerIpFamily family);
MMBearerIpFamily mm_3gpp_get_ip_family_from_pdp_type (const gchar *pdp_type); MMBearerIpFamily mm_3gpp_get_ip_family_from_pdp_type (const gchar *pdp_type);
gboolean mm_3gpp_normalize_ip_family (MMBearerIpFamily *family, gboolean mm_3gpp_normalize_ip_family (MMBearerIpFamily *family);
gpointer log_object);
char *mm_3gpp_parse_iccid (const char *raw_iccid, GError **error); char *mm_3gpp_parse_iccid (const char *raw_iccid, GError **error);