Pended update scheduler is updated.
authorSung-jae Park <nicesj.park@samsung.com>
Fri, 12 Oct 2012 01:10:13 +0000 (10:10 +0900)
committerSung-jae Park <nicesj.park@samsung.com>
Fri, 12 Oct 2012 02:21:22 +0000 (11:21 +0900)
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
packaging/com.samsung.data-provider-slave.spec
src/livebox.c

index cd53724..efd2d4a 100644 (file)
@@ -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 <nicesj.park@samsung.com>  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 <nicesj.park@samsung.com>  Wed, 10 Oct 2012 17:59:28 +0900
+ -- Sung-jae Park <nicesj.park@samsung.com>  Fri, 12 Oct 2012 11:20:47 +0900
 
 data-provider-slave (0.6.1) unstable; urgency=low
 
index 6a60b8e..8c99fb8 100644 (file)
@@ -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
index 5c7fab5..ddd9afe 100644 (file)
@@ -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);