Fix nasty cenourette.
authorsachiel <sachiel@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 1 Jul 2010 19:54:47 +0000 (19:54 +0000)
committersachiel <sachiel@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 1 Jul 2010 19:54:47 +0000 (19:54 +0000)
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

src/bin/ethumbd.c
src/bin/ethumbd_child.c

index 31cc593..6e29b4d 100644 (file)
@@ -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);
 
index 9aa660c..3f84efd 100644 (file)
@@ -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);