From: Henri Menke <henrimenke@gmail.com>
To: Taco Hoekwater <taco@elvenkind.com>,
"ntg-context@ntg.nl >> mailing list for ConTeXt users"
<ntg-context@ntg.nl>
Subject: Re: Files on a server
Date: Thu, 17 May 2018 21:49:00 +1200 [thread overview]
Message-ID: <60b7965e-331b-f437-60ff-65f54cc51e42@gmail.com> (raw)
In-Reply-To: <75D1CF1F-2E75-41FF-8509-0A8F06BDAB86@elvenkind.com>
On 05/17/2018 09:03 PM, Taco Hoekwater wrote:
>
>
>> On 17 May 2018, at 10:31, Taco Hoekwater <taco@elvenkind.com> wrote:
>>
>> Anyway, perhaps someone can answer me this? I tried the ffi/curl code,
>> and the network stuff works, but only when I comment out the write
>> callback:
>>
>> lcurl.curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, ffi.cast("callback",discard));
>>
>> If I dont, I get an error message from ffi that is:
>>
>> unable to convert argument 3 from cdata<unsigned long long (*)(void*, unsigned long long, unsigned long long, void*)> to cdata<vararg>
>> stack traceback:
>> [C]: in function 'curl_easy_setopt'
>> [ctxlua]:42: in function 'check_status'
>> [ctxlua]:1: in main chunk
>>
>> And I have no idea what that actually means or how to fix it?
>
> FYI: fixed by updating luatex.
Hi Taco,
Actually you don't really need to set the WRITEFUNCTION callback of
libcurl. I only set it to the "discard" function which simply return
the number of bytes it got, such that libcurl doesn't print the header
information to stdout. You could also plug a different function in
there if you wanted to process the headers. I will soon post an
annotated version of the code with more proper error-checking on the list.
Cheers, Henri
>
> Best wishes,
> Taco
>
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
>
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage : http://www.pragma-ade.nl / http://context.aanhet.net
> archive : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___________________________________________________________________________________
>
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
prev parent reply other threads:[~2018-05-17 9:49 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-16 9:31 Hans van der Meer
2018-05-16 10:41 ` Henri Menke
2018-05-16 11:23 ` Hans van der Meer
2018-05-16 11:45 ` Henri Menke
2018-05-16 12:23 ` Taco Hoekwater
2018-05-16 12:58 ` Hans van der Meer
2018-05-16 13:41 ` Hans Hagen
2018-05-16 14:05 ` Taco Hoekwater
2018-05-17 7:32 ` Ulrike Fischer
2018-05-17 7:39 ` Taco Hoekwater
2018-05-17 7:52 ` Hans van der Meer
2018-05-17 7:54 ` Taco Hoekwater
2018-05-17 8:30 ` Ulrike Fischer
2018-05-17 8:42 ` Hans Hagen
2018-05-17 8:46 ` luigi scarso
2018-05-17 8:20 ` Ulrike Fischer
2018-05-17 8:31 ` Taco Hoekwater
2018-05-17 9:03 ` Taco Hoekwater
2018-05-17 9:49 ` Henri Menke [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=60b7965e-331b-f437-60ff-65f54cc51e42@gmail.com \
--to=henrimenke@gmail.com \
--cc=ntg-context@ntg.nl \
--cc=taco@elvenkind.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).