manager: clear cached port probe when device is removed
This commit is contained in:

committed by
Aleksander Morgado

parent
95ade9c617
commit
d9b2b6f8ec
@@ -28,6 +28,7 @@
|
|||||||
#include "mm-errors.h"
|
#include "mm-errors.h"
|
||||||
#include "mm-plugin.h"
|
#include "mm-plugin.h"
|
||||||
#include "mm-log.h"
|
#include "mm-log.h"
|
||||||
|
#include "mm-port-probe-cache.h"
|
||||||
|
|
||||||
static gboolean impl_manager_enumerate_devices (MMManager *manager,
|
static gboolean impl_manager_enumerate_devices (MMManager *manager,
|
||||||
GPtrArray **devices,
|
GPtrArray **devices,
|
||||||
@@ -610,6 +611,9 @@ device_removed (MMManager *manager, GUdevDevice *device)
|
|||||||
subsys = g_udev_device_get_subsystem (device);
|
subsys = g_udev_device_get_subsystem (device);
|
||||||
name = g_udev_device_get_name (device);
|
name = g_udev_device_get_name (device);
|
||||||
|
|
||||||
|
/* Ensure cached port probe infos get removed when the port is gone */
|
||||||
|
mm_port_probe_cache_remove (device);
|
||||||
|
|
||||||
if (strcmp (subsys, "usb") != 0) {
|
if (strcmp (subsys, "usb") != 0) {
|
||||||
/* find_modem_for_port handles tty and net removal */
|
/* find_modem_for_port handles tty and net removal */
|
||||||
modem = find_modem_for_port (manager, subsys, name);
|
modem = find_modem_for_port (manager, subsys, name);
|
||||||
|
Reference in New Issue
Block a user