diff options
author | Lubomir Rintel <lkundrak@v3.sk> | 2024-05-23 14:45:22 +0200 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2024-07-09 14:55:30 +0000 |
commit | 664d748a934bbb7ff295b4cf0dd3557b316d9c35 (patch) | |
tree | 6bcd0e887e52676200d2b0e898c600a88275f1be /src | |
parent | 0365f9f0d8d8837b36e2f3f44d3ec1750244bb24 (diff) |
ublox/helpers: fix propagation of +URAT response parse error
The fallback error handling branch happens much too late, just leaking the
newly made GError instead of propagating.
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/ublox/mm-modem-helpers-ublox.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/plugins/ublox/mm-modem-helpers-ublox.c b/src/plugins/ublox/mm-modem-helpers-ublox.c index 0fd1c5b0..a494dd02 100644 --- a/src/plugins/ublox/mm-modem-helpers-ublox.c +++ b/src/plugins/ublox/mm-modem-helpers-ublox.c @@ -1812,18 +1812,18 @@ mm_ublox_parse_urat_read_response (const gchar *response, } } + if (!inner_error && allowed == MM_MODEM_MODE_NONE) { + inner_error = g_error_new (MM_CORE_ERROR, MM_CORE_ERROR_FAILED, + "Couldn't parse +URAT response: %s", response); + goto out; + } + 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); - return FALSE; - } - *out_allowed = allowed; *out_preferred = preferred; return TRUE; |