mirror of
https://gitlab.freedesktop.org/upower/upower.git
synced 2026-05-08 07:48:05 +02:00
don't force a refresh in DkpDevice if the coldplugging failed
This commit is contained in:
parent
b2b3a94f63
commit
0c38eb62fa
1 changed files with 5 additions and 4 deletions
|
|
@ -286,15 +286,16 @@ dkp_device_coldplug (DkpDevice *device, DkpDaemon *daemon, DevkitDevice *d)
|
|||
device->priv->obj->native_path = g_strdup (native_path);
|
||||
|
||||
/* coldplug source */
|
||||
dkp_debug ("coldplug %s", native_path);
|
||||
ret = klass->coldplug (device);
|
||||
if (!ret)
|
||||
goto out;
|
||||
|
||||
/* only put on the bus if we succeeded */
|
||||
if (ret)
|
||||
dkp_device_register_device (device);
|
||||
dkp_device_register_device (device);
|
||||
|
||||
/* force a refresh */
|
||||
dkp_device_refresh_internal (device);
|
||||
|
||||
out:
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue