plugin: abort probing when the port has been released from the device
This commit is contained in:
@@ -498,16 +498,27 @@ mm_plugin_supports_port (MMPlugin *self,
|
|||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Need to launch new probing */
|
||||||
|
probe = MM_PORT_PROBE (mm_device_get_port_probe (device, port));
|
||||||
|
if (!probe) {
|
||||||
|
/* This may happen if the ports get removed from the device while
|
||||||
|
* probing is ongoing */
|
||||||
|
g_simple_async_result_set_error (async_result,
|
||||||
|
MM_CORE_ERROR,
|
||||||
|
MM_CORE_ERROR_FAILED,
|
||||||
|
"(%s) Missing port probe for port (%s/%s)",
|
||||||
|
self->priv->name,
|
||||||
|
g_udev_device_get_subsystem (port),
|
||||||
|
g_udev_device_get_name (port));
|
||||||
|
g_simple_async_result_complete_in_idle (async_result);
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
mm_dbg ("(%s) checking port support (%s,%s)",
|
mm_dbg ("(%s) checking port support (%s,%s)",
|
||||||
self->priv->name,
|
self->priv->name,
|
||||||
g_udev_device_get_subsystem (port),
|
g_udev_device_get_subsystem (port),
|
||||||
g_udev_device_get_name (port));
|
g_udev_device_get_name (port));
|
||||||
|
|
||||||
/* Need to launch new probing */
|
|
||||||
|
|
||||||
probe = MM_PORT_PROBE (mm_device_get_port_probe (device, port));
|
|
||||||
g_assert (probe);
|
|
||||||
|
|
||||||
/* Before launching any probing, check if the port is a net device (which
|
/* Before launching any probing, check if the port is a net device (which
|
||||||
* cannot be probed). */
|
* cannot be probed). */
|
||||||
if (g_str_equal (g_udev_device_get_subsystem (port), "net")) {
|
if (g_str_equal (g_udev_device_get_subsystem (port), "net")) {
|
||||||
|
Reference in New Issue
Block a user