aboutsummaryrefslogtreecommitdiffstats
path: root/src/bin/ethumb_client
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
parentethumbd timeout to 30s to not timeout in middle of long generate (diff)
downloadefl-6ceabbdb6cfeabc02c0bd16f08218543bf0a1d73.tar.gz
ethumb - fix ethumbd timeout to always work at start and mid-run too.
Diffstat (limited to 'src/bin/ethumb_client')
-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)
ed->timeout_timer = NULL;
}
+static void
+_ethumbd_timeout_redo(Ethumbd *ed)
+{
+ //if (!ed->queue.count)
+ _ethumbd_timeout_stop(ed);
+ _ethumbd_timeout_start(ed);
+}
+
static int
_ethumb_dbus_check_id(Ethumbd_Object *eobject, int id)
{
@@ -393,11 +401,7 @@ _generated_cb(Ethumbd *ed, Eina_Bool success, const char *thumb_path, const char
eina_stringshare_del(ed->processing->thumb_key);
free(ed->processing);
ed->processing = NULL;
- if (!ed->queue.count)
- {
- _ethumbd_timeout_stop(ed);
- _ethumbd_timeout_start(ed);
- }
+ _ethumbd_timeout_redo(ed);
}
static void
@@ -501,12 +505,7 @@ _ethumbd_slave_data_read_cb(void *data, int type EINA_UNUSED, void *event)
_ethumbd_slave_cmd_ready(ed);
}
}
-
- if (!ed->queue.count)
- {
- _ethumbd_timeout_stop(ed);
- _ethumbd_timeout_start(ed);
- }
+ _ethumbd_timeout_redo(ed);
return 1;
}
@@ -721,11 +720,7 @@ _process_queue_cb(void *data)
if (!queue->nqueue)
{
ed->idler = NULL;
- if (!ed->queue.count)
- {
- _ethumbd_timeout_stop(ed);
- _ethumbd_timeout_start(ed);
- }
+ _ethumbd_timeout_redo(ed);
ed->idler = NULL;
return 0;
}
@@ -882,7 +877,7 @@ _ethumb_table_del(Ethumbd *ed, int i)
q->count--;
_ethumbd_child_write_op_del(&ed->slave, i);
if (!q->count && !ed->processing)
- _ethumbd_timeout_start(ed);
+ _ethumbd_timeout_redo(ed);
}
static void
@@ -953,8 +948,7 @@ _ethumb_dbus_ethumb_new_cb(const Eldbus_Service_Interface *interface, const Eldb
_name_owner_changed_cb, odata,
EINA_TRUE);
_ethumbd_child_write_op_new(&ed->slave, i);
- _ethumbd_timeout_stop(ed);
- _ethumbd_timeout_start(ed);
+ _ethumbd_timeout_redo(ed);
end_new:
reply = eldbus_message_method_return_new(msg);
@@ -1651,7 +1645,7 @@ _ethumb_dbus_request_name_cb(void *data, const Eldbus_Message *msg, Eldbus_Pendi
eldbus_service_object_data_set(iface, DAEMON, ed);
- _ethumbd_timeout_start(ed);
+ _ethumbd_timeout_redo(ed);
}
static int