cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Peculiar behaviour of bindings

From: Eric Cooper <ecc_at_cmu.edu>
Date: Wed, 3 Aug 2005 10:07:11 -0400

On Wed, Aug 03, 2005 at 10:26:03AM +0100, Alex Gian wrote:
> I am trying to create a set of bindings to libcurl for the excellent
> Oz-Mozart programming language. (CLP + distributed + functional + OO)
> Oz-Mozart has a special interface for calling C routiunes, implemented
> via some macros in a *.h file.
>
> I am using libcurl as a Linux dll (libcurl.so), and have succesfully
> compiled and run a standalone executable (no Oz) so obviously everything
> is in place correctly.
> (I am only testing the "easy" functions so far.)
>
> I have also compild and run a native C module for Oz, but this exhibits
> the folowing weird behaviour:
> If I set the URL to be something on my local home network,
> curl_easy_perform() works just fine, and everything is returned
> correctly. If I try to access a URL outside the local network, it
> returns a code 7 ("Can't connect", according to the libcurl headers).
>
> Does anyone have a clue where I might begin looking into this? As I
> said if I compile it as a standalone executable, same library access
> code, same compiler, same machine, it works fine! Too weird for me...

I don't the Oz system, but I use libcurl bindings from OCaml, so I can
at least sympathize (:-). I suggest using strace to see what's
happening differently between your standalone vesion and your Oz
version.

Limiting the trace with "strace -e trace=network" or "strace -e
trace=file" might be useful, too.

-- 
Eric Cooper             e c c @ c m u . e d u
Received on 2005-08-03