From dd2264db171616a7dd84920341c462e383870c01 Mon Sep 17 00:00:00 2001 From: Sung-jae Park Date: Fri, 12 Oct 2012 10:10:13 +0900 Subject: [PATCH] Pended update scheduler is updated. If a livebox doesn't need to update its contents (need_to_update == false), Don't push it to the pended update list. Change-Id: I75b12d38296cedab08448e189058fa823fc789fe --- debian/changelog | 10 +++++++++- packaging/com.samsung.data-provider-slave.spec | 2 +- src/livebox.c | 17 ++++++++++------- 3 files changed, 20 insertions(+), 9 deletions(-) diff --git a/debian/changelog b/debian/changelog index cd53724..efd2d4a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,9 +1,17 @@ +data-provider-slave (0.6.3) unstable; urgency=low + + * Git: slp/pkgs/d/data-provider-slave + * Tag: data-provider-slave_0.6.3 + + -- Sung-jae Park Fri, 12 Oct 2012 11:21:06 +0900 + data-provider-slave (0.6.2) unstable; urgency=low * Git: slp/pkgs/d/data-provider-slave * Tag: data-provider-slave_0.6.2 + * - i - -- Sung-jae Park Wed, 10 Oct 2012 17:59:28 +0900 + -- Sung-jae Park Fri, 12 Oct 2012 11:20:47 +0900 data-provider-slave (0.6.1) unstable; urgency=low diff --git a/packaging/com.samsung.data-provider-slave.spec b/packaging/com.samsung.data-provider-slave.spec index 6a60b8e..8c99fb8 100644 --- a/packaging/com.samsung.data-provider-slave.spec +++ b/packaging/com.samsung.data-provider-slave.spec @@ -1,6 +1,6 @@ Name: com.samsung.data-provider-slave Summary: Slave data provider -Version: 0.6.2 +Version: 0.6.3 Release: 1 Group: main/app License: Samsung Proprietary License diff --git a/src/livebox.c b/src/livebox.c index 5c7fab5..ddd9afe 100644 --- a/src/livebox.c +++ b/src/livebox.c @@ -265,13 +265,6 @@ static Eina_Bool updator_cb(void *data) if (item->monitor) return ECORE_CALLBACK_RENEW; - if (s_info.update || !pd_is_opened(item->inst->item->pkgname)) { - (void)append_pending_list(item); - return ECORE_CALLBACK_RENEW; - } - - DbgPrint("Consuming pended update for %s\n", item->inst->item->pkgname); - if (so_is_updated(item->inst) <= 0) { if (so_need_to_destroy(item->inst) == NEED_TO_DESTROY) { provider_send_deleted(item->inst->item->pkgname, item->inst->id); @@ -282,6 +275,13 @@ static Eina_Bool updator_cb(void *data) return ECORE_CALLBACK_RENEW; } + if (s_info.update || !pd_is_opened(item->inst->item->pkgname)) { + (void)append_pending_list(item); + return ECORE_CALLBACK_RENEW; + } + + DbgPrint("Consuming pended update for %s\n", item->inst->item->pkgname); + item->monitor = ecore_timer_add(item->inst->item->timeout, update_timeout_cb, item); if (!item->monitor) { ErrPrint("Failed to add update monitor %s(%s):%d\n", @@ -588,6 +588,9 @@ int livebox_destroy(const char *pkgname, const char *id) item = eina_list_data_get(l); s_info.item_list = eina_list_remove_list(s_info.item_list, l); + if (s_info.update == item) + s_info.update = NULL; + if (item->timer) { clear_from_pending_list(item); ecore_timer_del(item->timer); -- 2.7.4