From 25b89e99c389b058f088a9a6e6284390704df6d6 Mon Sep 17 00:00:00 2001 From: Richard Hughes Date: Mon, 11 Aug 2008 13:24:48 +0100 Subject: [PATCH] reresh the object before we calculate the id, else we fail and do not get history --- src/dkp-supply.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/dkp-supply.c b/src/dkp-supply.c index f51d60a..334e93d 100644 --- a/src/dkp-supply.c +++ b/src/dkp-supply.c @@ -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; }