summaryrefslogtreecommitdiff
path: root/src/bin/ethumb_client/ethumbd.c
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2013-07-09 20:13:24 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2013-07-09 20:13:24 +0900
commit6ceabbdb6cfeabc02c0bd16f08218543bf0a1d73 (patch)
treeedaa841247d068f2c3c0d42fec0db6ce81bce8f0 /src/bin/ethumb_client/ethumbd.c
parentbb4539c82652e88c9908fa75b6214723977ec2e7 (diff)
ethumb - fix ethumbd timeout to always work at start and mid-run too.
Diffstat (limited to '')
-rw-r--r--src/bin/ethumb_client/ethumbd.c34
1 files changed, 14 insertions, 20 deletions
diff --git a/src/bin/ethumb_client/ethumbd.c b/src/bin/ethumb_client/ethumbd.c
index c09c89a7b4..a0313c57e8 100644
--- a/src/bin/ethumb_client/ethumbd.c
+++ b/src/bin/ethumb_client/ethumbd.c
@@ -269,6 +269,14 @@ _ethumbd_timeout_stop(Ethumbd *ed)
269 ed->timeout_timer = NULL; 269 ed->timeout_timer = NULL;
270} 270}
271 271
272static void
273_ethumbd_timeout_redo(Ethumbd *ed)
274{
275 //if (!ed->queue.count)
276 _ethumbd_timeout_stop(ed);
277 _ethumbd_timeout_start(ed);
278}
279
272static int 280static int
273_ethumb_dbus_check_id(Ethumbd_Object *eobject, int id) 281_ethumb_dbus_check_id(Ethumbd_Object *eobject, int id)
274{ 282{
@@ -393,11 +401,7 @@ _generated_cb(Ethumbd *ed, Eina_Bool success, const char *thumb_path, const char
393 eina_stringshare_del(ed->processing->thumb_key); 401 eina_stringshare_del(ed->processing->thumb_key);
394 free(ed->processing); 402 free(ed->processing);
395 ed->processing = NULL; 403 ed->processing = NULL;
396 if (!ed->queue.count) 404 _ethumbd_timeout_redo(ed);
397 {
398 _ethumbd_timeout_stop(ed);
399 _ethumbd_timeout_start(ed);
400 }
401} 405}
402 406
403static void 407static void
@@ -501,12 +505,7 @@ _ethumbd_slave_data_read_cb(void *data, int type EINA_UNUSED, void *event)
501 _ethumbd_slave_cmd_ready(ed); 505 _ethumbd_slave_cmd_ready(ed);
502 } 506 }
503 } 507 }
504 508 _ethumbd_timeout_redo(ed);
505 if (!ed->queue.count)
506 {
507 _ethumbd_timeout_stop(ed);
508 _ethumbd_timeout_start(ed);
509 }
510 return 1; 509 return 1;
511} 510}
512 511
@@ -721,11 +720,7 @@ _process_queue_cb(void *data)
721 if (!queue->nqueue) 720 if (!queue->nqueue)
722 { 721 {
723 ed->idler = NULL; 722 ed->idler = NULL;
724 if (!ed->queue.count) 723 _ethumbd_timeout_redo(ed);
725 {
726 _ethumbd_timeout_stop(ed);
727 _ethumbd_timeout_start(ed);
728 }
729 ed->idler = NULL; 724 ed->idler = NULL;
730 return 0; 725 return 0;
731 } 726 }
@@ -882,7 +877,7 @@ _ethumb_table_del(Ethumbd *ed, int i)
882 q->count--; 877 q->count--;
883 _ethumbd_child_write_op_del(&ed->slave, i); 878 _ethumbd_child_write_op_del(&ed->slave, i);
884 if (!q->count && !ed->processing) 879 if (!q->count && !ed->processing)
885 _ethumbd_timeout_start(ed); 880 _ethumbd_timeout_redo(ed);
886} 881}
887 882
888static void 883static void
@@ -953,8 +948,7 @@ _ethumb_dbus_ethumb_new_cb(const Eldbus_Service_Interface *interface, const Eldb
953 _name_owner_changed_cb, odata, 948 _name_owner_changed_cb, odata,
954 EINA_TRUE); 949 EINA_TRUE);
955 _ethumbd_child_write_op_new(&ed->slave, i); 950 _ethumbd_child_write_op_new(&ed->slave, i);
956 _ethumbd_timeout_stop(ed); 951 _ethumbd_timeout_redo(ed);
957 _ethumbd_timeout_start(ed);
958 952
959 end_new: 953 end_new:
960 reply = eldbus_message_method_return_new(msg); 954 reply = eldbus_message_method_return_new(msg);
@@ -1651,7 +1645,7 @@ _ethumb_dbus_request_name_cb(void *data, const Eldbus_Message *msg, Eldbus_Pendi
1651 1645
1652 eldbus_service_object_data_set(iface, DAEMON, ed); 1646 eldbus_service_object_data_set(iface, DAEMON, ed);
1653 1647
1654 _ethumbd_timeout_start(ed); 1648 _ethumbd_timeout_redo(ed);
1655} 1649}
1656 1650
1657static int 1651static int