aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2020-08-16 11:13:26 +0200
committerAleksander Morgado <aleksander@aleksander.es>2020-08-16 14:17:41 +0200
commitde23b53ee4d91367b50a960f8b19b2e29449e49a (patch)
tree460b85ad3092edd01f84911c3c58cc230e275acd
parent55ae47a3bb874991ca621e4aa17cf16b08d28139 (diff)
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.
-rw-r--r--src/mm-modem-helpers.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mm-modem-helpers.c b/src/mm-modem-helpers.c
index f319a925..d080e010 100644
--- a/src/mm-modem-helpers.c
+++ b/src/mm-modem-helpers.c
@@ -2888,8 +2888,11 @@ mm_3gpp_parse_cpms_test_response (const gchar *reply,
#define N_EXPECTED_GROUPS 3
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;
+ }
if (g_strv_length (split) != N_EXPECTED_GROUPS) {
g_set_error (error, MM_CORE_ERROR, MM_CORE_ERROR_FAILED,