helpers: +CNUM parser doesn't return any error

This commit is contained in:
Aleksander Morgado
2017-07-19 11:21:27 +02:00
parent 7ff5e30dce
commit 4db3ccf2af
5 changed files with 5 additions and 9 deletions

View File

@@ -223,7 +223,7 @@ response_processor_cnum_ignore_at_errors (MMBaseModem *self,
return FALSE; return FALSE;
} }
own_numbers = mm_3gpp_parse_cnum_exec_response (response, result_error); own_numbers = mm_3gpp_parse_cnum_exec_response (response);
if (!own_numbers) if (!own_numbers)
return FALSE; return FALSE;

View File

@@ -1161,7 +1161,7 @@ modem_load_own_numbers_done (MMIfaceModem *self,
} }
g_task_return_error (task, error); g_task_return_error (task, error);
} else { } else {
numbers = mm_3gpp_parse_cnum_exec_response (result, NULL); numbers = mm_3gpp_parse_cnum_exec_response (result);
g_task_return_pointer (task, numbers, (GDestroyNotify)g_strfreev); g_task_return_pointer (task, numbers, (GDestroyNotify)g_strfreev);
} }
g_object_unref (task); g_object_unref (task);

View File

@@ -2817,8 +2817,7 @@ mm_3gpp_parse_clck_write_response (const gchar *reply,
/*************************************************************************/ /*************************************************************************/
GStrv GStrv
mm_3gpp_parse_cnum_exec_response (const gchar *reply, mm_3gpp_parse_cnum_exec_response (const gchar *reply)
GError **error)
{ {
GArray *array = NULL; GArray *array = NULL;
GRegex *r; GRegex *r;

View File

@@ -226,8 +226,7 @@ gboolean mm_3gpp_parse_clck_write_response (const gchar *reply,
gboolean *enabled); gboolean *enabled);
/* AT+CNUM (Own numbers) response parser */ /* AT+CNUM (Own numbers) response parser */
GStrv mm_3gpp_parse_cnum_exec_response (const gchar *reply, GStrv mm_3gpp_parse_cnum_exec_response (const gchar *reply);
GError **error);
/* AT+CMER=? (Mobile Equipment Event Reporting) response parser */ /* AT+CMER=? (Mobile Equipment Event Reporting) response parser */
typedef enum { /*< underscore_name=mm_3gpp_cmer_mode >*/ typedef enum { /*< underscore_name=mm_3gpp_cmer_mode >*/

View File

@@ -2690,14 +2690,12 @@ test_cnum_results (const gchar *desc,
const GStrv expected) const GStrv expected)
{ {
GStrv results; GStrv results;
GError *error = NULL;
guint i; guint i;
trace ("\nTesting +CNUM response (%s)...\n", desc); trace ("\nTesting +CNUM response (%s)...\n", desc);
results = mm_3gpp_parse_cnum_exec_response (reply, &error); results = mm_3gpp_parse_cnum_exec_response (reply);
g_assert (results); g_assert (results);
g_assert_no_error (error);
g_assert_cmpuint (g_strv_length (results), ==, g_strv_length (expected)); g_assert_cmpuint (g_strv_length (results), ==, g_strv_length (expected));
for (i = 0; results[i]; i++) { for (i = 0; results[i]; i++) {