From 0f708daf0b9bfa26193d0efbd2591bcc81ef1d44 Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Fri, 3 Apr 2020 15:47:37 +0200 Subject: modem-helpers: port supported modes filtering to use object logging --- src/mm-modem-helpers.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'src/mm-modem-helpers.c') diff --git a/src/mm-modem-helpers.c b/src/mm-modem-helpers.c index ac9802a4..e73bff11 100644 --- a/src/mm-modem-helpers.c +++ b/src/mm-modem-helpers.c @@ -418,7 +418,8 @@ mm_new_iso8601_time (guint year, GArray * mm_filter_supported_modes (const GArray *all, - const GArray *supported_combinations) + const GArray *supported_combinations, + gpointer log_object) { MMModemModeCombination all_item; guint i; @@ -429,6 +430,9 @@ mm_filter_supported_modes (const GArray *all, g_return_val_if_fail (all->len == 1, NULL); g_return_val_if_fail (supported_combinations != NULL, NULL); + mm_obj_dbg (log_object, "filtering %u supported mode combinations with %u modes", + supported_combinations->len, all->len); + all_item = g_array_index (all, MMModemModeCombination, 0); g_return_val_if_fail (all_item.allowed != MM_MODEM_MODE_NONE, NULL); @@ -450,14 +454,17 @@ mm_filter_supported_modes (const GArray *all, } if (filtered_combinations->len == 0) - mm_warn ("All supported mode combinations were filtered out."); + mm_obj_warn (log_object, "all supported mode combinations were filtered out"); /* Add default entry with the generic mask including all items */ if (!all_item_added) { - mm_dbg ("Adding an explicit item with all supported modes allowed"); + mm_obj_dbg (log_object, "adding an explicit item with all supported modes allowed"); g_array_append_val (filtered_combinations, all_item); } + mm_obj_dbg (log_object, "device supports %u different mode combinations", + filtered_combinations->len); + return filtered_combinations; } -- cgit v1.2.3-70-g09d2