reresh the object before we calculate the id, else we fail and do not get history

This commit is contained in:
Richard Hughes 2008-08-11 13:24:48 +01:00
parent c464646932
commit 25b89e99c3

View file

@ -409,14 +409,15 @@ dkp_supply_coldplug (DkpDevice *device)
obj->type = DKP_DEVICE_TYPE_BATTERY;
}
/* coldplug values */
dkp_supply_refresh (device);
/* get the id so we can load the old history */
id = dkp_object_get_id (obj);
if (id != NULL)
dkp_history_set_id (supply->priv->history, id);
g_free (id);
/* coldplug */
dkp_supply_refresh (device);
return TRUE;
}