helpers: skip g_warning() in mm_3gpp_parse_ws46_test_response()
Use mm_obj_warn() instead.
This commit is contained in:
@@ -71,7 +71,7 @@ load_supported_modes_ready (MMIfaceModem *self,
|
||||
return;
|
||||
}
|
||||
|
||||
modes = mm_3gpp_parse_ws46_test_response (response, &error);
|
||||
modes = mm_3gpp_parse_ws46_test_response (response, self, &error);
|
||||
if (!modes) {
|
||||
g_prefix_error (&error, "parsing WS46=? response failed: ");
|
||||
g_task_return_error (task, error);
|
||||
|
@@ -520,7 +520,7 @@ current_capabilities_ws46_test_ready (MMBaseModem *self,
|
||||
if (!response)
|
||||
goto out;
|
||||
|
||||
modes = mm_3gpp_parse_ws46_test_response (response, NULL);
|
||||
modes = mm_3gpp_parse_ws46_test_response (response, self, NULL);
|
||||
if (!modes)
|
||||
goto out;
|
||||
|
||||
@@ -1745,7 +1745,7 @@ supported_modes_ws46_test_ready (MMBroadbandModem *self,
|
||||
goto out;
|
||||
}
|
||||
|
||||
modes = mm_3gpp_parse_ws46_test_response (response, &error);
|
||||
modes = mm_3gpp_parse_ws46_test_response (response, self, &error);
|
||||
if (!modes) {
|
||||
mm_obj_dbg (self, "parsing WS46=? response failed: '%s'", error->message);
|
||||
g_error_free (error);
|
||||
|
@@ -995,6 +995,7 @@ static const Ws46Mode ws46_modes[] = {
|
||||
|
||||
GArray *
|
||||
mm_3gpp_parse_ws46_test_response (const gchar *response,
|
||||
gpointer log_object,
|
||||
GError **error)
|
||||
{
|
||||
GArray *modes = NULL;
|
||||
@@ -1060,7 +1061,7 @@ mm_3gpp_parse_ws46_test_response (const gchar *response,
|
||||
}
|
||||
|
||||
if (j == G_N_ELEMENTS (ws46_modes))
|
||||
g_warning ("Unknown +WS46 mode reported: %u", val);
|
||||
mm_obj_warn (log_object, "Unknown +WS46 mode reported: %u", val);
|
||||
}
|
||||
|
||||
if (supported_mode_25) {
|
||||
|
@@ -146,6 +146,7 @@ GRegex *mm_3gpp_cds_regex_get (void);
|
||||
|
||||
/* AT+WS46=? response parser: returns array of MMModemMode values */
|
||||
GArray *mm_3gpp_parse_ws46_test_response (const gchar *response,
|
||||
gpointer log_object,
|
||||
GError **error);
|
||||
|
||||
/* AT+COPS=? (network scan) response parser */
|
||||
|
@@ -126,7 +126,7 @@ test_ws46_response (const gchar *str,
|
||||
GArray *modes;
|
||||
GError *error = NULL;
|
||||
|
||||
modes = mm_3gpp_parse_ws46_test_response (str, &error);
|
||||
modes = mm_3gpp_parse_ws46_test_response (str, NULL, &error);
|
||||
g_assert_no_error (error);
|
||||
g_assert (modes != NULL);
|
||||
g_assert_cmpuint (modes->len, ==, n_expected);
|
||||
|
Reference in New Issue
Block a user