cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Fwd: Often error 23

From: Marco A. Cruz Quevedo <macruzq_at_gmail.com>
Date: Wed, 18 Dec 2013 15:08:54 -0600

On Wed, Dec 18, 2013 at 2:49 PM, Dan Fandrich <dan_at_coneharvesters.com>wrote:

> On Wed, Dec 18, 2013 at 01:17:36PM -0600, Marco A. Cruz Quevedo wrote:
> > Thank you very much for your suggestion. The fact is that, in order to
> > use CURLOPT_WRITEFUNCTION, I cannot find a way to pass a pointer to a
> function
> > ( as documentation indicates) from visual FoxPro, so I have to use the
> internal
>
> Is there really no way to do that kind of operation in the FoxPro language?
> Have you tried just using the name of the procedure as the argument, or the
> name preceded with @?
>
> > default function. And here is the first problem: documentation indicates
> to set
> > the option to NULL: is it chr(0) or "" (null string)?
>
> You'll have to use the documentation of the FoxPro binding for the fine
> points. It's possible (though unlikely) that there is no way to set a
> callback
> function with this binding. If that's the case, then there's probably not
> much you can do. But there must be some way to direct output to something
> other than stdout. At the very least you must be able to open a file handle
>
That is why I want to use the internal default function by setting the
option to NULL: what does NULL mean? chr(0)? int 0? I tried both with same
results.

> to "nul:" and pass that in to with the binding somehow.
>
> > Then, to use CURLOPT_WRITEDATA I have to pass a FILE * to filename (or
> file
> > object? or what?) I think this solves the problem: first, using the
> default
> > function and next, providing a file for output. But, how can this be set?
> > So, I tried:
> > --
> > err_buff = "error"+" buffer"
> > curl_easy_setopt(hcurl, CURLOPT_WRITEFUNCTION,"")
> > curl_easy_setopt(hcurl, CURLOPT_WRITEDATA, err_buff)
> > --
> > Finally this works: the file is transmitted, but nevertheless I get an
> error
> > indicating that an exception occurred.
>

I made

ferrh=fcreate("error.txt)

and I did
curl_easy_setopt(hcurl, CURLOPT_WRITEDATA, @ferrh)

with same results.

I will keep trying some other options.

That's a legitimate response to options that make no sense.
>
> > I only want to set this options to get rid of error 23.
>
> You'll have to either look at the binding's documentation or failing that,
> the source code, and figure out how to set up such a callback function.
>
> >>> Dan
> -------------------------------------------------------------------
> List admin: http://cool.haxx.se/list/listinfo/curl-library
> Etiquette: http://curl.haxx.se/mail/etiquette.html
>

-- 
Freedom is not a permission for chaos

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2013-12-18