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.
This commit is contained in:
committed by
Aleksander Morgado
parent
0365f9f0d8
commit
664d748a93
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user