aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLubomir Rintel <lkundrak@v3.sk>2024-07-07 22:37:22 +0200
committerAleksander Morgado <aleksander@aleksander.es>2024-07-09 14:55:30 +0000
commit0365f9f0d8d8837b36e2f3f44d3ec1750244bb24 (patch)
tree2b7dae08fe3759e432995dd86eadd367fc97412f
parent26f36f79c9e7f5330a58bfde7f2f33c879e58a12 (diff)
Revert "ublox/helpers: fix propagation of +URAT response parse error"
Not quite correct -- with the patch applied, the newly allocated GError could potentially overwrite inner_error that was set previously. This reverts commit d550a24ffdae4492e9f9e18fdf294adcda28fb65.
-rw-r--r--src/plugins/ublox/mm-modem-helpers-ublox.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/plugins/ublox/mm-modem-helpers-ublox.c b/src/plugins/ublox/mm-modem-helpers-ublox.c
index ffb1374d..0fd1c5b0 100644
--- a/src/plugins/ublox/mm-modem-helpers-ublox.c
+++ b/src/plugins/ublox/mm-modem-helpers-ublox.c
@@ -1813,13 +1813,14 @@ mm_ublox_parse_urat_read_response (const gchar *response,
}
out:
+ if (inner_error) {
+ g_propagate_error (error, inner_error);
+ return FALSE;
+ }
+
if (allowed == MM_MODEM_MODE_NONE) {
inner_error = g_error_new (MM_CORE_ERROR, MM_CORE_ERROR_FAILED,
"Couldn't parse +URAT response: %s", response);
- }
-
- if (inner_error) {
- g_propagate_error (error, inner_error);
return FALSE;
}