modem-helpers-mbim: port to use object logging

This commit is contained in:
Aleksander Morgado
2020-04-08 16:35:09 +02:00
parent 7004f97093
commit 4be88b899e
4 changed files with 6 additions and 4 deletions
+1 -1
View File
@@ -964,7 +964,7 @@ connect_context_step (GTask *task)
MMBearerAllowedAuth bearer_auth;
bearer_auth = mm_bearer_properties_get_allowed_auth (ctx->properties);
auth = mm_bearer_allowed_auth_to_mbim_auth_protocol (bearer_auth, &error);
auth = mm_bearer_allowed_auth_to_mbim_auth_protocol (bearer_auth, self, &error);
if (error) {
g_task_return_error (task, error);
g_object_unref (task);
+1 -1
View File
@@ -2830,7 +2830,7 @@ before_set_lte_attach_configuration_query_ready (MbimDevice *device,
if (auth == MM_BEARER_ALLOWED_AUTH_UNKNOWN)
configurations[i]->auth_protocol = MBIM_AUTH_PROTOCOL_NONE;
else {
configurations[i]->auth_protocol = mm_bearer_allowed_auth_to_mbim_auth_protocol (auth, &error);
configurations[i]->auth_protocol = mm_bearer_allowed_auth_to_mbim_auth_protocol (auth, self, &error);
if (error) {
configurations[i]->auth_protocol = MBIM_AUTH_PROTOCOL_NONE;
mm_obj_warn (self, "unexpected auth settings requested: %s", error->message);
+3 -2
View File
@@ -17,7 +17,7 @@
#include "mm-modem-helpers.h"
#include "mm-enums-types.h"
#include "mm-errors-types.h"
#include "mm-log.h"
#include "mm-log-object.h"
/*****************************************************************************/
@@ -367,6 +367,7 @@ mm_bearer_allowed_auth_from_mbim_auth_protocol (MbimAuthProtocol auth_protocol)
MbimAuthProtocol
mm_bearer_allowed_auth_to_mbim_auth_protocol (MMBearerAllowedAuth bearer_auth,
gpointer log_object,
GError **error)
{
gchar *str;
@@ -374,7 +375,7 @@ mm_bearer_allowed_auth_to_mbim_auth_protocol (MMBearerAllowedAuth bearer_auth,
/* NOTE: the input is a BITMASK, so we try to find a "best match" */
if (bearer_auth == MM_BEARER_ALLOWED_AUTH_UNKNOWN) {
mm_dbg ("Using default (PAP) authentication method");
mm_obj_dbg (log_object, "using default (PAP) authentication method");
return MBIM_AUTH_PROTOCOL_PAP;
}
if (bearer_auth & MM_BEARER_ALLOWED_AUTH_PAP)
+1
View File
@@ -41,6 +41,7 @@ GError *mm_mobile_equipment_error_from_mbim_nw_error (MbimNwError nw_error);
MMBearerAllowedAuth mm_bearer_allowed_auth_from_mbim_auth_protocol (MbimAuthProtocol auth_protocol);
MbimAuthProtocol mm_bearer_allowed_auth_to_mbim_auth_protocol (MMBearerAllowedAuth bearer_auth,
gpointer log_object,
GError **error);
MMBearerIpFamily mm_bearer_ip_family_from_mbim_context_ip_type (MbimContextIpType ip_type);
MbimContextIpType mm_bearer_ip_family_to_mbim_context_ip_type (MMBearerIpFamily ip_family,