device,plugin: reset MMDevice's hotplugged after creating the modem
The hotplugged flag was added to simplify modem probe on first time it is created. Before the re-probe it must be set to FALSE to destroy all existing netlink interfaces and force full reconfiguration.
This commit is contained in:
@@ -698,6 +698,12 @@ mm_device_get_hotplugged (MMDevice *self)
|
||||
return self->priv->hotplugged;
|
||||
}
|
||||
|
||||
void
|
||||
mm_device_reset_hotplugged (MMDevice *self)
|
||||
{
|
||||
self->priv->hotplugged = FALSE;
|
||||
}
|
||||
|
||||
gboolean
|
||||
mm_device_get_inhibited (MMDevice *self)
|
||||
{
|
||||
|
||||
@@ -107,6 +107,7 @@ GObject *mm_device_get_plugin (MMDevice *self);
|
||||
MMBaseModem *mm_device_peek_modem (MMDevice *self);
|
||||
MMBaseModem *mm_device_get_modem (MMDevice *self);
|
||||
gboolean mm_device_get_hotplugged (MMDevice *self);
|
||||
void mm_device_reset_hotplugged (MMDevice *self);
|
||||
gboolean mm_device_get_inhibited (MMDevice *self);
|
||||
|
||||
GObject *mm_device_peek_port_probe (MMDevice *self,
|
||||
|
||||
@@ -962,6 +962,8 @@ mm_plugin_create_modem (MMPlugin *self,
|
||||
return NULL;
|
||||
|
||||
mm_base_modem_set_hotplugged (modem, mm_device_get_hotplugged (device));
|
||||
/* Reset hotplugged flag to guarantee full reconfiguration on next probe */
|
||||
mm_device_reset_hotplugged (device);
|
||||
|
||||
if (port_probes) {
|
||||
GList *l;
|
||||
|
||||
Reference in New Issue
Block a user