summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2013-07-09 19:56:18 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2013-07-09 19:56:18 +0900
commitbb4539c82652e88c9908fa75b6214723977ec2e7 (patch)
treefc25d0fd8a7463d224b4c47afbce32100d88a198
parent95c836eaa39d62db36767b29bf2870547fc2804f (diff)
ethumbd timeout to 30s to not timeout in middle of long generate
Diffstat (limited to '')
-rw-r--r--src/bin/ethumb_client/ethumbd.c19
1 files changed, 16 insertions, 3 deletions
diff --git a/src/bin/ethumb_client/ethumbd.c b/src/bin/ethumb_client/ethumbd.c
index 9bf023b6af..c09c89a7b4 100644
--- a/src/bin/ethumb_client/ethumbd.c
+++ b/src/bin/ethumb_client/ethumbd.c
@@ -393,6 +393,11 @@ _generated_cb(Ethumbd *ed, Eina_Bool success, const char *thumb_path, const char
393 eina_stringshare_del(ed->processing->thumb_key); 393 eina_stringshare_del(ed->processing->thumb_key);
394 free(ed->processing); 394 free(ed->processing);
395 ed->processing = NULL; 395 ed->processing = NULL;
396 if (!ed->queue.count)
397 {
398 _ethumbd_timeout_stop(ed);
399 _ethumbd_timeout_start(ed);
400 }
396} 401}
397 402
398static void 403static void
@@ -497,6 +502,11 @@ _ethumbd_slave_data_read_cb(void *data, int type EINA_UNUSED, void *event)
497 } 502 }
498 } 503 }
499 504
505 if (!ed->queue.count)
506 {
507 _ethumbd_timeout_stop(ed);
508 _ethumbd_timeout_start(ed);
509 }
500 return 1; 510 return 1;
501} 511}
502 512
@@ -711,8 +721,11 @@ _process_queue_cb(void *data)
711 if (!queue->nqueue) 721 if (!queue->nqueue)
712 { 722 {
713 ed->idler = NULL; 723 ed->idler = NULL;
714 if (!queue->count) 724 if (!ed->queue.count)
715 _ethumbd_timeout_start(ed); 725 {
726 _ethumbd_timeout_stop(ed);
727 _ethumbd_timeout_start(ed);
728 }
716 ed->idler = NULL; 729 ed->idler = NULL;
717 return 0; 730 return 0;
718 } 731 }
@@ -1690,7 +1703,7 @@ main(int argc, char *argv[])
1690 int arg_idx; 1703 int arg_idx;
1691 Ethumbd ed; 1704 Ethumbd ed;
1692 int child; 1705 int child;
1693 double timeout = 10.0; 1706 double timeout = 30.0;
1694 1707
1695 memset(&ed, 0, sizeof(ed)); 1708 memset(&ed, 0, sizeof(ed));
1696 ecore_init(); 1709 ecore_init();