[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [Libevent-users] libevent + curl



2012/10/23 Mark Ellzey <mthomas@xxxxxxxxxx>:
> On Mon, Oct 22, 2012 at 11:08:23PM +0000, John Dunn wrote:
>> I'm trying to modify the hiperfifo.c example included in libcurl (http://curl.haxx.se/libcurl/c/hiperfifo.html ) to use libevent 2.0.20 and had a few questions. I know the originator of this code is the libcurl people but I figured this would be a better place to ask since the questions are more about libevent version differences. This has likely been asked before but I couldn't find a way to search the mailing list.
>>
>> Line 74:  The GlobalInfo struct contains 2 event structures. Since the event now(?) appears to be an opaque struct I converted these to event* instead.
>>
>> Line 114 : Curl will pass -1 into the timer callback if there is no timeout. Passing a negative timeout into evtimer_add causes me to get "a Assertion is_same_common_timeout". Blocking the add when timeout is -1 appears to fix the issue.
>>

The -1 means to disable the timer. What you do is block the call doing
so. This is not the intended behaviour. Better is using the new event
code to disable an event timer.

Stef Bon
***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users    in the body.