From: sachiel Date: Thu, 1 Jul 2010 19:54:47 +0000 (+0000) Subject: Fix nasty cenourette. X-Git-Tag: 2.0_alpha~28^2~57 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=88c9d8f2e9594b30f15cf105d70ca7aa35036294;p=framework%2Fuifw%2Fethumb.git Fix nasty cenourette. Also from Raphael Kubo, you can ask him what the commit message means (rakuco around the irc plane of existence) git-svn-id: https://svn.enlightenment.org/svn/e/trunk/ethumb@49976 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/src/bin/ethumbd.c b/src/bin/ethumbd.c index 31cc593..6e29b4d 100644 --- a/src/bin/ethumbd.c +++ b/src/bin/ethumbd.c @@ -384,10 +384,10 @@ _ethumbd_slave_cmd_ready(struct _Ethumbd *ed) { char *bufcmd = ed->slave.bufcmd; Eina_Bool *success; - char *thumb_path, *thumb_key; + const char *thumb_path = NULL; + const char *thumb_key = NULL; int *size_path, *size_key; - success = (Eina_Bool *)bufcmd; bufcmd += sizeof(*success); @@ -396,13 +396,16 @@ _ethumbd_slave_cmd_ready(struct _Ethumbd *ed) _write_safe(STDERR_FILENO, bufcmd, ed->slave.scmd); - thumb_path = bufcmd; - bufcmd += *size_path; + if (*size_path) + { + thumb_path = bufcmd; + bufcmd += *size_path; + } size_key = (int *)bufcmd; bufcmd += sizeof(*size_key); - thumb_key = bufcmd; + if (*size_key) thumb_key = bufcmd; _generated_cb(ed, *success, thumb_path, thumb_key); diff --git a/src/bin/ethumbd_child.c b/src/bin/ethumbd_child.c index 9aa660c..3f84efd 100644 --- a/src/bin/ethumbd_child.c +++ b/src/bin/ethumbd_child.c @@ -220,7 +220,6 @@ _ec_op_generated_cb(void *data, Ethumb *e, Eina_Bool success) const char *thumb_path, *thumb_key; int size_path, size_key, size_cmd; - fprintf(stderr, "thumbnail generated!"); DBG("thumb generated!"); ethumb_thumb_path_get(e, &thumb_path, &thumb_key);