diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main.c | 8 | ||||
-rw-r--r-- | src/mm-base-bearer.c | 6 | ||||
-rw-r--r-- | src/mm-base-call.c | 24 | ||||
-rw-r--r-- | src/mm-base-manager.c | 26 | ||||
-rw-r--r-- | src/mm-base-sim.c | 2 | ||||
-rw-r--r-- | src/mm-bearer-mbim.c | 2 | ||||
-rw-r--r-- | src/mm-bearer-qmi.c | 64 | ||||
-rw-r--r-- | src/mm-broadband-modem-mbim.c | 6 | ||||
-rw-r--r-- | src/mm-broadband-modem-qmi.c | 30 | ||||
-rw-r--r-- | src/mm-broadband-modem.c | 58 | ||||
-rw-r--r-- | src/mm-device.c | 12 | ||||
-rw-r--r-- | src/mm-iface-modem-3gpp.c | 14 | ||||
-rw-r--r-- | src/mm-iface-modem-oma.c | 6 | ||||
-rw-r--r-- | src/mm-iface-modem-simple.c | 42 | ||||
-rw-r--r-- | src/mm-iface-modem.c | 8 | ||||
-rw-r--r-- | src/mm-log.c | 13 | ||||
-rw-r--r-- | src/mm-log.h | 7 | ||||
-rw-r--r-- | src/mm-port-mbim.c | 8 | ||||
-rw-r--r-- | src/mm-port-qmi.c | 2 | ||||
-rw-r--r-- | src/mm-qrtr-bus-watcher.c | 4 | ||||
-rw-r--r-- | src/mm-shared-qmi.c | 18 | ||||
-rw-r--r-- | src/mm-sleep-monitor-powerd.c | 4 | ||||
-rw-r--r-- | src/mm-sleep-monitor-systemd.c | 4 |
23 files changed, 189 insertions, 179 deletions
@@ -44,7 +44,7 @@ static MMBaseManager *manager; static gboolean quit_cb (gpointer user_data) { - mm_info ("caught signal, shutting down..."); + mm_msg ("caught signal, shutting down..."); if (manager) g_object_set (manager, MM_BASE_MANAGER_CONNECTION, NULL, NULL); @@ -178,8 +178,8 @@ main (int argc, char *argv[]) /* Early register all known errors */ register_dbus_errors (); - mm_info ("ModemManager (version " MM_DIST_VERSION ") starting in %s bus...", - mm_context_get_test_session () ? "session" : "system"); + mm_msg ("ModemManager (version " MM_DIST_VERSION ") starting in %s bus...", + mm_context_get_test_session () ? "session" : "system"); /* Detect runtime charset conversion support */ mm_modem_charsets_init (); @@ -250,7 +250,7 @@ main (int argc, char *argv[]) g_bus_unown_name (name_id); - mm_info ("ModemManager is shut down"); + mm_msg ("ModemManager is shut down"); mm_log_shutdown (); diff --git a/src/mm-base-bearer.c b/src/mm-base-bearer.c index 64a19a97..5217b66a 100644 --- a/src/mm-base-bearer.c +++ b/src/mm-base-bearer.c @@ -571,7 +571,7 @@ bearer_update_status (MMBaseBearer *self, ", tx: %" G_GUINT64_FORMAT " bytes, rx: %" G_GUINT64_FORMAT " bytes", mm_bearer_stats_get_tx_bytes (self->priv->stats), mm_bearer_stats_get_rx_bytes (self->priv->stats)); - mm_obj_info (self, "%s", report->str); + mm_obj_msg (self, "%s", report->str); } } @@ -979,11 +979,11 @@ reload_stats_supported_ready (MMBaseBearer *self, GTask *task) { if (MM_BASE_BEARER_GET_CLASS (self)->reload_stats_finish (self, NULL, NULL, res, NULL)) { - mm_obj_info (self, "reloading stats is supported by the device"); + mm_obj_dbg (self, "reloading stats is supported by the device"); self->priv->reload_stats_supported = TRUE; mm_gdbus_bearer_set_reload_stats_supported (MM_GDBUS_BEARER (self), self->priv->reload_stats_supported); } else - mm_obj_info (self, "reloading stats is not supported by the device"); + mm_obj_dbg (self, "reloading stats is not supported by the device"); if (connect_check_cancel (self, task)) return; diff --git a/src/mm-base-call.c b/src/mm-base-call.c index 149cfbd4..69ce8985 100644 --- a/src/mm-base-call.c +++ b/src/mm-base-call.c @@ -97,7 +97,7 @@ static gboolean incoming_timeout_cb (MMBaseCall *self) { self->priv->incoming_timeout = 0; - mm_obj_info (self, "incoming call timed out: no response"); + mm_obj_msg (self, "incoming call timed out: no response"); mm_base_call_change_state (self, MM_CALL_STATE_TERMINATED, MM_CALL_STATE_REASON_TERMINATED); return G_SOURCE_REMOVE; } @@ -187,7 +187,7 @@ handle_start_ready (MMBaseCall *self, return; } - mm_obj_info (self, "call is started"); + mm_obj_msg (self, "call is started"); /* If dialing to ringing supported, leave it dialing */ if (!ctx->self->priv->supports_dialing_to_ringing) { @@ -229,7 +229,7 @@ handle_start_auth_ready (MMBaseModem *modem, return; } - mm_obj_info (ctx->self, "user request to start call"); + mm_obj_msg (ctx->self, "user request to start call"); /* Disallow non-emergency calls when in emergency-only state */ if (!mm_iface_modem_voice_authorize_outgoing_call (MM_IFACE_MODEM_VOICE (modem), ctx->self, &error)) { @@ -316,7 +316,7 @@ handle_accept_ready (MMBaseCall *self, return; } - mm_obj_info (self, "call is accepted"); + mm_obj_msg (self, "call is accepted"); if (ctx->self->priv->incoming_timeout) { g_source_remove (ctx->self->priv->incoming_timeout); @@ -353,7 +353,7 @@ handle_accept_auth_ready (MMBaseModem *modem, return; } - mm_obj_info (ctx->self, "user request to accept call"); + mm_obj_msg (ctx->self, "user request to accept call"); /* Check if we do support doing it */ if (!MM_BASE_CALL_GET_CLASS (ctx->self)->accept || @@ -426,7 +426,7 @@ handle_deflect_ready (MMBaseCall *self, return; } - mm_obj_info (self, "call is deflected to '%s'", ctx->number); + mm_obj_msg (self, "call is deflected to '%s'", ctx->number); mm_base_call_change_state (ctx->self, MM_CALL_STATE_TERMINATED, MM_CALL_STATE_REASON_DEFLECTED); mm_gdbus_call_complete_deflect (MM_GDBUS_CALL (ctx->self), ctx->invocation); handle_deflect_context_free (ctx); @@ -458,7 +458,7 @@ handle_deflect_auth_ready (MMBaseModem *modem, return; } - mm_obj_info (ctx->self, "user request to deflect call"); + mm_obj_msg (ctx->self, "user request to deflect call"); /* Check if we do support doing it */ if (!MM_BASE_CALL_GET_CLASS (ctx->self)->deflect || @@ -715,7 +715,7 @@ handle_hangup_auth_ready (MMBaseModem *modem, return; } - mm_obj_info (ctx->self, "user request to hangup call"); + mm_obj_msg (ctx->self, "user request to hangup call"); /* Check if we do support doing it */ if (!MM_BASE_CALL_GET_CLASS (ctx->self)->hangup || @@ -991,10 +991,10 @@ mm_base_call_change_state (MMBaseCall *self, if (old_state == new_state) return; - mm_obj_info (self, "call state changed: %s -> %s (%s)", - mm_call_state_get_string (old_state), - mm_call_state_get_string (new_state), - mm_call_state_reason_get_string (reason)); + mm_obj_msg (self, "call state changed: %s -> %s (%s)", + mm_call_state_get_string (old_state), + mm_call_state_get_string (new_state), + mm_call_state_reason_get_string (reason)); /* Setup/cleanup unsolicited events based on state transitions to/from ACTIVE */ if (new_state == MM_CALL_STATE_TERMINATED) { diff --git a/src/mm-base-manager.c b/src/mm-base-manager.c index 13a98ebc..5f77623a 100644 --- a/src/mm-base-manager.c +++ b/src/mm-base-manager.c @@ -204,8 +204,8 @@ device_support_check_ready (MMPluginManager *plugin_manager, /* Receive plugin result from the plugin manager */ plugin = mm_plugin_manager_device_support_check_finish (plugin_manager, res, &error); if (!plugin) { - mm_obj_info (ctx->self, "couldn't check support for device '%s': %s", - mm_device_get_uid (ctx->device), error->message); + mm_obj_msg (ctx->self, "couldn't check support for device '%s': %s", + mm_device_get_uid (ctx->device), error->message); g_error_free (error); g_hash_table_remove (ctx->self->priv->devices, mm_device_get_uid (ctx->device)); find_device_support_context_free (ctx); @@ -226,8 +226,8 @@ device_support_check_ready (MMPluginManager *plugin_manager, } /* Modem now created */ - mm_obj_info (ctx->self, "modem for device '%s' successfully created", - mm_device_get_uid (ctx->device)); + mm_obj_msg (ctx->self, "modem for device '%s' successfully created", + mm_device_get_uid (ctx->device)); find_device_support_context_free (ctx); } @@ -267,7 +267,7 @@ device_removed (MMBaseManager *self, * ourselves. */ g_object_ref (device); - mm_obj_info (self, "port %s released by device '%s'", name, mm_device_get_uid (device)); + mm_obj_msg (self, "port %s released by device '%s'", name, mm_device_get_uid (device)); mm_device_release_port_name (device, subsystem, name); /* If port probe list gets empty, remove the device object iself */ @@ -741,7 +741,7 @@ base_modem_sync_ready (MMBaseModem *self, mm_obj_warn (self, "synchronization failed: %s", error->message); return; } - mm_obj_info (self, "synchronization finished"); + mm_obj_msg (self, "synchronization finished"); } void @@ -798,7 +798,7 @@ set_logging_auth_ready (MMAuthProvider *authp, else if (!mm_log_set_level (ctx->level, &error)) g_dbus_method_invocation_take_error (ctx->invocation, error); else { - mm_obj_info (ctx->self, "logging: level '%s'", ctx->level); + mm_obj_msg (ctx->self, "logging: level '%s'", ctx->level); mm_gdbus_org_freedesktop_modem_manager1_complete_set_logging ( MM_GDBUS_ORG_FREEDESKTOP_MODEM_MANAGER1 (ctx->self), ctx->invocation); @@ -1139,7 +1139,7 @@ inhibit_sender_lost (GDBusConnection *connection, const gchar *sender_name, InhibitSenderLostContext *lost_ctx) { - mm_obj_info (lost_ctx->self, "device inhibition teardown for uid '%s' (owner disappeared from bus)", lost_ctx->uid); + mm_obj_msg (lost_ctx->self, "device inhibition teardown for uid '%s' (owner disappeared from bus)", lost_ctx->uid); remove_device_inhibition (lost_ctx->self, lost_ctx->uid); } @@ -1194,7 +1194,7 @@ device_inhibit_ready (MMDevice *device, g_hash_table_insert (ctx->self->priv->inhibited_devices, g_strdup (ctx->uid), info); - mm_obj_info (ctx->self, "device inhibition setup for uid '%s'", ctx->uid); + mm_obj_msg (ctx->self, "device inhibition setup for uid '%s'", ctx->uid); mm_gdbus_org_freedesktop_modem_manager1_complete_inhibit_device ( MM_GDBUS_ORG_FREEDESKTOP_MODEM_MANAGER1 (ctx->self), @@ -1243,7 +1243,7 @@ base_manager_uninhibit_device (InhibitDeviceContext *ctx) return; } - mm_obj_info (ctx->self, "device inhibition teardown for uid '%s'", ctx->uid); + mm_obj_msg (ctx->self, "device inhibition teardown for uid '%s'", ctx->uid); remove_device_inhibition (ctx->self, ctx->uid); mm_gdbus_org_freedesktop_modem_manager1_complete_inhibit_device ( @@ -1310,7 +1310,7 @@ handle_set_profile (MmGdbusTest *skeleton, gchar *physdev_uid; GError *error = NULL; - mm_obj_info (self, "test profile set to: '%s'", id); + mm_obj_msg (self, "test profile set to: '%s'", id); /* Create device and keep it listed in the Manager */ physdev_uid = g_strdup_printf ("/virtual/%s", id); @@ -1342,8 +1342,8 @@ handle_set_profile (MmGdbusTest *skeleton, goto out; } - mm_obj_info (self, "modem for virtual device '%s' successfully created", - mm_device_get_uid (device)); + mm_obj_msg (self, "modem for virtual device '%s' successfully created", + mm_device_get_uid (device)); out: diff --git a/src/mm-base-sim.c b/src/mm-base-sim.c index f2e5a5ce..26c26261 100644 --- a/src/mm-base-sim.c +++ b/src/mm-base-sim.c @@ -960,7 +960,7 @@ handle_send_puk_ready (MMBaseSim *self, mm_gdbus_sim_complete_send_puk (MM_GDBUS_SIM (self), ctx->invocation); if (sim_error) { - mm_obj_info (self, "Received critical sim error. SIM might be permanently blocked. Reprobing..."); + mm_obj_msg (self, "received critical sim error: SIM might be permanently blocked, reprobing..."); mm_iface_modem_process_sim_event (MM_IFACE_MODEM (self->priv->modem)); } diff --git a/src/mm-bearer-mbim.c b/src/mm-bearer-mbim.c index 522330a6..8a8096a9 100644 --- a/src/mm-bearer-mbim.c +++ b/src/mm-bearer-mbim.c @@ -882,7 +882,7 @@ setup_link_ready (MMPortMbim *mbim, /* From now on link_name will be set, and we'll use that to know * whether we should cleanup the link upon a connection failure */ - mm_obj_info (self, "net link %s created (session id %u)", ctx->link_name, ctx->session_id); + mm_obj_msg (self, "net link %s created (session id %u)", ctx->link_name, ctx->session_id); /* Wait for the data port with the given interface name, which will be * added asynchronously */ diff --git a/src/mm-bearer-qmi.c b/src/mm-bearer-qmi.c index ef7ac1b1..2612316c 100644 --- a/src/mm-bearer-qmi.c +++ b/src/mm-bearer-qmi.c @@ -848,7 +848,7 @@ get_ipv4_config (MMBearerQmi *self, return NULL; } - mm_obj_info (self, "QMI IPv4 Settings:"); + mm_obj_msg (self, "QMI IPv4 Settings:"); config = mm_bearer_ip_config_new (); mm_bearer_ip_config_set_method (config, ip_method); @@ -857,15 +857,15 @@ get_ipv4_config (MMBearerQmi *self, qmi_inet4_ntop (addr, buf, sizeof (buf)); mm_bearer_ip_config_set_address (config, buf); mm_bearer_ip_config_set_prefix (config, prefix); - mm_obj_info (self, " address: %s/%d", buf, prefix); + mm_obj_msg (self, " address: %s/%d", buf, prefix); /* IPv4 gateway address */ if (qmi_message_wds_get_current_settings_output_get_ipv4_gateway_address (output, &addr, &error)) { qmi_inet4_ntop (addr, buf, sizeof (buf)); mm_bearer_ip_config_set_gateway (config, buf); - mm_obj_info (self, " gateway: %s", buf); + mm_obj_msg (self, " gateway: %s", buf); } else { - mm_obj_info (self, " gateway: failed (%s)", error->message); + mm_obj_msg (self, " gateway: failed (%s)", error->message); g_clear_error (&error); } @@ -873,9 +873,9 @@ get_ipv4_config (MMBearerQmi *self, if (qmi_message_wds_get_current_settings_output_get_primary_ipv4_dns_address (output, &addr, &error)) { qmi_inet4_ntop (addr, buf, sizeof (buf)); dns[dns_idx++] = buf; - mm_obj_info (self, " DNS #1: %s", buf); + mm_obj_msg (self, " DNS #1: %s", buf); } else { - mm_obj_info (self, " DNS #1: failed (%s)", error->message); + mm_obj_msg (self, " DNS #1: failed (%s)", error->message); g_clear_error (&error); } @@ -883,9 +883,9 @@ get_ipv4_config (MMBearerQmi *self, if (qmi_message_wds_get_current_settings_output_get_secondary_ipv4_dns_address (output, &addr, &error)) { qmi_inet4_ntop (addr, buf2, sizeof (buf2)); dns[dns_idx++] = buf2; - mm_obj_info (self, " DNS #2: %s", buf2); + mm_obj_msg (self, " DNS #2: %s", buf2); } else { - mm_obj_info (self, " DNS #2: failed (%s)", error->message); + mm_obj_msg (self, " DNS #2: failed (%s)", error->message); g_clear_error (&error); } @@ -894,7 +894,7 @@ get_ipv4_config (MMBearerQmi *self, if (mtu) { mm_bearer_ip_config_set_mtu (config, mtu); - mm_obj_info (self, " MTU: %d", mtu); + mm_obj_msg (self, " MTU: %d", mtu); } return config; @@ -941,7 +941,7 @@ get_ipv6_config (MMBearerQmi *self, return NULL; } - mm_obj_info (self, "QMI IPv6 Settings:"); + mm_obj_msg (self, "QMI IPv6 Settings:"); config = mm_bearer_ip_config_new (); mm_bearer_ip_config_set_method (config, ip_method); @@ -951,15 +951,15 @@ get_ipv6_config (MMBearerQmi *self, mm_bearer_ip_config_set_address (config, buf); mm_bearer_ip_config_set_prefix (config, prefix); - mm_obj_info (self, " address: %s/%d", buf, prefix); + mm_obj_msg (self, " address: %s/%d", buf, prefix); /* IPv6 gateway address */ if (qmi_message_wds_get_current_settings_output_get_ipv6_gateway_address (output, &array, &prefix, &error)) { qmi_inet6_ntop (array, buf, sizeof (buf)); mm_bearer_ip_config_set_gateway (config, buf); - mm_obj_info (self, " gateway: %s/%d", buf, prefix); + mm_obj_msg (self, " gateway: %s/%d", buf, prefix); } else { - mm_obj_info (self, " gateway: failed (%s)", error->message); + mm_obj_msg (self, " gateway: failed (%s)", error->message); g_clear_error (&error); } @@ -967,9 +967,9 @@ get_ipv6_config (MMBearerQmi *self, if (qmi_message_wds_get_current_settings_output_get_ipv6_primary_dns_address (output, &array, &error)) { qmi_inet6_ntop (array, buf, sizeof (buf)); dns[dns_idx++] = buf; - mm_obj_info (self, " DNS #1: %s", buf); + mm_obj_msg (self, " DNS #1: %s", buf); } else { - mm_obj_info (self, " DNS #1: failed (%s)", error->message); + mm_obj_msg (self, " DNS #1: failed (%s)", error->message); g_clear_error (&error); } @@ -977,9 +977,9 @@ get_ipv6_config (MMBearerQmi *self, if (qmi_message_wds_get_current_settings_output_get_ipv6_secondary_dns_address (output, &array, &error)) { qmi_inet6_ntop (array, buf2, sizeof (buf2)); dns[dns_idx++] = buf2; - mm_obj_info (self, " DNS #2: %s", buf2); + mm_obj_msg (self, " DNS #2: %s", buf2); } else { - mm_obj_info (self, " DNS #2: failed (%s)", error->message); + mm_obj_msg (self, " DNS #2: failed (%s)", error->message); g_clear_error (&error); } @@ -988,7 +988,7 @@ get_ipv6_config (MMBearerQmi *self, if (mtu) { mm_bearer_ip_config_set_mtu (config, mtu); - mm_obj_info (self, " MTU: %d", mtu); + mm_obj_msg (self, " MTU: %d", mtu); } return config; @@ -1215,11 +1215,11 @@ mobile_equipment_error_from_start_network_output (MMBearerQmi verbose_cer_type_str = qmi_wds_verbose_call_end_reason_type_get_string (verbose_cer_type); verbose_cer_reason_str = qmi_wds_verbose_call_end_reason_get_string (verbose_cer_type, verbose_cer_reason); - mm_obj_info (self, "verbose call end reason (%u,%d): [%s] %s", - verbose_cer_type, - verbose_cer_reason, - verbose_cer_type_str, - verbose_cer_reason_str); + mm_obj_msg (self, "verbose call end reason (%u,%d): [%s] %s", + verbose_cer_type, + verbose_cer_reason, + verbose_cer_type_str, + verbose_cer_reason_str); /* If we have a 3GPP verbose call end reason, we try to build an error * with the exact error code and message */ @@ -1237,7 +1237,7 @@ mobile_equipment_error_from_start_network_output (MMBearerQmi const gchar *cer_str; cer_str = qmi_wds_call_end_reason_get_string (cer); - mm_obj_info (self, "call end reason (%u): %s", cer, cer_str); + mm_obj_msg (self, "call end reason (%u): %s", cer, cer_str); return g_error_new (MM_MOBILE_EQUIPMENT_ERROR, MM_MOBILE_EQUIPMENT_ERROR_UNKNOWN, "Call failed: %s", cer_str); @@ -1277,7 +1277,7 @@ start_network_ready (QmiClientWds *client, ctx->packet_data_handle_ipv6 = GLOBAL_PACKET_DATA_HANDLE; /* Fall down to a successful connection */ } else { - mm_obj_info (self, "couldn't start network: %s", error->message); + mm_obj_msg (self, "couldn't start network: %s", error->message); if (g_error_matches (error, QMI_PROTOCOL_ERROR, QMI_PROTOCOL_ERROR_CALL_FAILED)) { g_clear_error (&error); error = mobile_equipment_error_from_start_network_output (self, output); @@ -1382,11 +1382,11 @@ packet_service_status_indication_cb (QmiClientWds *client, verbose_cer_type_str = qmi_wds_verbose_call_end_reason_type_get_string (verbose_cer_type); verbose_cer_reason_str = qmi_wds_verbose_call_end_reason_get_string (verbose_cer_type, verbose_cer_reason); - mm_obj_info (self, "verbose call end reason (%u,%d): [%s] %s", - verbose_cer_type, - verbose_cer_reason, - verbose_cer_type_str, - verbose_cer_reason_str); + mm_obj_msg (self, "verbose call end reason (%u,%d): [%s] %s", + verbose_cer_type, + verbose_cer_reason, + verbose_cer_type_str, + verbose_cer_reason_str); /* If we have a 3GPP verbose call end reason, we try to build an error * with the exact error code and message */ @@ -1402,7 +1402,7 @@ packet_service_status_indication_cb (QmiClientWds *client, const gchar *cer_str; cer_str = qmi_wds_call_end_reason_get_string (cer); - mm_obj_info (self, "call end reason (%u): %s", cer, cer_str); + mm_obj_msg (self, "call end reason (%u): %s", cer, cer_str); connection_error = g_error_new (MM_MOBILE_EQUIPMENT_ERROR, MM_MOBILE_EQUIPMENT_ERROR_UNKNOWN, "Call failed: %s", cer_str); @@ -1761,7 +1761,7 @@ setup_link_ready (MMPortQmi *qmi, /* From now on link_name will be set, and we'll use that to know * whether we should cleanup the link upon a connection failure */ - mm_obj_info (ctx->self, "net link %s created (mux id %u)", ctx->link_name, ctx->mux_id); + mm_obj_msg (ctx->self, "net link %s created (mux id %u)", ctx->link_name, ctx->mux_id); /* Wait for the data port with the given interface name, which will be * added asynchronously */ diff --git a/src/mm-broadband-modem-mbim.c b/src/mm-broadband-modem-mbim.c index 9b74bb66..5116b7fd 100644 --- a/src/mm-broadband-modem-mbim.c +++ b/src/mm-broadband-modem-mbim.c @@ -461,7 +461,7 @@ complete_current_capabilities (GTask *task) * capability and mode related operations are going to be done via QMI as well, so that we * don't mix both logics */ if (self->priv->qmi_capability_and_mode_switching) - mm_obj_info (self, "QMI-based capability and mode switching support enabled"); + mm_obj_dbg (self, "QMI-based capability and mode switching support enabled"); } #else result = ctx->current_mbim; @@ -3150,8 +3150,8 @@ mbim_device_removed_cb (MbimDevice *device, { /* We have to do a full re-probe here because simply reopening the device * and restarting mbim-proxy will leave us without MBIM notifications. */ - mm_obj_info (self, "connection to mbim-proxy for %s lost, reprobing", - mbim_device_get_path_display (device)); + mm_obj_msg (self, "connection to mbim-proxy for %s lost, reprobing", + mbim_device_get_path_display (device)); g_signal_handler_disconnect (device, self->priv->mbim_device_removed_id); diff --git a/src/mm-broadband-modem-qmi.c b/src/mm-broadband-modem-qmi.c index 98868fa7..7c4a96d2 100644 --- a/src/mm-broadband-modem-qmi.c +++ b/src/mm-broadband-modem-qmi.c @@ -4951,9 +4951,9 @@ activation_event_report_indication_cb (QmiClientDms *client, new = mm_modem_cdma_activation_state_from_qmi_activation_state (state); if (self->priv->activation_state != new) - mm_obj_info (self, "activation state changed: '%s'-->'%s'", - mm_modem_cdma_activation_state_get_string (self->priv->activation_state), - mm_modem_cdma_activation_state_get_string (new)); + mm_obj_msg (self, "activation state changed: '%s'-->'%s'", + mm_modem_cdma_activation_state_get_string (self->priv->activation_state), + mm_modem_cdma_activation_state_get_string (new)); /* Cache the new value */ self->priv->activation_state = new; @@ -5138,7 +5138,7 @@ cdma_activation_context_step (GTask *task) if (ctx->input_automatic) { QmiMessageDmsSetEventReportInput *input; - mm_obj_info (ctx->self, "activation step [1/5]: enabling indications"); + mm_obj_msg (ctx->self, "activation step [1/5]: enabling indications"); input = qmi_message_dms_set_event_report_input_new (); qmi_message_dms_set_event_report_input_set_activation_state_reporting (input, TRUE, NULL); qmi_client_dms_set_event_report ( @@ -5154,14 +5154,14 @@ cdma_activation_context_step (GTask *task) /* Manual activation, no indications needed */ g_assert (ctx->input_manual != NULL); - mm_obj_info (ctx->self, "activation step [1/5]: indications not needed in manual activation"); + mm_obj_msg (ctx->self, "activation step [1/5]: indications not needed in manual activation"); ctx->step++; /* Fall through */ case CDMA_ACTIVATION_STEP_REQUEST_ACTIVATION: /* Automatic activation */ if (ctx->input_automatic) { - mm_obj_info (ctx->self, "activation step [2/5]: requesting automatic (OTA) activation"); + mm_obj_msg (ctx->self, "activation step [2/5]: requesting automatic (OTA) activation"); qmi_client_dms_activate_automatic (ctx->client, ctx->input_automatic, 10, @@ -5174,9 +5174,9 @@ cdma_activation_context_step (GTask *task) /* Manual activation */ g_assert (ctx->input_manual != NULL); if (!ctx->segments) - mm_obj_info (ctx->self, "activation step [2/5]: requesting manual activation"); + mm_obj_msg (ctx->self, "activation step [2/5]: requesting manual activation"); else { - mm_obj_info (ctx->self, "activation step [2/5]: requesting manual activation (PRL segment %u/%u)", + mm_obj_msg (ctx->self, "activation step [2/5]: requesting manual activation (PRL segment %u/%u)", (ctx->segment_i + 1), ctx->n_segments); qmi_message_dms_activate_manual_input_set_prl ( ctx->input_manual, @@ -5198,14 +5198,14 @@ cdma_activation_context_step (GTask *task) /* Automatic activation */ if (ctx->input_automatic) { /* State updates via unsolicited messages */ - mm_obj_info (ctx->self, "activation step [3/5]: waiting for activation state updates"); + mm_obj_msg (ctx->self, "activation step [3/5]: waiting for activation state updates"); return; } /* Manual activation; needs MSISDN checks */ g_assert (ctx->input_manual != NULL); ctx->n_mdn_check_retries++; - mm_obj_info (ctx->self, "activation step [3/5]: checking MDN update (retry %u)", ctx->n_mdn_check_retries); + mm_obj_msg (ctx->self, "activation step [3/5]: checking MDN update (retry %u)", ctx->n_mdn_check_retries); qmi_client_dms_get_msisdn (ctx->client, NULL, 5, @@ -5215,14 +5215,14 @@ cdma_activation_context_step (GTask *task) return; case CDMA_ACTIVATION_STEP_RESET: - mm_obj_info (ctx->self, "activation step [4/5]: power-cycling..."); + mm_obj_msg (ctx->self, "activation step [4/5]: power-cycling..."); mm_shared_qmi_reset (MM_IFACE_MODEM (ctx->self), (GAsyncReadyCallback)activation_reset_ready, task); return; case CDMA_ACTIVATION_STEP_LAST: - mm_obj_info (ctx->self, "activation step [5/5]: finished"); + mm_obj_msg (ctx->self, "activation step [5/5]: finished"); g_task_return_boolean (task, TRUE); g_object_unref (task); return; @@ -13069,7 +13069,7 @@ wds_set_autoconnect_settings_ready (QmiClientWds *client, if (!output || !qmi_message_wds_set_autoconnect_settings_output_get_result (output, &error)) mm_obj_warn (self, "failed disabling autoconnect: %s", error->message); else - mm_obj_info (self, "autoconnect explicitly disabled"); + mm_obj_msg (self, "autoconnect explicitly disabled"); g_task_return_boolean (task, TRUE); g_object_unref (task); } @@ -13259,8 +13259,8 @@ qmi_device_removed_cb (QmiDevice *device, MMBroadbandModemQmi *self) { /* Reprobe the modem here so we can get notifications back. */ - mm_obj_info (self, "connection to qmi-proxy for %s lost, reprobing", - qmi_device_get_path_display (device)); + mm_obj_msg (self, "connection to qmi-proxy for %s lost, reprobing", + qmi_device_get_path_display (device)); g_signal_handler_disconnect (device, self->priv->qmi_device_removed_id); self->priv->qmi_device_removed_id = 0; diff --git a/src/mm-broadband-modem.c b/src/mm-broadband-modem.c index a9d4cd73..70b4bb2a 100644 --- a/src/mm-broadband-modem.c +++ b/src/mm-broadband-modem.c @@ -2909,7 +2909,7 @@ bearer_report_disconnected (MMBaseBearer *bearer, if (mm_base_bearer_get_status (bearer) == MM_BEARER_STATUS_DISCONNECTED) return; - mm_obj_info (bearer, "explicitly disconnected"); + mm_obj_msg (bearer, "explicitly disconnected"); mm_base_bearer_report_connection_status (bearer, MM_BEARER_CONNECTION_STATUS_DISCONNECTED); } @@ -2933,13 +2933,13 @@ cgev_process_detach (MMBroadbandModem *self, MM3gppCgev type) { if (type == MM_3GPP_CGEV_NW_DETACH) { - mm_obj_info (self, "network forced PS detach: all contexts have been deactivated"); + mm_obj_msg (self, "network forced PS detach: all contexts have been deactivated"); bearer_list_report_disconnections (self, MM_3GPP_PROFILE_ID_UNKNOWN); return; } if (type == MM_3GPP_CGEV_ME_DETACH) { - mm_obj_info (self, "mobile equipment forced PS detach: all contexts have been deactivated"); + mm_obj_msg (self, "mobile equipment forced PS detach: all contexts have been deactivated"); bearer_list_report_disconnections (self, MM_3GPP_PROFILE_ID_UNKNOWN); return; } @@ -2963,17 +2963,17 @@ cgev_process_primary (MMBroadbandModem *self, switch (type) { case MM_3GPP_CGEV_NW_ACT_PRIMARY: - mm_obj_info (self, "network request to activate context (cid %u)", cid); + mm_obj_msg (self, "network request to activate context (cid %u)", cid); break; case MM_3GPP_CGEV_ME_ACT_PRIMARY: - mm_obj_info (self, "mobile equipment request to activate context (cid %u)", cid); + mm_obj_msg (self, "mobile equipment request to activate context (cid %u)", cid); break; case MM_3GPP_CGEV_NW_DEACT_PRIMARY: - mm_obj_info (self, "network request to deactivate context (cid %u)", cid); + mm_obj_msg (self, "network request to deactivate context (cid %u)", cid); bearer_list_report_disconnections (self, (gint)cid); break; case MM_3GPP_CGEV_ME_DEACT_PRIMARY: - mm_obj_info (self, "mobile equipment request to deactivate context (cid %u)", cid); + mm_obj_msg (self, "mobile equipment request to deactivate context (cid %u)", cid); bearer_list_report_disconnections (self, (gint)cid); break; case MM_3GPP_CGEV_UNKNOWN: @@ -3014,17 +3014,17 @@ cgev_process_secondary (MMBroadbandModem *self, switch (type) { case MM_3GPP_CGEV_NW_ACT_SECONDARY: - mm_obj_info (self, "network request to activate secondary context (cid %u, primary cid %u)", cid, p_cid); + mm_obj_msg (self, "network request to activate secondary context (cid %u, primary cid %u)", cid, p_cid); break; case MM_3GPP_CGEV_ME_ACT_SECONDARY: - mm_obj_info (self, "mobile equipment request to activate secondary context (cid %u, primary cid %u)", cid, p_cid); + mm_obj_msg (self, "mobile equipment request to activate secondary context (cid %u, primary cid %u)", cid, p_cid); break; case MM_3GPP_CGEV_NW_DEACT_SECONDARY: - mm_obj_info (self, "network request to deactivate secondary context (cid %u, primary cid %u)", cid, p_cid); + mm_obj_msg (self, "network request to deactivate secondary context (cid %u, primary cid %u)", cid, p_cid); bearer_list_report_disconnections (self, (gint)cid); break; case MM_3GPP_CGEV_ME_DEACT_SECONDARY: - mm_obj_info (self, "mobile equipment request to deactivate secondary context (cid %u, primary cid %u)", cid, p_cid); + mm_obj_msg (self, "mobile equipment request to deactivate secondary context (cid %u, primary cid %u)", cid, p_cid); bearer_list_report_disconnections (self, (gint)cid); break; case MM_3GPP_CGEV_UNKNOWN: @@ -3066,28 +3066,28 @@ cgev_process_pdp (MMBroadbandModem *self, switch (type) { case MM_3GPP_CGEV_REJECT: - mm_obj_info (self, "network request to activate context (type %s, address %s) has been automatically rejected", pdp_type, pdp_addr); + mm_obj_msg (self, "network request to activate context (type %s, address %s) has been automatically rejected", pdp_type, pdp_addr); break; case MM_3GPP_CGEV_NW_REACT: /* NOTE: we don't currently notify about automatic reconnections like this one */ if (cid) - mm_obj_info (self, "network request to reactivate context (type %s, address %s, cid %u)", pdp_type, pdp_addr, cid); + mm_obj_msg (self, "network request to reactivate context (type %s, address %s, cid %u)", pdp_type, pdp_addr, cid); else - mm_obj_info (self, "network request to reactivate context (type %s, address %s, cid unknown)", pdp_type, pdp_addr); + mm_obj_msg (self, "network request to reactivate context (type %s, address %s, cid unknown)", pdp_type, pdp_addr); break; case MM_3GPP_CGEV_NW_DEACT_PDP: if (cid) { - mm_obj_info (self, "network request to deactivate context (type %s, address %s, cid %u)", pdp_type, pdp_addr, cid); + mm_obj_msg (self, "network request to deactivate context (type %s, address %s, cid %u)", pdp_type, pdp_addr, cid); bearer_list_report_disconnections (self, (gint)cid); } else - mm_obj_info (self, "network request to deactivate context (type %s, address %s, cid unknown)", pdp_type, pdp_addr); + mm_obj_msg (self, "network request to deactivate context (type %s, address %s, cid unknown)", pdp_type, pdp_addr); break; case MM_3GPP_CGEV_ME_DEACT_PDP: if (cid) { - mm_obj_info (self, "mobile equipment request to deactivate context (type %s, address %s, cid %u)", pdp_type, pdp_addr, cid); + mm_obj_msg (self, "mobile equipment request to deactivate context (type %s, address %s, cid %u)", pdp_type, pdp_addr, cid); bearer_list_report_disconnections (self, (gint)cid); } else - mm_obj_info (self, "mobile equipment request to deactivate context (type %s, address %s, cid unknown)", pdp_type, pdp_addr); + mm_obj_msg (self, "mobile equipment request to deactivate context (type %s, address %s, cid unknown)", pdp_type, pdp_addr); break; case MM_3GPP_CGEV_UNKNOWN: case MM_3GPP_CGEV_NW_DETACH: @@ -4200,8 +4200,8 @@ complete_sim_swap_check (GTask *task, g_assert_not_reached(); if (g_strcmp0 (current, cached) != 0) { - mm_obj_info (self, "SIM %s has changed: %s -> %s", - str, cached ? cached : "<none>", current ? current : "<none>"); + mm_obj_msg (self, "SIM %s has changed: %s -> %s", + str, cached ? cached : "<none>", current ? current : "<none>"); mm_iface_modem_process_sim_event (MM_IFACE_MODEM (self)); ctx->step = SIM_SWAP_CHECK_STEP_LAST; } else { @@ -4375,7 +4375,7 @@ modem_check_for_sim_swap (MMIfaceModem *self, NULL); if (modem_state == MM_MODEM_STATE_FAILED) { - mm_obj_info (self, "new SIM detected, handle as SIM hot-swap"); + mm_obj_msg (self, "new SIM detected, handle as SIM hot-swap"); mm_iface_modem_process_sim_event (MM_IFACE_MODEM (self)); g_task_return_boolean (task, TRUE); } else { @@ -12246,8 +12246,8 @@ syncing_step (GTask *task) g_object_unref (task); return; } - mm_obj_info (self, "resume synchronization state (%d/%d): modem interface sync", - ctx->step, SYNCING_STEP_LAST); + mm_obj_msg (self, "resume synchronization state (%d/%d): modem interface sync", + ctx->step, SYNCING_STEP_LAST); mm_iface_modem_sync (MM_IFACE_MODEM (self), (GAsyncReadyCallback)iface_modem_sync_ready, task); @@ -12261,8 +12261,8 @@ syncing_step (GTask *task) */ if (self->priv->modem_3gpp_dbus_skeleton && (self->priv->modem_state >= MM_MODEM_STATE_ENABLED)) { - mm_obj_info (self, "resume synchronization state (%d/%d): 3GPP interface sync", - ctx->step, SYNCING_STEP_LAST); + mm_obj_msg (self, "resume synchronization state (%d/%d): 3GPP interface sync", + ctx->step, SYNCING_STEP_LAST); mm_iface_modem_3gpp_sync (MM_IFACE_MODEM_3GPP (self), (GAsyncReadyCallback)iface_modem_3gpp_sync_ready, task); return; } @@ -12273,8 +12273,8 @@ syncing_step (GTask *task) /* Start Time interface synchronization, only if modem was enabled */ if (self->priv->modem_time_dbus_skeleton && (self->priv->modem_state >= MM_MODEM_STATE_ENABLED)) { - mm_obj_info (self, "resume synchronization state (%d/%d): time interface sync", - ctx->step, SYNCING_STEP_LAST); + mm_obj_msg (self, "resume synchronization state (%d/%d): time interface sync", + ctx->step, SYNCING_STEP_LAST); mm_iface_modem_time_sync (MM_IFACE_MODEM_TIME (self), (GAsyncReadyCallback)iface_modem_time_sync_ready, task); return; } @@ -12282,8 +12282,8 @@ syncing_step (GTask *task) /* fall through */ case SYNCING_STEP_LAST: - mm_obj_info (self, "resume synchronization state (%d/%d): all done", - ctx->step, SYNCING_STEP_LAST); + mm_obj_msg (self, "resume synchronization state (%d/%d): all done", + ctx->step, SYNCING_STEP_LAST); /* We are done without errors! */ g_task_return_boolean (task, TRUE); g_object_unref (task); diff --git a/src/mm-device.c b/src/mm-device.c index c2946bd9..83b1ed16 100644 --- a/src/mm-device.c +++ b/src/mm-device.c @@ -490,9 +490,9 @@ mm_device_create_modem (MMDevice *self, return FALSE; } - mm_obj_info (self, "creating modem with plugin '%s' and '%u' ports", - mm_plugin_get_name (self->priv->plugin), - g_list_length (self->priv->port_probes)); + mm_obj_msg (self, "creating modem with plugin '%s' and '%u' ports", + mm_plugin_get_name (self->priv->plugin), + g_list_length (self->priv->port_probes)); } else { if (!self->priv->virtual_ports) { g_set_error (error, @@ -502,9 +502,9 @@ mm_device_create_modem (MMDevice *self, return FALSE; } - mm_obj_info (self, "creating virtual modem with plugin '%s' and '%u' ports", - mm_plugin_get_name (self->priv->plugin), - g_strv_length (self->priv->virtual_ports)); + mm_obj_msg (self, "creating virtual modem with plugin '%s' and '%u' ports", + mm_plugin_get_name (self->priv->plugin), + g_strv_length (self->priv->virtual_ports)); } self->priv->modem = mm_plugin_create_modem (self->priv->plugin, self, error); diff --git a/src/mm-iface-modem-3gpp.c b/src/mm-iface-modem-3gpp.c index c7904f67..cb68bdf4 100644 --- a/src/mm-iface-modem-3gpp.c +++ b/src/mm-iface-modem-3gpp.c @@ -1986,8 +1986,8 @@ update_registration_reload_current_registration_info_ready (MMIfaceModem3gpp *se new_state = GPOINTER_TO_UINT (user_data); - mm_obj_info (self, "3GPP registration state changed (registering -> %s)", - mm_modem_3gpp_registration_state_get_string (new_state)); + mm_obj_msg (self, "3GPP registration state changed (registering -> %s)", + mm_modem_3gpp_registration_state_get_string (new_state)); mm_obj_dbg (self, "consolidated registration state: cs '%s', ps '%s', eps '%s', 5gs '%s' --> '%s'", mm_modem_3gpp_registration_state_get_string (priv->state_cs), mm_modem_3gpp_registration_state_get_string (priv->state_ps), @@ -2075,8 +2075,8 @@ update_registration_state (MMIfaceModem3gpp *self, return; } - mm_obj_info (self, "3GPP registration state changed (%s -> registering)", - mm_modem_3gpp_registration_state_get_string (old_state)); + mm_obj_msg (self, "3GPP registration state changed (%s -> registering)", + mm_modem_3gpp_registration_state_get_string (old_state)); /* Reload current registration info. ONLY update the state to REGISTERED * after having loaded operator code/name/subscription state */ @@ -2088,9 +2088,9 @@ update_registration_state (MMIfaceModem3gpp *self, return; } - mm_obj_info (self, "3GPP registration state changed (%s -> %s)", - mm_modem_3gpp_registration_state_get_string (old_state), - mm_modem_3gpp_registration_state_get_string (new_state)); + mm_obj_msg (self, "3GPP registration state changed (%s -> %s)", + mm_modem_3gpp_registration_state_get_string (old_state), + mm_modem_3gpp_registration_state_get_string (new_state)); mm_obj_dbg (self, "consolidated registration state: cs '%s', ps '%s', eps '%s', 5gs '%s' --> '%s'", mm_modem_3gpp_registration_state_get_string (priv->state_cs), mm_modem_3gpp_registration_state_get_string (priv->state_ps), diff --git a/src/mm-iface-modem-oma.c b/src/mm-iface-modem-oma.c index cc796b88..e27ee22f 100644 --- a/src/mm-iface-modem-oma.c +++ b/src/mm-iface-modem-oma.c @@ -124,9 +124,9 @@ mm_iface_modem_oma_update_session_state (MMIfaceModemOma *self, old_session_state = mm_gdbus_modem_oma_get_session_state (skeleton); if (old_session_state != new_session_state) { - mm_obj_info (self, "OMA session state changed (%s -> %s)", - mm_oma_session_state_get_string (old_session_state), - mm_oma_session_state_get_string (new_session_state)); + mm_obj_msg (self, "OMA session state changed (%s -> %s)", + mm_oma_session_state_get_string (old_session_state), + mm_oma_session_state_get_string (new_session_state)); /* Flush current change before signaling the state change, * so that clients get the proper state already in the diff --git a/src/mm-iface-modem-simple.c b/src/mm-iface-modem-simple.c index d4490f23..6b235e47 100644 --- a/src/mm-iface-modem-simple.c +++ b/src/mm-iface-modem-simple.c @@ -557,8 +557,8 @@ connection_step (ConnectionContext *ctx) /* fall through */ case CONNECTION_STEP_UNLOCK_CHECK: - mm_obj_info (ctx->self, "simple connect state (%d/%d): unlock check", - ctx->step, CONNECTION_STEP_LAST); + mm_obj_msg (ctx->self, "simple connect state (%d/%d): unlock check", + ctx->step, CONNECTION_STEP_LAST); mm_iface_modem_update_lock_info (MM_IFACE_MODEM (ctx->self), MM_MODEM_LOCK_UNKNOWN, /* ask */ (GAsyncReadyCallback)update_lock_info_ready, @@ -566,8 +566,8 @@ connection_step (ConnectionContext *ctx) return; case CONNECTION_STEP_WAIT_FOR_INITIALIZED: - mm_obj_info (ctx->self, "simple connect state (%d/%d): wait to get fully initialized", - ctx->step, CONNECTION_STEP_LAST); + mm_obj_msg (ctx->self, "simple connect state (%d/%d): wait to get fully initialized", + ctx->step, CONNECTION_STEP_LAST); mm_iface_modem_wait_for_final_state (MM_IFACE_MODEM (ctx->self), MM_MODEM_STATE_DISABLED, /* disabled == initialized */ (GAsyncReadyCallback)wait_for_initialized_ready, @@ -575,16 +575,16 @@ connection_step (ConnectionContext *ctx) return; case CONNECTION_STEP_ENABLE: - mm_obj_info (ctx->self, "simple connect state (%d/%d): enable", - ctx->step, CONNECTION_STEP_LAST); + mm_obj_msg (ctx->self, "simple connect state (%d/%d): enable", + ctx->step, CONNECTION_STEP_LAST); mm_base_modem_enable (MM_BASE_MODEM (ctx->self), (GAsyncReadyCallback)enable_ready, ctx); return; case CONNECTION_STEP_WAIT_FOR_ENABLED: - mm_obj_info (ctx->self, "simple connect state (%d/%d): wait to get fully enabled", - ctx->step, CONNECTION_STEP_LAST); + mm_obj_msg (ctx->self, "simple connect state (%d/%d): wait to get fully enabled", + ctx->step, CONNECTION_STEP_LAST); mm_iface_modem_wait_for_final_state (MM_IFACE_MODEM (ctx->self), MM_MODEM_STATE_UNKNOWN, /* just a final state */ (GAsyncReadyCallback)wait_for_enabled_ready, @@ -592,8 +592,8 @@ connection_step (ConnectionContext *ctx) return; case CONNECTION_STEP_WAIT_AFTER_ENABLED: - mm_obj_info (ctx->self, "simple connect state (%d/%d): wait after enabled", - ctx->step, CONNECTION_STEP_LAST); + mm_obj_msg (ctx->self, "simple connect state (%d/%d): wait after enabled", + ctx->step, CONNECTION_STEP_LAST); /* When we have just enabled, we want to give it some time before starting * the registration process, so that any pending registration update that may * have been scheduled during the enabling phase is applied. We don't want to @@ -603,8 +603,8 @@ connection_step (ConnectionContext *ctx) case CONNECTION_STEP_REGISTER: - mm_obj_info (ctx->self, "simple connect state (%d/%d): register", - ctx->step, CONNECTION_STEP_LAST); + mm_obj_msg (ctx->self, "simple connect state (%d/%d): register", + ctx->step, CONNECTION_STEP_LAST); if (mm_iface_modem_is_3gpp (MM_IFACE_MODEM (ctx->self)) || mm_iface_modem_is_cdma (MM_IFACE_MODEM (ctx->self))) { /* 3GPP or CDMA registration */ @@ -622,8 +622,8 @@ connection_step (ConnectionContext *ctx) /* fall through */ case CONNECTION_STEP_PACKET_SERVICE_ATTACH: - mm_obj_info (ctx->self, "simple connect state (%d/%d): wait to get packet service state attached", - ctx->step, CONNECTION_STEP_LAST); + mm_obj_msg (ctx->self, "simple connect state (%d/%d): wait to get packet service state attached", + ctx->step, CONNECTION_STEP_LAST); if (mm_iface_modem_is_3gpp (MM_IFACE_MODEM (ctx->self))) { mm_iface_modem_3gpp_wait_for_packet_service_state (MM_IFACE_MODEM_3GPP (ctx->self), MM_MODEM_3GPP_PACKET_SERVICE_STATE_ATTACHED, @@ -638,8 +638,8 @@ connection_step (ConnectionContext *ctx) case CONNECTION_STEP_BEARER: { g_autoptr(MMBearerProperties) bearer_properties = NULL; - mm_obj_info (ctx->self, "simple connect state (%d/%d): bearer", - ctx->step, CONNECTION_STEP_LAST); + mm_obj_msg (ctx->self, "simple connect state (%d/%d): bearer", + ctx->step, CONNECTION_STEP_LAST); bearer_properties = mm_simple_connect_properties_get_bearer_properties (ctx->properties); @@ -660,8 +660,8 @@ connection_step (ConnectionContext *ctx) } /* fall through */ case CONNECTION_STEP_CONNECT: - mm_obj_info (ctx->self, "simple connect state (%d/%d): connect", - ctx->step, CONNECTION_STEP_LAST); + mm_obj_msg (ctx->self, "simple connect state (%d/%d): connect", + ctx->step, CONNECTION_STEP_LAST); /* At this point, we can cleanup the cancellation point in the Simple interface, * because the bearer connection has its own cancellation setup. */ @@ -683,8 +683,8 @@ connection_step (ConnectionContext *ctx) /* fall through */ case CONNECTION_STEP_LAST: - mm_obj_info (ctx->self, "simple connect state (%d/%d): all done", - ctx->step, CONNECTION_STEP_LAST); + mm_obj_msg (ctx->self, "simple connect state (%d/%d): all done", + ctx->step, CONNECTION_STEP_LAST); /* All done, yey! */ mm_gdbus_modem_simple_complete_connect ( ctx->skeleton, @@ -740,7 +740,7 @@ connect_auth_ready (MMBaseModem *self, return; } - mm_obj_info (self, "simple connect started..."); + mm_obj_msg (self, "simple connect started..."); /* Log about all the parameters being used for the simple connect */ { diff --git a/src/mm-iface-modem.c b/src/mm-iface-modem.c index 911c139d..a267e8ca 100644 --- a/src/mm-iface-modem.c +++ b/src/mm-iface-modem.c @@ -1966,9 +1966,9 @@ update_state_internal (MMIfaceModem *self, /* Update state only if different */ if (new_state != old_state) { - mm_obj_info (self, "state changed (%s -> %s)", - mm_modem_state_get_string (old_state), - mm_modem_state_get_string (new_state)); + mm_obj_msg (self, "state changed (%s -> %s)", + mm_modem_state_get_string (old_state), + mm_modem_state_get_string (new_state)); /* The property in the interface is bound to the property * in the skeleton, so just updating here is enough */ @@ -4170,7 +4170,7 @@ set_power_state_step (GTask *task) mm_gdbus_modem_set_power_state (ctx->skeleton, ctx->previous_real_power_state); g_task_return_error (task, g_steal_pointer (&ctx->saved_error)); } else { - mm_obj_info (self, "power state updated: %s", mm_modem_power_state_get_string (ctx->requested_power_state)); + mm_obj_msg (self, "power state updated: %s", mm_modem_power_state_get_string (ctx->requested_power_state)); mm_gdbus_modem_set_power_state (ctx->skeleton, ctx->requested_power_state); g_task_return_boolean (task, TRUE); } diff --git a/src/mm-log.c b/src/mm-log.c index 26260b7c..e8a058c1 100644 --- a/src/mm-log.c +++ b/src/mm-log.c @@ -52,7 +52,7 @@ enum { }; static gboolean ts_flags = TS_FLAG_NONE; -static guint32 log_level = MM_LOG_LEVEL_INFO | MM_LOG_LEVEL_WARN | MM_LOG_LEVEL_ERR; +static guint32 log_level = MM_LOG_LEVEL_MSG | MM_LOG_LEVEL_WARN | MM_LOG_LEVEL_ERR; static GTimeVal rel_start = { 0, 0 }; static int logfd = -1; static gboolean append_log_level_text = TRUE; @@ -71,8 +71,10 @@ typedef struct { static const LogDesc level_descs[] = { { MM_LOG_LEVEL_ERR, "ERR" }, { MM_LOG_LEVEL_WARN | MM_LOG_LEVEL_ERR, "WARN" }, - { MM_LOG_LEVEL_INFO | MM_LOG_LEVEL_WARN | MM_LOG_LEVEL_ERR, "INFO" }, - { MM_LOG_LEVEL_DEBUG | MM_LOG_LEVEL_INFO | MM_LOG_LEVEL_WARN | MM_LOG_LEVEL_ERR, "DEBUG" }, + { MM_LOG_LEVEL_MSG | MM_LOG_LEVEL_WARN | MM_LOG_LEVEL_ERR, "MSG" }, + { MM_LOG_LEVEL_INFO | MM_LOG_LEVEL_MSG | MM_LOG_LEVEL_WARN | MM_LOG_LEVEL_ERR, "INFO" }, + { MM_LOG_LEVEL_DEBUG | MM_LOG_LEVEL_INFO | MM_LOG_LEVEL_MSG | MM_LOG_LEVEL_WARN | MM_LOG_LEVEL_ERR, "DEBUG" }, + { 0, NULL } }; static GString *msgbuf = NULL; @@ -86,6 +88,8 @@ mm_to_syslog_priority (MMLogLevel level) return LOG_ERR; case MM_LOG_LEVEL_WARN: return LOG_WARNING; + case MM_LOG_LEVEL_MSG: + return LOG_NOTICE; case MM_LOG_LEVEL_INFO: return LOG_INFO; case MM_LOG_LEVEL_DEBUG: @@ -112,6 +116,7 @@ glib_level_to_mm_level (GLogLevelFlags level) case G_LOG_LEVEL_WARNING: return MM_LOG_LEVEL_WARN; case G_LOG_LEVEL_MESSAGE: + return MM_LOG_LEVEL_MSG; case G_LOG_LEVEL_INFO: return MM_LOG_LEVEL_INFO; case G_LOG_LEVEL_DEBUG: @@ -132,6 +137,8 @@ log_level_description (MMLogLevel level) return "<error>"; case MM_LOG_LEVEL_WARN: return "<warn> "; + case MM_LOG_LEVEL_MSG: + return "<msg> "; case MM_LOG_LEVEL_INFO: return "<info> "; case MM_LOG_LEVEL_DEBUG: diff --git a/src/mm-log.h b/src/mm-log.h index 7eeee89d..4055718d 100644 --- a/src/mm-log.h +++ b/src/mm-log.h @@ -24,8 +24,9 @@ typedef enum { MM_LOG_LEVEL_ERR = 0x00000001, MM_LOG_LEVEL_WARN = 0x00000002, - MM_LOG_LEVEL_INFO = 0x00000004, - MM_LOG_LEVEL_DEBUG = 0x00000008, + MM_LOG_LEVEL_MSG = 0x00000004, + MM_LOG_LEVEL_INFO = 0x00000008, + MM_LOG_LEVEL_DEBUG = 0x00000010, } MMLogLevel; #if !defined MM_MODULE_NAME @@ -34,6 +35,7 @@ typedef enum { #define mm_obj_err(obj, ...) _mm_log (obj, MM_MODULE_NAME, G_STRLOC, G_STRFUNC, MM_LOG_LEVEL_ERR, ## __VA_ARGS__ ) #define mm_obj_warn(obj, ...) _mm_log (obj, MM_MODULE_NAME, G_STRLOC, G_STRFUNC, MM_LOG_LEVEL_WARN, ## __VA_ARGS__ ) +#define mm_obj_msg(obj, ...) _mm_log (obj, MM_MODULE_NAME, G_STRLOC, G_STRFUNC, MM_LOG_LEVEL_MSG, ## __VA_ARGS__ ) #define mm_obj_info(obj, ...) _mm_log (obj, MM_MODULE_NAME, G_STRLOC, G_STRFUNC, MM_LOG_LEVEL_INFO, ## __VA_ARGS__ ) #define mm_obj_dbg(obj, ...) _mm_log (obj, MM_MODULE_NAME, G_STRLOC, G_STRFUNC, MM_LOG_LEVEL_DEBUG, ## __VA_ARGS__ ) @@ -42,6 +44,7 @@ typedef enum { #if defined MM_LOG_NO_OBJECT # define mm_err(...) mm_obj_err (NULL, ## __VA_ARGS__ ) # define mm_warn(...) mm_obj_warn (NULL, ## __VA_ARGS__ ) +# define mm_msg(...) mm_obj_msg (NULL, ## __VA_ARGS__ ) # define mm_info(...) mm_obj_info (NULL, ## __VA_ARGS__ ) # define mm_dbg(...) mm_obj_dbg (NULL, ## __VA_ARGS__ ) #endif diff --git a/src/mm-port-mbim.c b/src/mm-port-mbim.c index 5748c15c..7dcdda59 100644 --- a/src/mm-port-mbim.c +++ b/src/mm-port-mbim.c @@ -451,10 +451,10 @@ qmi_device_open_ready (QmiDevice *dev, g_error_free (error); g_clear_object (&self->priv->qmi_device); /* Ignore error and complete */ - mm_obj_info (self, "MBIM device is not QMI capable"); + mm_obj_msg (self, "MBIM device is not QMI capable"); self->priv->qmi_supported = FALSE; } else { - mm_obj_info (self, "MBIM device is QMI capable"); + mm_obj_msg (self, "MBIM device is QMI capable"); } self->priv->in_progress = FALSE; @@ -477,7 +477,7 @@ qmi_device_new_ready (GObject *unused, mm_obj_dbg (self, "error: couldn't create QmiDevice: %s", error->message); g_error_free (error); /* Ignore error and complete */ - mm_obj_info (self, "MBIM device is not QMI capable"); + mm_obj_msg (self, "MBIM device is not QMI capable"); self->priv->qmi_supported = FALSE; self->priv->in_progress = FALSE; g_task_return_boolean (task, TRUE); @@ -546,7 +546,7 @@ mbim_query_device_services_ready (MbimDevice *device, file = G_FILE (g_task_get_task_data (task)); if (!file || !self->priv->qmi_supported) { - mm_obj_info (self, "MBIM device is not QMI capable"); + mm_obj_msg (self, "MBIM device is not QMI capable"); self->priv->in_progress = FALSE; g_task_return_boolean (task, TRUE); g_object_unref (task); diff --git a/src/mm-port-qmi.c b/src/mm-port-qmi.c index b4001c9a..41f6033d 100644 --- a/src/mm-port-qmi.c +++ b/src/mm-port-qmi.c @@ -2397,7 +2397,7 @@ port_open_step (GTask *task) #if defined WITH_QRTR if (self->priv->node) { - mm_obj_info (self, "Creating QMI device from QRTR node..."); + mm_obj_dbg (self, "Creating QMI device from QRTR node..."); qmi_device_new_from_node (self->priv->node, g_task_get_cancellable (task), (GAsyncReadyCallback) qmi_device_new_ready, diff --git a/src/mm-qrtr-bus-watcher.c b/src/mm-qrtr-bus-watcher.c index ee0cb28b..de7e6ddf 100644 --- a/src/mm-qrtr-bus-watcher.c +++ b/src/mm-qrtr-bus-watcher.c @@ -83,7 +83,7 @@ qrtr_node_services_ready (QrtrNode *node, return; } - mm_obj_info (ctx->self, "qrtr services ready for node %u", node_id); + mm_obj_dbg (ctx->self, "qrtr services ready for node %u", node_id); g_signal_emit (ctx->self, signals[QRTR_DEVICE_ADDED], 0, node_id); device_context_free (ctx); } @@ -152,7 +152,7 @@ handle_qrtr_node_removed (QrtrBus *qrtr_bus, } g_hash_table_remove (self->priv->nodes, GUINT_TO_POINTER (node_id)); - mm_obj_info (self, "qrtr node %u removed", node_id); + mm_obj_dbg (self, "qrtr node %u removed", node_id); g_signal_emit (self, signals[QRTR_DEVICE_REMOVED], 0, node_id); } diff --git a/src/mm-shared-qmi.c b/src/mm-shared-qmi.c index 30913123..a98352ef 100644 --- a/src/mm-shared-qmi.c +++ b/src/mm-shared-qmi.c @@ -2141,7 +2141,7 @@ reset_set_operating_mode_reset_ready (QmiClientDms *client, if (!output || !qmi_message_dms_set_operating_mode_output_get_result (output, &error)) { g_task_return_error (task, error); } else { - mm_obj_info (self, "rebooting now"); + mm_obj_msg (self, "rebooting now"); g_task_return_boolean (task, TRUE); } @@ -2632,8 +2632,8 @@ find_requested_carrier_config (GTask *task) g_assert (config_fallback_i >= 0); config = &g_array_index (priv->config_list, ConfigInfo, config_fallback_i); - mm_obj_info (self, "using fallback carrier configuration '%s' (version 0x%08x, size %u bytes)", - config->description, config->version, config->total_size); + mm_obj_dbg (self, "using fallback carrier configuration '%s' (version 0x%08x, size %u bytes)", + config->description, config->version, config->total_size); g_free (ctx->config_requested); ctx->config_requested = config_fallback; @@ -2679,7 +2679,7 @@ setup_carrier_config_step (GTask *task) g_assert (ctx->config_requested_i >= 0); g_assert (priv->config_active_i >= 0 || priv->config_active_default); if (ctx->config_requested_i == priv->config_active_i) { - mm_obj_info (self, "carrier config switching not needed: already using '%s'", ctx->config_requested); + mm_obj_msg (self, "carrier config switching not needed: already using '%s'", ctx->config_requested); ctx->step = SETUP_CARRIER_CONFIG_STEP_LAST; setup_carrier_config_step (task); return; @@ -3490,7 +3490,7 @@ uim_switch_slot_ready (QmiClientUim *client, else g_task_return_error (task, g_steal_pointer (&error)); } else { - mm_obj_info (self, "SIM slot switch operation request successful"); + mm_obj_msg (self, "SIM slot switch operation request successful"); g_task_return_boolean (task, TRUE); } g_object_unref (task); @@ -6891,8 +6891,8 @@ inject_xtra_data_next (GTask *task) ctx->i += count; - mm_obj_info (self, "injecting xtra data: %" G_GSIZE_FORMAT " bytes (%u/%u)", - count, (guint) ctx->n_part, (guint) ctx->total_parts); + mm_obj_dbg (self, "injecting xtra data: %" G_GSIZE_FORMAT " bytes (%u/%u)", + count, (guint) ctx->n_part, (guint) ctx->total_parts); qmi_client_loc_inject_xtra_data (ctx->client, input, 10, @@ -7044,8 +7044,8 @@ inject_assistance_data_next (GTask *task) ctx->i += count; - mm_obj_info (self, "injecting predicted orbits data: %" G_GSIZE_FORMAT " bytes (%u/%u)", - count, (guint) ctx->n_part, (guint) ctx->total_parts); + mm_obj_dbg (self, "injecting predicted orbits data: %" G_GSIZE_FORMAT " bytes (%u/%u)", + count, (guint) ctx->n_part, (guint) ctx->total_parts); qmi_client_loc_inject_predicted_orbits_data (ctx->client, input, 10, diff --git a/src/mm-sleep-monitor-powerd.c b/src/mm-sleep-monitor-powerd.c index 8f2d7ada..093b9deb 100644 --- a/src/mm-sleep-monitor-powerd.c +++ b/src/mm-sleep-monitor-powerd.c @@ -81,10 +81,10 @@ signal_cb (GDBusProxy *proxy, if (proxy == self->pd_proxy) { if (strcmp (signalname, "SuspendImminent") == 0) { - mm_obj_info (self, "system suspend signal from powerd"); + mm_obj_msg (self, "system suspend signal from powerd"); g_signal_emit (self, signals[SLEEPING], 0); } else if (strcmp (signalname, "SuspendDone") == 0) { - mm_obj_info (self, "system resume signal from powerd"); + mm_obj_msg (self, "system resume signal from powerd"); g_signal_emit (self, signals[RESUMING], 0); } } diff --git a/src/mm-sleep-monitor-systemd.c b/src/mm-sleep-monitor-systemd.c index a65aac42..99814386 100644 --- a/src/mm-sleep-monitor-systemd.c +++ b/src/mm-sleep-monitor-systemd.c @@ -148,11 +148,11 @@ signal_cb (GDBusProxy *proxy, g_variant_get (args, "(b)", &is_about_to_suspend); if (is_about_to_suspend) { - mm_obj_info (self, "system is about to suspend"); + mm_obj_msg (self, "system is about to suspend"); g_signal_emit (self, signals[SLEEPING], 0); drop_inhibitor (self); } else { - mm_obj_info (self, "system is resuming"); + mm_obj_msg (self, "system is resuming"); take_inhibitor (self); g_signal_emit (self, signals[RESUMING], 0); } |