| Commit message (Collapse) | Author | Age |
| |
|
|
|
| |
Apparently it's necssary to do an explicit comparison with NULL here.
This also gets rid of a compile warning
|
| |
|
|
|
|
|
| |
(Tweaked by nickm: Fix up the arcr4andom_buf OSX hack so that the
fallback case isn't compiled into the code when we have
arc4random_buf() and we are not on OSX. Also add a comment
explaining what's up.)
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
The last evdns change apparently broke it, by using a "base"
variable that we were only declaring with threads turned on.
|
| |
|
|
|
|
|
| |
Otherwise, requests initially sent to a failing nameserver would
stay there indefinitely, even if other nameservers would work.
Fix for sourceforge bug 3518439
|
| | |
|
| | |
|
| |\ |
|
| | |
| |
| |
| |
| |
| | |
the current priority.
Bug found by Ralph Castain.
|
| | |
| |
| |
| |
| |
| |
| |
| | |
This only affects the unit tests.
Fix found at http://rachelbythebay.com/w/2011/07/12/forkcrash/
(Backport from 2.1)
|
| |/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the function do_read() will call SSL_read(), and if successful, will
call _bufferevent_run_readcb() before returning to consider_reading().
consider_reading() will then check SSL_pending() to make sure all
pending data has also been read. If it does not, do_read() is called
again.
The issue with this is the possibility that the function that is
executed by _bufferevent_run_readcb() called
bufferevent_disable(ssl_bev, EV_READ) before the second do_read(); In
this case, the users read callback is executed a second time. This is
potentially bad for applications that expect the bufferevent to stay
disabled until further notice. (this is why running openssl bufferevents
without DEFER_CALLBACKS has always been troublesome).
|
| |
|
|
|
|
|
|
|
|
| |
This approach should make the creation of the file more atomic, to
fix a bug reported by Dinh.
This patch has one change from Zack's original version: it avoids
$<, since Dave Hart tells me he thinks that's not so portable.
(commit message by nickm)
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
it for the future instead
Fixes an issue reported on libevent-users in the thread "a dead
looping bug when changing system time backward". Previously, if time
jumped forward 1 hour[*] and we had a one-second periodic timer event,
that event would get invoked 3600 times. That's almost certainly not
what anybody wants.
In a future version of Libevent, we should expose the amount of time
that the callbac kwould have been invoked somehow.
[*] Forward time jumps can happen with nonmonotonic clocks, or with
clocks that jump on suspend/resume. It can also happen from
Libevent's point of view if the user exits from event_base_loop() and
doesn't call it again for a while.
|
| | | |
|
| |\ \
| |/
|/| |
cancel the probe request when the server is freed, and ignore cancelled probe callbacks
|
| | | |
|
| | |
| |
| |
| | |
probe callbacks
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This is a partial backport of cb9da0bf and a backport of c9635349.
Because C doesn't like us to declare identifiers starting with an
underscore, Libevent 2.1 has renamed every such identifier. The
only change that affects a public API is that the _EVENT_LOG_*
macros have been renamed to start with EVENT_LOG instead. The old
names are still present, but deprecated.
I'm doing this backport because it represents the deprecation of a
Libevent 2.0 interface, and folks should have the opportunity to
write code that isn't deprecated and works with both 2.0 and 2.1.
|
| | | |
|
| | |
| |
| |
| |
| | |
I don't know why people use such ancient gcc versions, but the fix seems
straightforward enough to maybe just do it.
|
| | | |
|
| | |
| |
| |
| |
| |
| | |
MSVC apparently doesn't have a mode_t defined, though mingw does.
Found by Savg He.
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| |\ \
| | |
| | |
| | | |
patches-2.0
|
| | |/
| |
| |
| |
| |
| |
| | |
When clang 2.9 was around we hoped they'd introduce support for the
normalized=id and override-init warnings by 3.0, but they haven't. We
should only add the version detection back in when clang actually
supports those warnings.
|
| |/
|
|
| |
Detected by clang
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When a nameserver is down, we periodically try sending a "probe"
message to that nameserver to see if it has come back up. If a
nameserver comes up, we cancel any pending probe messages.
Cancelling a probe message while handling the probe's response would
result in a access-after-free or a double-free, so when we notice that
we're about to call a nameserver up because of having received a probe
from it, we need to check whether current response is the response
from the probe.
There was a case where we didn't to that, though: when the resolver
gave us an unusual error response to our request that it resolve
google.com. This is pretty rare, but apparently it can happen with
some weird cacheing nameservers -- the one on the mikrotik router, for
example. Without this patch, we would crash with a NULL pointer
derefernce.
Thanks to Hannes Sowa for finding this issue and helping me track it
down.
|
| | |
|
| |
|
|
|
| |
If openssl is not installed system-wide or not compiled as a shared library,
some systems require various link flags (e.g., -ld).
|
| |
|
|
|
|
| |
Windows doesn't have a mode_t as far as I can tell.
Some unixes, iirc, don't like three-argument open without O_CREAT.
|
| |
|
|
|
| |
In a multi-process/threaded environment, opening fds internally
without the close-on-exec flag could leak fds to child processes.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
We were doing this because of (correct) reports that NetBSD gives an
EBADF when you try to add the write side of a pipe for which the
read side has been closed. But on most kqueue platforms, that
doesn't happen, and on *all* kqueue platforms, reporting a
nonexistent fd (which we usually have if we have seen EBADF) as
readable tends to give programs a case of the vapors.
Nicholas Marriott wrote the original patch here; I did the comment
fixes.
|
| |
|
|
|
|
| |
There was a calloc that needed to be an mm_calloc.
Reported by "fffvvvzz" on sourceforge. Ticket 3486114
|