2258 Commits

Author SHA1 Message Date
Ross Lagerwall
0eb01099da Use python2 rather than python
python may refer to either python2 or python3 so rather by explicit by
using python2.
See PEP 394 - http://www.python.org/dev/peps/pep-0394/ for more
details.
2012-10-23 13:30:58 +01:00
George Danchev
f2bff75ed8 FIx another memleak on OOM in evdns 2012-09-12 20:12:03 -04:00
George Danchev
73e85dd08f Avoid a memory-leak on OOM in evdns. 2012-09-12 20:11:12 -04:00
Nick Mathewson
484e93c1d0 Increment version to 2.0.20-stable-dev 2012-08-24 11:40:46 -04:00
Nick Mathewson
41d77a7c1e Add a date to the changelog release-2.0.20-stable 2012-08-23 14:39:30 -04:00
Nick Mathewson
46604b341c Increment version to 2.0.20-stable 2012-08-23 14:38:54 -04:00
Nick Mathewson
fc43cbdcda Initial changelog and credits for 2.0.20 2012-08-23 14:33:52 -04:00
Nick Mathewson
606ac43b91 Correctly invoke callbacks when a SSL bufferevent reads some and then blocks.
Based on a patch by Andrew Hochhaus, who correctly diagnosed this bug.
2012-08-22 12:30:42 -04:00
Nick Mathewson
ca80ea61b5 Add explicit AC_PROG_SED to configure.in so all autoconfs will expose $(SED) 2012-08-02 11:56:17 -04:00
Nick Mathewson
c0720c1b0f Fix an unused variable warning on *BSD. 2012-08-02 11:38:32 -04:00
Greg Hazel
dc3207767d Avoid segfault on weird timeout during name lookup.
If an evdns_getaddrinfo timeout happens while pending_cb is set, and
a callback is about to run, but we get a call to
evdns_getaddrinfo_gotresolve before it finishes.

Github issue #60. Thanks to Greg Hazel for patch and patience.
2012-07-30 17:01:52 -04:00
Nick Mathewson
a0912e3206 Check more setsockopt return values when binding sockets. Found by coverity 2012-07-26 10:39:05 -04:00
Nick Mathewson
a1a0e67531 memset sockaddr_in before using it. Found by coverity. 2012-07-26 10:38:29 -04:00
Nick Mathewson
a2006c0087 Move assignment outside tt_assert in ssl unit tests. Appeases coverity. 2012-07-26 10:37:47 -04:00
Nick Mathewson
b9e7329751 Add checks to various return values in unit tests. Found by coverity 2012-07-26 10:37:13 -04:00
Nick Mathewson
6a4ec5c2b5 Avoid possible needless call to writev. Found by coverity. 2012-07-26 10:34:06 -04:00
Nick Mathewson
6355b2a4ca Remove unused variable; spotted by coverity 2012-07-26 10:16:47 -04:00
Nick Mathewson
3cde5bf57a Avoid more crashes/bad calls in unit tests; found by coverity 2012-07-26 10:04:43 -04:00
Nick Mathewson
f021c3d762 Add some missing null checks to unit tests; found by coverity 2012-07-26 09:59:47 -04:00
Nick Mathewson
270f279fb5 Fix resource leaks in the unit tests; found by coverity 2012-07-26 09:53:20 -04:00
Nick Mathewson
4f3732d75e Fix various check-after-dereference issues in unit tests: found by coverity 2012-07-26 09:35:43 -04:00
Nick Mathewson
f1ce15d936 Set umask before calling mkstemp in unit tests. Found by coverity 2012-07-25 16:18:33 -04:00
Nick Mathewson
2259777cc8 Fix possible uninitialized read in dns regression tests. Found by coverity. 2012-07-25 16:05:36 -04:00
Nick Mathewson
555334670a Remove deadcode in http regression tests. Found by coverity. 2012-07-25 15:59:50 -04:00
Nick Mathewson
11c8b31754 Fix a memory leak on error in evhttp_uriencode
If we ran out of memory in evhttp_uriencode when allocating the
output buffer, we would neglect to call evbuffer_free() on our
temporary buffer.  Now we always free the temporary buffer.

Fixes sourceforge issue 3539887. Thanks to Andrew Cox for reporting
this one.
2012-07-17 11:08:25 -04:00
Nick Mathewson
160e58b67d Win32: avoid crash when waiting forever on zero fds. 2012-07-16 15:34:18 -04:00
Simon Liu
be7a95c629 Make event_pending() threadsafe.
(Commit message by Nick)
2012-06-14 13:38:33 -04:00
Nick Mathewson
117e3273dc Add GCC annotations so that the vsprintf functions get checked properly 2012-06-14 13:25:10 -04:00
Nick Mathewson
60f6540341 Merge pull request #57 from rosslagerwall/memleak
Fix a couple of memory leaks (found with Valgrind).
2012-06-06 14:10:11 -07:00
Ross Lagerwall
3b2529acf2 Fix a couple of memory leaks (found with Valgrind). 2012-06-06 21:57:12 +02:00
Sebastian Hahn
fcec3e80c4 Correctly check for arc4random_buf
Apparently it's necssary to do an explicit comparison with NULL here.
This also gets rid of a compile warning
2012-06-01 05:23:29 +02:00
Greg Hazel
bff5f94073 check for arc4random_buf at runtime, on OS X
(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.)
2012-05-31 00:48:24 -04:00
Nick Mathewson
faa92253e9 Bump version to 2.0.19-stable-dev 2012-05-03 16:34:29 -04:00
Nick Mathewson
8a9b0cdf63 Increment version to 2.0.19-stable release-2.0.19-stable 2012-05-03 12:33:36 -04:00
Nick Mathewson
e06206ebd8 Oops; fix the *right* windows compile issue 2012-05-03 12:15:11 -04:00
Nick Mathewson
be7a0be816 Fix win32 build issues: sleep, pid_t 2012-05-03 12:05:52 -04:00
Nick Mathewson
cecb111bcd Start changelog for 2.0.19-stable 2012-05-02 17:09:11 -04:00
Nick Mathewson
265e6779dd Fix evdns build with threads disabled
The last evdns change apparently broke it, by using a "base"
variable that we were only declaring with threads turned on.
2012-05-02 16:52:27 -04:00
Nick Mathewson
3d9e52ac56 When retransmitting a timed-out DNS request, pick a fresh nameserver.
Otherwise, requests initially sent to a failing nameserver would
stay there indefinitely, even if other nameservers would work.

Fix for sourceforge bug 3518439
2012-05-01 19:52:55 -04:00
Nick Mathewson
d873d6787c Make some evdns.c debug logs more verbose 2012-05-01 19:52:49 -04:00
Nick Mathewson
6610fa5a27 dns-example.c can now take a resolv.conf file on the commandline 2012-05-01 17:07:50 -04:00
Nick Mathewson
30f0671526 Merge remote-tracking branch 'github/20_active_prio_inv' into patches-2.0 2012-04-30 21:45:43 -04:00
Nick Mathewson
b3887cdf3b Work-around a stupid gcov-breaking bug in OSX 10.6
This only affects the unit tests.

Fix found at http://rachelbythebay.com/w/2011/07/12/forkcrash/

(Backport from 2.1)
2012-04-30 21:17:26 -04:00
Mark Ellzey
4e62cd167b Fixed potential double-readcb execution with openssl bufferevents.
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).
2012-04-30 21:02:01 -04:00
Nick Mathewson
2bfda4012c If a higher-priority event becomes active, don't continue running events of the current priority.
Bug found by Ralph Castain.
2012-04-30 17:30:48 -04:00
Zack Weinberg
30b6f889f7 Generate event-config.h with a single sed script
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)
2012-04-27 09:32:51 -04:00
Nick Mathewson
03614a16cb Merge branch '20_periodic_event_overload_v2' into patches-2.0 2012-04-20 11:51:13 -04:00
Nick Mathewson
dfd808cbad If time has jumped so we'd reschedule a periodic event in the past, schedule 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.
2012-04-19 18:25:59 -04:00
Nick Mathewson
bec22b4176 Refactor event_persist_closure: raise and extract some common logic 2012-04-19 18:15:12 -04:00
Nick Mathewson
37c4fc8d0c Merge pull request #52 from ghazel/20_evdns_probe
cancel the probe request when the server is freed, and ignore cancelled probe callbacks
2012-04-19 08:11:05 -07:00