On Tue, 28 Jun 2011 19:47:18 -0300 Flávio Ceolin <flavio.ceo...@profusion.mobi>
said:

> 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.

that's interesting. for fd_max to be -1 curl must literally have sockets
available. curl code pasted here:


CURLMcode curl_multi_fdset(CURLM *multi_handle,
                           fd_set *read_fd_set, fd_set *write_fd_set,
                           fd_set *exc_fd_set, int *max_fd)
{
  /* Scan through all the easy handles to get the file descriptors set.
     Some easy handles may not have connected to the remote host yet,
     and then we must make sure that is done. */
  struct Curl_multi *multi=(struct Curl_multi *)multi_handle;
  struct Curl_one_easy *easy;
  int this_max_fd=-1;
  curl_socket_t sockbunch[MAX_SOCKSPEREASYHANDLE];
  int bitmap;
  int i;
  (void)exc_fd_set; /* not used */

  if(!GOOD_MULTI_HANDLE(multi))
    return CURLM_BAD_HANDLE;

  easy=multi->easy.next;
  while(easy != &multi->easy) {
    bitmap = multi_getsock(easy, sockbunch, MAX_SOCKSPEREASYHANDLE);

    for(i=0; i< MAX_SOCKSPEREASYHANDLE; i++) {
      curl_socket_t s = CURL_SOCKET_BAD;

      if(bitmap & GETSOCK_READSOCK(i)) {
        FD_SET(sockbunch[i], read_fd_set);
        s = sockbunch[i];
      }
      if(bitmap & GETSOCK_WRITESOCK(i)) {
        FD_SET(sockbunch[i], write_fd_set);
        s = sockbunch[i];
      }
      if(s == CURL_SOCKET_BAD)
        /* this socket is unused, break out of loop */
        break;
      else {
        if((int)s > this_max_fd)
          this_max_fd = (int)s;
      }
    }

    easy = easy->next; /* check next handle */
  }

  *max_fd = this_max_fd;

  return CURLM_OK;
}

so... either that or... there's a bug there where it doesnt set up this_max_fd
while walking the sockbunch array.

so curl is basically saying "no errors, but also no sockets to listen on
either"... which smells like a curl bug? (it could be that the first socket is
bad? thus the break condition is hit - but why? that socket is one handled by
curl itself).

so right now we don't know any more than curl is saying "nothing to listen on
here... move along now".

-- 
------------- Codito, ergo sum - "I code, therefore I am" --------------
The Rasterman (Carsten Haitzler)    ras...@rasterman.com


------------------------------------------------------------------------------
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