3444 Commits

Author SHA1 Message Date
Azat Khuzhin
fea86a64c5 evdns: add regress test for flag EVDNS_BASE_DISABLE_WHEN_INACTIVE without ns 2014-04-10 01:37:12 +04:00
Azat Khuzhin
ad0493eebf evdns: add regress for EVDNS_BASE_DISABLE_WHEN_INACTIVE base flag 2014-04-10 01:11:03 +04:00
Azat Khuzhin
610410b586 evdns: disable probing with EVDNS_BASE_DISABLE_WHEN_INACTIVE
When user install EVDNS_BASE_DISABLE_WHEN_INACTIVE flag for evdns base,
we must remove the timer that is used for probing, if current dns server
failed, otherwise it won't break the loop.
2014-04-09 19:02:39 +04:00
Nick Mathewson
a4154192b8 Merge pull request #125 from azat/tree.h-drop-copy
tree.h: drop duplicated content of tree.h
2014-03-31 11:50:30 -04:00
Azat Khuzhin
61931871a5 tree.h: drop duplicated content of tree.h
Introduced in 9859bc783adcd51729b3d7563902ac8caca67b42
("r15764@tombo:  nickm | 2007-12-31 15:46:16 -0500")
2014-03-28 20:44:09 +04:00
Azat Khuzhin
3fbf3cc908 test/http: add regress test for set family to AF_INET6 2014-03-27 00:50:04 +04:00
Azat Khuzhin
42aefeb0af test: add regress for evhttp_connection_set_family() with AF_INET and AF_UNSPEC 2014-03-27 00:50:04 +04:00
Azat Khuzhin
177b8a7ce8 test: add family argument for http_connection_test_() 2014-03-27 00:49:58 +04:00
Nick Mathewson
b163fdaad1 Merge remote-tracking branch 'origin/patches-2.0' 2014-03-26 11:10:16 -04:00
Nick Mathewson
e8fe749dba Fix a crash in evdns related to shutting down evdns
(Improved version to deal correctly with probe requests)

Patch from YASUOKA Masahiko; fix for libevent github issue #113.
2014-03-26 11:09:34 -04:00
Nick Mathewson
6066f985cc Merge pull request #121 from azat/dns-regress-leaks
regress_dns: fix leaks in getaddrinfo_async{,_cancel_stress} tests
2014-03-26 11:02:52 -04:00
Nick Mathewson
8163b1a13b Merge pull request #122 from trondn/missing-file
Add missing headerfile for cmake
2014-03-26 10:51:17 -04:00
Trond Norbye
15d90cce39 Add missing headerfile for cmake 2014-03-24 15:01:59 +01:00
Azat Khuzhin
2fdc5f299f regress_dns: fix leaks in getaddrinfo_async{,_cancel_stress} tests 2014-03-23 15:12:29 +04:00
Nick Mathewson
86665a582d Merge remote-tracking branch 'origin/patches-2.0' 2014-03-21 14:09:54 -04:00
Nick Mathewson
9f39c88756 Fix a crash in evdns related to shutting down evdns
Patch from YASUOKA Masahiko; fix for libevent github issue #113.
2014-03-21 14:08:17 -04:00
Nick Mathewson
de268feb67 Increment version to 2.1.4-alpha-dev 2014-03-21 13:20:34 -04:00
Nick Mathewson
50093afc3b Update release date in changelog 2014-03-21 12:33:13 -04:00
Nick Mathewson
f5c0d6c378 Merge pull request #116 from trondn/cmake-build-fixes
Cmake build fixes
release-2.1.4-alpha
2014-03-21 11:45:31 -04:00
Vilmos Nebehaj
d0dc861b88 Don't truncate hosts file path on Windows.
Since evutil_snprintf() (actually evutil_vsnprintf() called by it) will
make sure the buffer is null-terminated by placing a null byte at
len_out - 1, we need to pass the full length of the buffer; otherwise
the path will end in "\\host" instead of "\\hosts".
2014-03-21 14:38:11 +01:00
Vilmos Nebehaj
a0b247cdc0 Load hosts file on Windows.
Hosts files are not loaded in evdns_base_config_windows_nameservers() if
load_nameservers_with_getnetworkparams() succeeds on Windows. Parse and
load it first before setting up nameservers.
2014-03-21 14:36:15 +01:00
Azat Khuzhin
12c29b0f6e Add evhttp_connection_set_family() to set addrinfo->family for DNS requests
This is useful if you want to avoid extra dns requests.
2014-03-21 17:32:09 +04:00
Trond Norbye
73474042fe Fixup make install for cmake projects
Install all of the public headers and put the dll's in the
same directory as the binaries.
2014-03-21 14:27:21 +01:00
Trond Norbye
dc82c8d372 Renamed sin to saddr due to name conflict
During building on MSVC 2013 I got a compiler error by a
type conflict for sin:

test-fdleak.c(60) : error C2365: 'sin' : redefinition; previous definition was 'function'
test-fdleak.c(134) : error C2070: 'double (__cdecl *)()': illegal sizeof operand
test-fdleak.c(134) : error C2198: 'evconnlistener_new_bind' : too few arguments for call
test-fdleak.c(148) : error C2070: 'double (__cdecl *)()': illegal sizeof operand
test-fdleak.c(148) : error C2168: 'memcpy' : too few actual parameters for intrinsic function
test-fdleak.c(149) : error C2224: left of '.sin_family' must have struct/union type
test-fdleak.c(212) : error C2070: 'double (__cdecl *)()': illegal sizeof operand
test-fdleak.c(212) : error C2198: 'bufferevent_socket_connect' : too few arguments for call
test-fdleak.c(239) : error C2070: 'double (__cdecl *)()': illegal sizeof operand
test-fdleak.c(239) : error C2168: 'memset' : too few actual parameters for intrinsic function
test-fdleak.c(240) : error C2224: left of '.sin_family' must have struct/union type
test-fdleak.c(241) : error C2224: left of '.sin_addr' must have struct/union type
test-fdleak.c(242) : error C2224: left of '.sin_port' must have struct/union type

The simplest solution to this problem would be to rename
the variable.
2014-03-21 14:26:10 +01:00
Nick Mathewson
6a1c4d501b Correctly skip ipv6 http test on systems without ipv6 2014-03-18 18:36:32 -04:00
Nick Mathewson
e5302ac716 Remove integer-overflow unit tests
There's not much point checking undefined behavior.
2014-03-18 12:35:39 -04:00
Nick Mathewson
31c491504e evtag: detect tags over 32-bits earlier 2014-03-18 12:27:14 -04:00
Nick Mathewson
e660db6d5f Catch over-large port numbers early in http
Otherwise integer overflow potentially turns the port number into garbage.
2014-03-18 11:39:23 -04:00
Nick Mathewson
58fc9b6c0a Fix ubsan warnings when parsing ipv4/ipv6 addrs
left-shifting a one-byte integer by 24 invokes undefined behavior.
Let's not do that.
2014-03-18 11:35:50 -04:00
Nick Mathewson
ec99dd82e4 Fix a use-after-free error on EV_CLOSURE_EVENT_FINALIZE callbacks
After running the callback, we were checking evcb->evcb_closure to
decide whether to call mm_free(ev).  But the callback itself might
have freed ev, so we need to grab that field first

Found with AddressSanitizer
2014-03-18 11:27:08 -04:00
Nick Mathewson
860c71c892 Fix an illegal read error in the evbuffer_add_reference tests
Found with AddressSanitizer
2014-03-18 11:13:45 -04:00
Nick Mathewson
3b1b330dfd Add new APIs to whatsnew-2.1 2014-03-16 21:44:57 -04:00
Nick Mathewson
d08273eca8 Increment version to 2.1.4-alpha 2014-03-16 12:09:24 -04:00
Nick Mathewson
e6c6f12050 Bring changelog up to date for 2.1.4-alpha 2014-03-16 12:01:44 -04:00
Nick Mathewson
2578ec14f5 Avoid double-close paths in http tests
Coverity spotted that there were some paths through the test
functions that would double-close some sockets.
2014-03-13 10:46:59 -04:00
Nick Mathewson
b6f15ccea6 Add missing include to regress_finalize.h 2014-03-12 18:19:07 -04:00
Nick Mathewson
21477e408f Skip http/ipv6_for_domain test when we have no ipv6 support 2014-03-12 18:13:19 -04:00
Nick Mathewson
5e161c66c5 Add an include to evrpc-internal to fix openbsd compilation warning 2014-03-12 18:12:43 -04:00
Nick Mathewson
4947c1852f Heap-allocate zlib data structure in regress_zlib tests 2014-03-12 14:29:15 -04:00
Nick Mathewson
57abb35947 Fix consts in WIN32-Code/getopt*.[ch] 2014-03-12 14:06:41 -04:00
Nick Mathewson
58408eedd8 Fix duplicate paragraph in evbuffer_ptr documentation 2014-03-12 14:06:02 -04:00
Nick Mathewson
af9b2a7ae0 Initialize async bufferevent timeout CBs unconditionally
This is a fix for bug #93 on nmathewson/Libevent.
2014-03-12 13:25:02 -04:00
Nick Mathewson
462e6b609b add a cast to https-client.c 2014-03-12 12:45:41 -04:00
Joakim Söderberg
2b41bcf8ea Export event_extra not event_extras. 2014-03-07 18:09:56 +01:00
Nick Mathewson
7a80476768 Update to the latest version of tinytest
This brings us up to tinytest 709a36ba63ff16d8
2014-03-06 18:09:00 -05:00
Nick Mathewson
239d8345be Fix 'make distcheck' by adding regress.gen.[ch] to DISTCLEANFILES
Patch from Harlan Stenn.
2014-03-06 10:18:09 -05:00
Nick Mathewson
980597215d Move assert(ev) to before we use ev in EV_CLOSURE_EVENT_FINALIZE case
Based on a patch from Harlan Stenn.
2014-03-06 10:09:03 -05:00
Nick Mathewson
8896a92b07 Merge remote-tracking branch 'origin/pr/110' 2014-03-03 13:47:21 -05:00
Nick Mathewson
cbfa8da179 Merge remote-tracking branch 'origin/patches-2.0' 2014-03-03 11:23:55 -05:00
Trond Norbye
b56611d705 Add -Qunused-arguments for clang on macos
The clang compiler provided with macosx emits warnings like:

  CC       bufferevent.lo
clang: warning: argument unused during compilation: '-I .'
clang: warning: argument unused during compilation: '-I ./compat'
clang: warning: argument unused during compilation: '-I ./include'
clang: warning: argument unused during compilation: '-I ./include'

for each file being compiled. This generates a lot of noise during
compilation making it hard to see "real" errors. This patch mute
those warnings.
2014-03-03 11:05:41 -05:00