modem-helpers: ensure error is set in mm_3gpp_parse_cpms_test_response()
If splitting the +CPMS=? response in groups fails, make sure we set the GError when returning FALSE.
This commit is contained in:
@@ -2888,8 +2888,11 @@ mm_3gpp_parse_cpms_test_response (const gchar *reply,
|
|||||||
#define N_EXPECTED_GROUPS 3
|
#define N_EXPECTED_GROUPS 3
|
||||||
|
|
||||||
split = mm_split_string_groups (mm_strip_tag (reply, "+CPMS:"));
|
split = mm_split_string_groups (mm_strip_tag (reply, "+CPMS:"));
|
||||||
if (!split)
|
if (!split) {
|
||||||
|
g_set_error (error, MM_CORE_ERROR, MM_CORE_ERROR_FAILED,
|
||||||
|
"Couldn't split +CPMS test response in groups");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
if (g_strv_length (split) != N_EXPECTED_GROUPS) {
|
if (g_strv_length (split) != N_EXPECTED_GROUPS) {
|
||||||
g_set_error (error, MM_CORE_ERROR, MM_CORE_ERROR_FAILED,
|
g_set_error (error, MM_CORE_ERROR, MM_CORE_ERROR_FAILED,
|
||||||
|
Reference in New Issue
Block a user