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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
modes = mm_3gpp_parse_ws46_test_response (response, &error);
|
modes = mm_3gpp_parse_ws46_test_response (response, self, &error);
|
||||||
if (!modes) {
|
if (!modes) {
|
||||||
g_prefix_error (&error, "parsing WS46=? response failed: ");
|
g_prefix_error (&error, "parsing WS46=? response failed: ");
|
||||||
g_task_return_error (task, error);
|
g_task_return_error (task, error);
|
||||||
|
@@ -520,7 +520,7 @@ current_capabilities_ws46_test_ready (MMBaseModem *self,
|
|||||||
if (!response)
|
if (!response)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
modes = mm_3gpp_parse_ws46_test_response (response, NULL);
|
modes = mm_3gpp_parse_ws46_test_response (response, self, NULL);
|
||||||
if (!modes)
|
if (!modes)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
@@ -1745,7 +1745,7 @@ supported_modes_ws46_test_ready (MMBroadbandModem *self,
|
|||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
modes = mm_3gpp_parse_ws46_test_response (response, &error);
|
modes = mm_3gpp_parse_ws46_test_response (response, self, &error);
|
||||||
if (!modes) {
|
if (!modes) {
|
||||||
mm_obj_dbg (self, "parsing WS46=? response failed: '%s'", error->message);
|
mm_obj_dbg (self, "parsing WS46=? response failed: '%s'", error->message);
|
||||||
g_error_free (error);
|
g_error_free (error);
|
||||||
|
@@ -995,6 +995,7 @@ static const Ws46Mode ws46_modes[] = {
|
|||||||
|
|
||||||
GArray *
|
GArray *
|
||||||
mm_3gpp_parse_ws46_test_response (const gchar *response,
|
mm_3gpp_parse_ws46_test_response (const gchar *response,
|
||||||
|
gpointer log_object,
|
||||||
GError **error)
|
GError **error)
|
||||||
{
|
{
|
||||||
GArray *modes = NULL;
|
GArray *modes = NULL;
|
||||||
@@ -1060,7 +1061,7 @@ mm_3gpp_parse_ws46_test_response (const gchar *response,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (j == G_N_ELEMENTS (ws46_modes))
|
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) {
|
if (supported_mode_25) {
|
||||||
|
@@ -146,6 +146,7 @@ GRegex *mm_3gpp_cds_regex_get (void);
|
|||||||
|
|
||||||
/* AT+WS46=? response parser: returns array of MMModemMode values */
|
/* AT+WS46=? response parser: returns array of MMModemMode values */
|
||||||
GArray *mm_3gpp_parse_ws46_test_response (const gchar *response,
|
GArray *mm_3gpp_parse_ws46_test_response (const gchar *response,
|
||||||
|
gpointer log_object,
|
||||||
GError **error);
|
GError **error);
|
||||||
|
|
||||||
/* AT+COPS=? (network scan) response parser */
|
/* AT+COPS=? (network scan) response parser */
|
||||||
|
@@ -126,7 +126,7 @@ test_ws46_response (const gchar *str,
|
|||||||
GArray *modes;
|
GArray *modes;
|
||||||
GError *error = NULL;
|
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_no_error (error);
|
||||||
g_assert (modes != NULL);
|
g_assert (modes != NULL);
|
||||||
g_assert_cmpuint (modes->len, ==, n_expected);
|
g_assert_cmpuint (modes->len, ==, n_expected);
|
||||||
|
Reference in New Issue
Block a user