cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: curl_multi_socket

From: Alexander Lazic <al-curllibrary_at_none.at>
Date: Wed, 12 Apr 2006 23:54:41 +0200

Hi,

On Mon 10.04.2006 17:05, Daniel Stenberg wrote:
>
>In order to decrease my pain when having to keep up my hiper patch with
>the code in the HEAD of the CVS repository, I've now committed my
>multi_socket work. It would have to be done at some point anyway so I
>thought what the heck, why not sooner than later! ;-)

Super ;-)

>Please let me know if you find any existing functionality to have
>broken in my merge process!

I have build curl with CURL_MULTIEASY from current cvs.

Here the complete ./configure call:

./configure --disable-ldap --disable-dict --disable-telnet \
--disable-tftp --disable-ipv6 --disable-sspi \
--prefix=/home/al/progs/curl --enable-debug CFLAGS=-DCURL_MULTIEASY && \
make && make test

I know this is:

---lib/easy.c:#ifdef CURL_MULTIEASY
/***************************************************************************
 * This function is still only for testing purposes. It makes a great way
 * to run the full test suite on the multi interface instead of the easy one.
 ***************************************************************************

----
But i was curiously ;-)
When i run the testsuite i get some cordumps and errors.
I have looked into one e.g. 230 and i got the following coredump
---
(gdb) bt
#0  0xb7f964b6 in curl_multi_fdset (multi_handle=0x808aff4, read_fd_set=0xbfbb9088, write_fd_set=0xbfbb9008, exc_fd_set=0xbfbb8f88, 
    max_fd=0xbfbb8f84) at multi.c:539
#1  0xb7f92985 in curl_easy_perform (easy=0x8082594) at easy.c:401
#2  0x08050441 in operate (config=0xbfbb9580, argc=9, argv=0xbfbb9794) at main.c:4120
#3  0x08050ca4 in main (argc=9, argv=0xbfbb9794) at main.c:4415
---
then i have added into 'lib/multi.c:curl_multi_fdset()' this:
#ifdef CURLDEBUG
  infof(easy->easy_handle,
        "curl_multi_fdset: i :%d: => sockbunch[i] :%d: s :%d: handle %p: \n",
        i, sockbunch[i], s, (char *)easy);
#endif
before:
if(s == CURL_SOCKET_BAD){...}
And the output was:
---
23:33:29.096292 * curl_multi_fdset: i :0: => sockbunch[i] :4: s :4: handle 0x808bd44: 
23:33:29.096470 * curl_multi_fdset: i :1: => sockbunch[i] :-1207955468: s :-1: handle 0x808bd44:
---
It looks to me that the:
for(i=0; i< MAX_SOCKSPEREASYHANDLE; i++) {...}
have a little problem.
What are you thinking about this?
Regards
Alex
Received on 2006-04-12