plugin: defer task if supports check tells us to retry
Huawei modems will probe interface 0 always first; if we try to probe another interface meanwhile the supports check will give us a MM_CORE_ERROR_RETRY error, indicating that we need to defer the probing of the port.
This commit is contained in:
@@ -477,8 +477,18 @@ port_probe_run_ready (MMPortProbe *probe,
|
||||
g_simple_async_result_set_op_res_gpointer (ctx->result,
|
||||
GUINT_TO_POINTER (MM_PLUGIN_SUPPORTS_PORT_UNSUPPORTED),
|
||||
NULL);
|
||||
} else {
|
||||
}
|
||||
/* Probing failed but the plugin tells us to retry; so we'll defer the
|
||||
* probing a bit */
|
||||
else if (g_error_matches (error,
|
||||
MM_CORE_ERROR,
|
||||
MM_CORE_ERROR_RETRY)) {
|
||||
g_simple_async_result_set_op_res_gpointer (ctx->result,
|
||||
GUINT_TO_POINTER (MM_PLUGIN_SUPPORTS_PORT_DEFER),
|
||||
NULL);
|
||||
}
|
||||
/* For remaining errors, just propagate them */
|
||||
else {
|
||||
g_simple_async_result_take_error (ctx->result, error);
|
||||
}
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user