Hello efl developers,

Trying to use ecore_con_url I wrote a simple test (file in attached)
but ecore_con_url_get is failing.
Digging into the code I figured out that the function curl_multi_fdset
(in the ecore_con_url.c:1769) sets fd_max to -1 then ecore_con_url
cannot set up a fd_handler.
I also tested ecore_file_download_example.c and the same is happening.

Someone knows what is the matter ? My curl version is 7.21.7 and my
efl revision is 60739.

Regards, Ceolin.
/*gcc -g -O0 ecore_con_url_test.c `pkg-config --cflags --libs eina ecore ecore-con`
  -o ecore_con_url_test   */

#include <Ecore.h>
#include <Ecore_Con.h>
#include <Eina.h>
#include <stdio.h>

static Ecore_Con_Url *url_con = NULL;

static Eina_Bool url_data_cb(void *data, int type, void *event);
static Eina_Bool url_complete_cb(void *data, int type, void *event);

static Eina_Bool
url_con_create(const char *url)
{
   url_con = ecore_con_url_new(url);
   if (!url_con)
     return EINA_FALSE;

   if (!(ecore_event_handler_add(ECORE_CON_EVENT_URL_DATA,
                                 url_data_cb, NULL)) &&
       ecore_event_handler_add(ECORE_CON_EVENT_URL_COMPLETE,
                               url_complete_cb, NULL))
     return EINA_FALSE;

   return EINA_TRUE;
}

static Eina_Bool
url_data_cb(void *data, int type, void *event)
{
   return EINA_TRUE;
}

static Eina_Bool
url_complete_cb(void *data, int type, void *event)
{
   return EINA_TRUE;
}

int main(int argc, char *argv[])
{
   int ret;

   if (argc != 2)
     {
        EINA_LOG_ERR("Use ./ecore_con_url_test http://www.google.com";);
        return 1;
     }

   if (!eina_init())
     {
        EINA_LOG_ERR("could not initialize eina");
        goto error;
     }

   if (!ecore_init())
     {
        EINA_LOG_ERR("could not initalize ecore");
        goto error;
     }

   ret = ecore_con_url_init();
   if (ret != 1)
     {
        EINA_LOG_ERR("could not initialize ecore_con_url");
        goto error;
     }

   if (!url_con_create(argv[1]))
     {
        EINA_LOG_ERR("could not create Ecore_Con_Url");
        goto error;
     }

   if (!ecore_con_url_get(url_con))
     {
        EINA_LOG_ERR("could not execute ecore_con_url_get");
        goto error;
     }

   return ecore_con_url_shutdown();

 error:
   ecore_con_url_free(url_con);
   return 2;
}

------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to