curl-library
Re: Persistant Connections testing
Date: Wed, 28 Nov 2001 11:06:27 +0100 (MET)
On Wed, 28 Nov 2001, Dimitris Sarris wrote:
> Here it is a slightly changed persistant example (copied from your
> repository)
[provided source code cut out]
> As you can see there are 3 different approaches:
> 1. Your approach (all the code in the main procedure)
The only plain C code too...
> 2. Procedural approach (global curl instance, 4 procedures are doing
> the work)
> 3. Object-oriented approach (Class TestWrapper is doing all the
> work)
>
> It has no problem running with the 1st approach (your example), but with
> the other 2 approaches crashes at the same position with my first
> example. At the first call to "curl_easy_perform". I am running this
> example at a Digital Unix platform (Tru64 4.0D)
>
> Have you compiled and tested my first example? Can you compile and test
> all the 3 variants in order to see if it is a platform problem or a
> "curl" bug or my software bug?
I compiled and build your code on my Solaris 2.7 box. The gethostbyname_r()
and gethostbyaddr_r() functions are used differently on Solaris than on
Tru64, why the *exact* code same can't be excersised.
My Linux 2.4.16 development machine runs IPv6-enabled so I figured that
wouldn't be a fair test as that would use different name resolving code in
libcurl.
My Linux 2.4.12 plain IPv4 development machine died last night, so I can't
try anything on that right now. Linux gethostbyname_r() and gethostbyaddr_r()
is however different from both Tru64 and Solaris so I figure Solaris could be
just as good test platform as I don't have any Tru64 machines to play with.
First, I patched the code (see my attachment). It now uses 'localhost' and a
README file in the root dir, that happened to exist on my test machine. I
took away the user+password to make it work on my FTP, and it wasn't really
relevant to this test.
I built the code using my very latest development libcurl version (as a
developer, I upgrade my system-wide libcurl very seldom so it really isn't a
good version to test anything with). I built it using gcc 3.0.
I skipped testing version 1, as that works for you and it has always worked
for me and works for many others.
This code works for me, with or without OOMODE defined.
Conclusion: version 2 and version 3 are both working fine on Solaris 2.7.
-- Daniel Stenberg -- curl groks URLs -- http://curl.haxx.se/
- TEXT/PLAIN attachment: hey.cc