]> granicus.if.org Git - libevent/log
libevent
11 years agoAdded a "make verify" target.
Joakim Soderberg [Mon, 16 Dec 2013 16:44:13 +0000 (16:44 +0000)]
Added a "make verify" target.

This is more than for cosmetic purposes to match how it's done with autoconf.

Due to the fact that we use environment variables to turn off certain backends during the tests, simply running "ctest" or "make test" can result in failed tests.

This is because if you do "EVENT_NOEPOLL=yes && export EVENT_NOEPOLL" and then run the tests, when running the epoll tests, the EPOLL backend will be turned off. There is no way of unsetting an environment variable for a test in CMake, you can only set them. And since libevent simply checks if the environment variable is set (it doesn't check the actual value of it), this won't work.

So to remedy this, we create the "make verify" target that first unsets all the EVENT_NO* environment variables, and then runs ctest.

Also bumped the required CMake version from 2.6 to 2.8, since the set_test_properties(bla PROPERTIES ENVIRONMENT "SOME_VAR") requires 2.8

Added some explicit dependencies for the test programs to libevent, so they don't just fail if you try to run the tests without first doing "make"

11 years agoOnly test the event backends available on the system.
Joakim Soderberg [Mon, 16 Dec 2013 15:37:51 +0000 (16:37 +0100)]
Only test the event backends available on the system.

Fix how the CMake project adds the tests using the different backends. At
first we tried to do it exactly as it's done in test/test.sh.

However, test.sh uses a special program test-init to decide if a given
backend is available or not before running the actual tests. Doing it this way
will not be possible using CMake. Since then we would have to have the
test-init executable compiled at the time we run CMake, to know what tests
we should add. (And since CMake generates the make/project files that
compiles the executables, there's a catch 22).

Instead of deciding what tests to run this way, we simply use the result
of the CMake system introspection (that figures out what backends are
available) to decide what backend tests to add.

11 years agoDon't segfault on no found event backend.
Joakim Soderberg [Mon, 16 Dec 2013 12:45:45 +0000 (13:45 +0100)]
Don't segfault on no found event backend.

11 years agoFix bench_cascade program on Windows.
Joakim Soderberg [Mon, 16 Dec 2013 10:35:31 +0000 (11:35 +0100)]
Fix bench_cascade program on Windows.

11 years agoOnly include WIN32 getopt where it is used.
Joakim Soderberg [Mon, 16 Dec 2013 10:34:14 +0000 (11:34 +0100)]
Only include WIN32 getopt where it is used.

getopt is only used in the benchmark tests, don't include it in the core
lib...

11 years agoAdd copyright and licensing files for CMake modules.
Joakim Soderberg [Mon, 16 Dec 2013 10:27:13 +0000 (11:27 +0100)]
Add copyright and licensing files for CMake modules.

11 years agoUse evutil_closesocket instead.
Joakim Soderberg [Mon, 16 Dec 2013 10:26:29 +0000 (11:26 +0100)]
Use evutil_closesocket instead.

11 years agoAdded some GCC specific options.
Joakim Soderberg [Fri, 13 Dec 2013 16:00:23 +0000 (17:00 +0100)]
Added some GCC specific options.

- Added sample applications.
- Fixed the https-client to work on Windows kind of (No cert validation).

11 years agoLink libm on unix platforms.
Joakim Soderberg [Fri, 13 Dec 2013 12:39:50 +0000 (12:39 +0000)]
Link libm on unix platforms.

11 years agoGenerate a dummy evconfig-private.h so things build properly.
Joakim Soderberg [Fri, 13 Dec 2013 10:34:22 +0000 (11:34 +0100)]
Generate a dummy evconfig-private.h so things build properly.

Windows used to have an empty file for this before.

11 years agoMore work on adding tests to CMake project
Joakim Soderberg [Thu, 12 Dec 2013 17:21:11 +0000 (18:21 +0100)]
More work on adding tests to CMake project

11 years agoAdd all tests and benchmarks to CMake project.
Joakim Soderberg [Thu, 12 Dec 2013 15:33:20 +0000 (16:33 +0100)]
Add all tests and benchmarks to CMake project.

Also fixed some minor issues with what's built.

11 years agoInitial CMake commit.
Joakim Soderberg [Mon, 9 Dec 2013 17:05:32 +0000 (18:05 +0100)]
Initial CMake commit.

11 years agoFix non-C89 variable declaration.
Joakim Soderberg [Mon, 9 Dec 2013 15:58:16 +0000 (16:58 +0100)]
Fix non-C89 variable declaration.

Microsofts C compiler does not support the C99 standard, so variables has
to be declared at the start of a scope.

11 years agoRename flush_outdated_host_addresses to clear_host_addresses
Nick Mathewson [Fri, 6 Dec 2013 15:50:17 +0000 (10:50 -0500)]
Rename flush_outdated_host_addresses to clear_host_addresses

"flush" can imply writing something out to a file or connection before
clearing it; "clear" always means "remove".  It's also potentially
misleading to say "outdated" here, since the function removes _all_
addresses regardless, not just certain outdated ones.

Also, don't free the lock in this function.  Also reindent the function.

11 years agoMerge remote-tracking branch 'origin/pr/86'
Nick Mathewson [Fri, 6 Dec 2013 15:37:53 +0000 (10:37 -0500)]
Merge remote-tracking branch 'origin/pr/86'

11 years agobug fix for issues #293 evdns_base_load_hosts doesn't remove outdated addresses
Kuldeep Gupta [Fri, 6 Dec 2013 11:36:20 +0000 (17:06 +0530)]
bug fix for issues #293 evdns_base_load_hosts doesn't remove outdated addresses

As mentioned at https://sourceforge.net/p/levent/bugs/293/
created a small function "evdns_base_flush_outdated_host_addresses" which removes all the previous host addresses, if user wants to clean up the list of hosts can call and use this function.
Defination of this function is part of another patch.

11 years agobug fix for issues #293 evdns_base_load_hosts doesn't remove outdated adresses
Kuldeep Gupta [Fri, 6 Dec 2013 11:23:16 +0000 (16:53 +0530)]
bug fix for issues #293 evdns_base_load_hosts doesn't remove outdated adresses

As mentioned at https://sourceforge.net/p/levent/bugs/293/
 created a small function "evdns_base_flush_outdated_host_addresses" which removes all the previous requests of hosts , if user wants to clean up the list of hosts can call and use this function.
Requires function declaration to be added in include/event2/dns.h
 Adding it in another patch for the same bug.

11 years agostart writing a changelog for 2.1.4-(beta?)
Nick Mathewson [Thu, 5 Dec 2013 22:25:56 +0000 (17:25 -0500)]
start writing a changelog for 2.1.4-(beta?)

11 years agoMerge remote-tracking branch 'origin/patches-2.0'
Nick Mathewson [Thu, 5 Dec 2013 22:14:54 +0000 (17:14 -0500)]
Merge remote-tracking branch 'origin/patches-2.0'

11 years agoupdate the 2.0 changelog
Nick Mathewson [Thu, 5 Dec 2013 22:14:05 +0000 (17:14 -0500)]
update the 2.0 changelog

11 years agoTry another doxygen tweak
Nick Mathewson [Thu, 21 Nov 2013 16:47:34 +0000 (11:47 -0500)]
Try another doxygen tweak

11 years agoSmall doxygen tweaks
Nick Mathewson [Thu, 21 Nov 2013 16:30:04 +0000 (11:30 -0500)]
Small doxygen tweaks

11 years agoMerge remote-tracking branch 'origin/patches-2.0'
Nick Mathewson [Fri, 1 Nov 2013 18:21:54 +0000 (14:21 -0400)]
Merge remote-tracking branch 'origin/patches-2.0'

11 years agoAvoid redundant invocations of init_extension_functions for IOCP
Nick Mathewson [Fri, 1 Nov 2013 18:20:25 +0000 (14:20 -0400)]
Avoid redundant invocations of init_extension_functions for IOCP

11 years agoMerge branch 'pr_81'
Nick Mathewson [Mon, 14 Oct 2013 15:22:40 +0000 (11:22 -0400)]
Merge branch 'pr_81'

11 years agoregress_http: add tests for evhttp_connection_get_addr()
Azat Khuzhin [Tue, 1 Oct 2013 15:54:09 +0000 (19:54 +0400)]
regress_http: add tests for evhttp_connection_get_addr()

11 years agohttp: implement new evhttp_connection_get_addr() api.
Azat Khuzhin [Tue, 1 Oct 2013 15:12:13 +0000 (19:12 +0400)]
http: implement new evhttp_connection_get_addr() api.

Basically tcp final handshake looks like this:
    (C - client, S - server)
    ACK[C] - FIN/ACK[S] - FIN/ACK[S] - ACK [C]

However there are servers, that didn't close connection like this,
while it is still _considered_ as valid, and using libevent http layer
we can do requests to such servers.

Modified handshake:
    (C - client, S - server)
    ACK[C] - RST/ACK[S] - RST/ACK[S]

And in this case we can't extract IP address from socket, because it is
already closed, and getpeername() will return: "transport endpoint is not connected".
So we need to store address that we are connecting to, after we know it,
and that is what this patch do.

I have reproduced it, however it have some extra packages.
(I will try to fix it)
https://github.com/azat/nfq-examples/blob/master/nfqnl_rst_fin.c

11 years agoTweak indentation
Nick Mathewson [Thu, 10 Oct 2013 20:10:50 +0000 (16:10 -0400)]
Tweak indentation

11 years agoMerge remote-tracking branch 'origin/pr/79'
Nick Mathewson [Thu, 10 Oct 2013 20:09:45 +0000 (16:09 -0400)]
Merge remote-tracking branch 'origin/pr/79'

11 years agoMerge pull request #80 from azat/tests-add-event-debug-logging-all
Nick Mathewson [Wed, 2 Oct 2013 15:45:54 +0000 (08:45 -0700)]
Merge pull request #80 from azat/tests-add-event-debug-logging-all

regress_main: logging all if env EVENT_DEBUG_LOGGING_ALL isset

11 years agoregress_main: logging all if env EVENT_DEBUG_LOGGING_ALL isset
Azat Khuzhin [Tue, 1 Oct 2013 15:54:57 +0000 (19:54 +0400)]
regress_main: logging all if env EVENT_DEBUG_LOGGING_ALL isset

11 years agoadd a http default content type option
Nicolas Martyanoff [Sat, 28 Sep 2013 18:03:28 +0000 (20:03 +0200)]
add a http default content type option

11 years agoMerge remote-tracking branch 'origin/patches-2.0'
Nick Mathewson [Thu, 19 Sep 2013 14:48:27 +0000 (10:48 -0400)]
Merge remote-tracking branch 'origin/patches-2.0'

11 years agoFix another arc4random_buf-related warning
Nick Mathewson [Thu, 19 Sep 2013 14:48:09 +0000 (10:48 -0400)]
Fix another arc4random_buf-related warning

11 years agoMerge remote-tracking branch 'origin/patches-2.0'
Nick Mathewson [Thu, 19 Sep 2013 14:45:58 +0000 (10:45 -0400)]
Merge remote-tracking branch 'origin/patches-2.0'

Conflicts:
evutil_rand.c

11 years agoFix a compiler warning when checking for arc4random_buf linker breakage.
Nick Mathewson [Thu, 19 Sep 2013 14:43:54 +0000 (10:43 -0400)]
Fix a compiler warning when checking for arc4random_buf linker breakage.

Patch by Ralph Castain.

11 years agoMerge remote-tracking branch 'rosslagerwall/tree-build'
Nick Mathewson [Mon, 16 Sep 2013 16:29:48 +0000 (12:29 -0400)]
Merge remote-tracking branch 'rosslagerwall/tree-build'

11 years agorpcgen: Generate regress.gen.[c,h] in build rather than src dir
Ross Lagerwall [Sun, 15 Sep 2013 19:48:15 +0000 (21:48 +0200)]
rpcgen: Generate regress.gen.[c,h] in build rather than src dir

Currently an out-of-tree build will either write to the src dir or reuse
the existing regress.gen.[c,h].  But if building from a read-only git
tree (or if the git dir is cleaned), these files will not exist and the
build fails.  So write the files to the build dir.  If the system does
not have python, the regress.gen.[c,h] will be used from the src dir if
they exist.

11 years agoMerge remote-tracking branch 'origin/patches-2.0'
Nick Mathewson [Mon, 9 Sep 2013 16:06:53 +0000 (12:06 -0400)]
Merge remote-tracking branch 'origin/patches-2.0'

11 years agoAvoid racy bufferevent activation
Nate Rosenblum [Tue, 3 Sep 2013 21:46:47 +0000 (14:46 -0700)]
Avoid racy bufferevent activation

The evhttp_send_reply method invokes evhttp_write_buffer with a
callback that may release the underlying request object and
bufferevent upon completion. This cleanup callback is invoked by the
underlying bufferevent's write callback. Improperly enabling write
events before referencing the bufferevent could lead to use after free
and memory corruption.

11 years agoFix reinit of fds with EV_WRITE but not EV_READ.
maksqwe [Wed, 4 Sep 2013 11:25:11 +0000 (14:25 +0300)]
Fix reinit of fds with EV_WRITE but not EV_READ.

Bugfix on 2.1.1-alpha.

11 years agoCheck CLOCK_MONOTONIC_* at runtime if needed.
Nick Mathewson [Mon, 19 Aug 2013 14:11:21 +0000 (10:11 -0400)]
Check CLOCK_MONOTONIC_* at runtime if needed.

(We need this to avoid compile errors on cygwin.  Fixes github issue
75.)

11 years agoMerge remote-tracking branch 'origin/patches-2.0'
Nick Mathewson [Mon, 19 Aug 2013 14:05:14 +0000 (10:05 -0400)]
Merge remote-tracking branch 'origin/patches-2.0'

Conflicts:
util-internal.h

11 years agoMerge remote-tracking branch 'public/20_memclear' into patches-2.0
Nick Mathewson [Mon, 19 Aug 2013 14:02:55 +0000 (10:02 -0400)]
Merge remote-tracking branch 'public/20_memclear' into patches-2.0

11 years agoReally remove RNG seeds from the stack
Nick Mathewson [Mon, 19 Aug 2013 13:52:29 +0000 (09:52 -0400)]
Really remove RNG seeds from the stack

11 years agoMerge remote-tracking branch 'origin/patches-2.0'
Nick Mathewson [Tue, 13 Aug 2013 15:14:11 +0000 (11:14 -0400)]
Merge remote-tracking branch 'origin/patches-2.0'

11 years agoOops; revert testing code
Nick Mathewson [Tue, 13 Aug 2013 15:12:25 +0000 (11:12 -0400)]
Oops; revert testing code

11 years agoAvoid other RNG initialization FS reads when urandom file is specified
Nick Mathewson [Tue, 13 Aug 2013 14:59:27 +0000 (10:59 -0400)]
Avoid other RNG initialization FS reads when urandom file is specified

11 years agoFinish a sentence
Nick Mathewson [Tue, 13 Aug 2013 14:59:20 +0000 (10:59 -0400)]
Finish a sentence

11 years agosample: drop uri_root from base_url in http-server.
Azat Khuzhin [Tue, 13 Aug 2013 14:19:50 +0000 (18:19 +0400)]
sample: drop uri_root from base_url in http-server.

By default there is "0.0.0.0", and this address will work only from
the same machine, and besides there is no need in uri_root in base_url,
because it will be added automatically by browser.

11 years agoAdd an assertion for another of the complaints from coverity. See 1b065d07df196
Nick Mathewson [Wed, 7 Aug 2013 00:00:53 +0000 (20:00 -0400)]
Add an assertion for another of the complaints from coverity. See 1b065d07df196

11 years agotest_evutil_rtrim: add another missing check.
Nick Mathewson [Tue, 6 Aug 2013 23:42:20 +0000 (19:42 -0400)]
test_evutil_rtrim: add another missing check.

11 years agoFinalize tests: add a missing check
Nick Mathewson [Tue, 6 Aug 2013 23:39:35 +0000 (19:39 -0400)]
Finalize tests: add a missing check

11 years agoDNS tests: add a missing check
Nick Mathewson [Tue, 6 Aug 2013 23:38:48 +0000 (19:38 -0400)]
DNS tests: add a missing check

11 years agoFix some crash-on-fail cases in DNS regression tests
Nick Mathewson [Tue, 6 Aug 2013 23:35:56 +0000 (19:35 -0400)]
Fix some crash-on-fail cases in DNS regression tests

Found by coverity.

11 years agoAdd missing check to test_evbuffer_file_segment_add_cleanup_cb
Nick Mathewson [Tue, 6 Aug 2013 23:33:45 +0000 (19:33 -0400)]
Add missing check to test_evbuffer_file_segment_add_cleanup_cb

11 years agoFix a logic error in test_evbuffer_freeze
Nick Mathewson [Tue, 6 Aug 2013 23:32:21 +0000 (19:32 -0400)]
Fix a logic error in test_evbuffer_freeze

11 years agoFix a (failure-only) null dereference in the unit tests
Nick Mathewson [Tue, 6 Aug 2013 23:31:26 +0000 (19:31 -0400)]
Fix a (failure-only) null dereference in the unit tests

11 years agoUse void casts to suppress some "unchecked return value" warns
Nick Mathewson [Tue, 6 Aug 2013 23:28:53 +0000 (19:28 -0400)]
Use void casts to suppress some "unchecked return value" warns

11 years agosample/le-proxy: Fail more gracefully if opening listener fails
Nick Mathewson [Tue, 6 Aug 2013 23:23:36 +0000 (19:23 -0400)]
sample/le-proxy: Fail more gracefully if opening listener fails

11 years agoFix an unlikely but possible error case for http connections
Nick Mathewson [Tue, 6 Aug 2013 23:17:08 +0000 (19:17 -0400)]
Fix an unlikely but possible error case for http connections

Found by coverity

11 years agoMove event_debug_note_teardown_ before mm_free.
Nick Mathewson [Tue, 6 Aug 2013 23:08:42 +0000 (19:08 -0400)]
Move event_debug_note_teardown_ before mm_free.

This isn't a bug, since only the pointer value of ev was used, but
it's probably best not to tempt fate.  Found by coverity.

11 years agoAdd some assertions to please coverity.
Nick Mathewson [Tue, 6 Aug 2013 23:06:58 +0000 (19:06 -0400)]
Add some assertions to please coverity.

In event_process_active_single_queue, EVLIST_INIT must be set on any
event that uses one of the event-only closures, and so "ev" will be
set in those cases.  But coverity's worried here (CIDs numerous).  So
instead, just add the assertions that should make it happy.

11 years agoFix compilation
Nick Mathewson [Tue, 6 Aug 2013 21:51:21 +0000 (17:51 -0400)]
Fix compilation

11 years agoMerge remote-tracking branch 'origin/patches-2.0'
Nick Mathewson [Tue, 6 Aug 2013 21:29:34 +0000 (17:29 -0400)]
Merge remote-tracking branch 'origin/patches-2.0'

Conflicts:
arc4random.c

11 years agoAdd evutil_secure_rng_set_urandom_device_file
Nick Mathewson [Tue, 6 Aug 2013 21:06:23 +0000 (17:06 -0400)]
Add evutil_secure_rng_set_urandom_device_file

This experimental function is needed for some seccomp2 hackery to
work, and should have no effect for systems that don't use it.

11 years agoRemove an unreachable return statement in minheap-internal.h
Nick Mathewson [Thu, 1 Aug 2013 14:40:08 +0000 (10:40 -0400)]
Remove an unreachable return statement in minheap-internal.h

Found by Brian Utterback; see http://bugs.ntp.org/show_bug.cgi?id=2446

11 years agoAvoid leaking segment mappings when offset is not a page multiple
Nick Mathewson [Thu, 1 Aug 2013 02:23:16 +0000 (22:23 -0400)]
Avoid leaking segment mappings when offset is not a page multiple

Found by Bob / Black Hole on the mailing list.

11 years agoAdd checks for evhttp_connection_get_server() in unit tests.
Maxime Henrion [Wed, 31 Jul 2013 15:02:07 +0000 (15:02 +0000)]
Add checks for evhttp_connection_get_server() in unit tests.

They validate that this function behave as expected; that is, it returns
NULL for outgoing connections, and returns the HTTP server object that
received the connection for incoming ones.

11 years agoAdd evhttp_connection_get_server().
Maxime Henrion [Wed, 24 Jul 2013 20:50:05 +0000 (20:50 +0000)]
Add evhttp_connection_get_server().

11 years agoMerge remote-tracking branch 'ellzey/bev_ratelimit_get_token_cfg'
Nick Mathewson [Tue, 30 Jul 2013 14:44:42 +0000 (10:44 -0400)]
Merge remote-tracking branch 'ellzey/bev_ratelimit_get_token_cfg'

11 years agoAdd Maxime Henrion to README
Nick Mathewson [Mon, 29 Jul 2013 13:10:24 +0000 (09:10 -0400)]
Add Maxime Henrion to README

11 years agoMerge remote-tracking branch 'origin/patches-2.0'
Nick Mathewson [Sun, 21 Jul 2013 11:27:49 +0000 (13:27 +0200)]
Merge remote-tracking branch 'origin/patches-2.0'

11 years agolibevent/win32_dealloc() : fix sizeof(pointer) vs sizeof(*pointer)
Frank Denis [Sat, 20 Jul 2013 21:02:49 +0000 (14:02 -0700)]
libevent/win32_dealloc() : fix sizeof(pointer) vs sizeof(*pointer)

11 years agoPass and return const for bufferevent_get_token_bucket_cfg
Mark Ellzey [Thu, 11 Jul 2013 20:26:43 +0000 (16:26 -0400)]
Pass and return const for bufferevent_get_token_bucket_cfg

11 years agoAdd function to fetch underlying ratelimit cfg
Mark Ellzey [Thu, 11 Jul 2013 16:31:39 +0000 (12:31 -0400)]
Add function to fetch underlying ratelimit cfg

bufferevent_get_token_bucket_cfg() will return the struct ev_token_bucket_cfg
for a bufferevent if available.

11 years agoMerge pull request #69 from makotokato/clang
Nick Mathewson [Thu, 11 Jul 2013 13:57:16 +0000 (06:57 -0700)]
Merge pull request #69 from makotokato/clang

Don't use return since return type is void and build error occurs using ...

11 years agoWe should return after arc4random_buf()
Makoto Kato [Wed, 10 Jul 2013 02:02:43 +0000 (11:02 +0900)]
We should return after arc4random_buf()

11 years agoDon't use return since return type is void and build error occurs using clang
Makoto Kato [Tue, 9 Jul 2013 02:50:33 +0000 (11:50 +0900)]
Don't use return since return type is void and build error occurs using clang

11 years agoAdded event_base_get_num_events()
Mobai Zhang [Tue, 2 Jul 2013 20:01:02 +0000 (16:01 -0400)]
Added event_base_get_num_events()

11 years agoMerge remote-tracking branch 'origin/patches-2.0'
Nick Mathewson [Mon, 10 Jun 2013 19:17:34 +0000 (15:17 -0400)]
Merge remote-tracking branch 'origin/patches-2.0'

11 years agoMerge remote-tracking branch 'public/pr/79' into patches-2.0
Nick Mathewson [Mon, 10 Jun 2013 19:16:13 +0000 (15:16 -0400)]
Merge remote-tracking branch 'public/pr/79' into patches-2.0

11 years agoMerge branch '21_evdns_log_debug'
Nick Mathewson [Mon, 10 Jun 2013 14:47:35 +0000 (10:47 -0400)]
Merge branch '21_evdns_log_debug'

11 years agoMerge remote-tracking branch 'origin/patches-2.0'
Nick Mathewson [Mon, 10 Jun 2013 14:47:28 +0000 (10:47 -0400)]
Merge remote-tracking branch 'origin/patches-2.0'

11 years agoDocument that arc4random is not a great cryptographic PRNG.
Nick Mathewson [Mon, 10 Jun 2013 14:38:12 +0000 (10:38 -0400)]
Document that arc4random is not a great cryptographic PRNG.

11 years agoWhen we seed from /proc/sys/kernel/random/uuid, count it as success
Nick Mathewson [Mon, 10 Jun 2013 14:33:56 +0000 (10:33 -0400)]
When we seed from /proc/sys/kernel/random/uuid, count it as success

Found by Joseph Spadavecchia

11 years agorestore the comment
Greg Hazel [Wed, 29 May 2013 21:19:14 +0000 (14:19 -0700)]
restore the comment

11 years agoFix SEGFAULT after evdns_base_resume if no nameservers installed.
Azat Khuzhin [Fri, 10 May 2013 23:53:11 +0000 (03:53 +0400)]
Fix SEGFAULT after evdns_base_resume if no nameservers installed.

If there is no nameservers installed, using
evdns_base_nameserver_ip_add(), than evdns_base_resume() will SEGFAULT,
because of NULL dereference in evdns_requests_pump_waiting_queue()

Conflicts:
evdns.c

11 years agoActually use the log facility for reporting evdns problems.
Nick Mathewson [Wed, 29 May 2013 20:26:50 +0000 (16:26 -0400)]
Actually use the log facility for reporting evdns problems.

Fixes issue #63.  Also refactors the evdns logging and log backend a
bit, so that it wastes a little less code.

11 years agoMerge remote-tracking branch 'origin/patches-2.0'
Nick Mathewson [Wed, 29 May 2013 17:32:47 +0000 (13:32 -0400)]
Merge remote-tracking branch 'origin/patches-2.0'

11 years agoUse windows vsnprintf fixup logic on all windows environments
Nick Mathewson [Wed, 29 May 2013 17:30:56 +0000 (13:30 -0400)]
Use windows vsnprintf fixup logic on all windows environments

Previously I'd relied on mingw to provide a vsnprintf with a
conformant return value.  But it appears that some mingw
environments don't do that.

11 years agoMerge remote-tracking branch 'origin/pr/62'
Nick Mathewson [Tue, 28 May 2013 15:30:14 +0000 (11:30 -0400)]
Merge remote-tracking branch 'origin/pr/62'

11 years agoRemove a debugging assert that should not have been left in
Nick Mathewson [Tue, 28 May 2013 14:14:51 +0000 (10:14 -0400)]
Remove a debugging assert that should not have been left in

11 years agoFix locking in bufferevent_get_options_().
Maxime Henrion [Thu, 23 May 2013 16:31:53 +0000 (16:31 +0000)]
Fix locking in bufferevent_get_options_().

11 years agoFix a double close() bug in evhttp when the underlying bufferevent uses BEV_OPT_CLOSE...
Maxime Henrion [Thu, 23 May 2013 16:29:17 +0000 (16:29 +0000)]
Fix a double close() bug in evhttp when the underlying bufferevent uses BEV_OPT_CLOSE_ON_FREE.

11 years agoAvoid redundant syscall if making a socket cloexec twice
Nick Mathewson [Mon, 20 May 2013 16:30:40 +0000 (12:30 -0400)]
Avoid redundant syscall if making a socket cloexec twice

I got the idea from Maxime's last patch.

11 years agoAvoid redundant syscall to make a nonblocking socket nonblocking
Maxime Henrion [Mon, 20 May 2013 16:23:53 +0000 (12:23 -0400)]
Avoid redundant syscall to make a nonblocking socket nonblocking

11 years agoIf evsel->del() fails, don't leave the evmap in an inconsistent state.
Maxime Henrion [Thu, 16 May 2013 16:38:39 +0000 (16:38 +0000)]
If evsel->del() fails, don't leave the evmap in an inconsistent state.

 This fixes assertion failures in cases where epoll() fails with EBADF
 -- the root cause for which is as of yet unknown. It seems something
 (OpenSSL?) is closing the file descriptor under our feet.

11 years agoFix dns/leak_resume_send_err test.
Azat Khuzhin [Mon, 13 May 2013 19:50:30 +0000 (19:50 +0000)]
Fix dns/leak_resume_send_err test.

Because we don't cancel request,
and want our callback to recieve DNS_ERR_SHUTDOWN,
we use deferred callback, and there was
- one extra malloc(),
  @see reply_schedule_callback()
- and one missing free
  @see request_finished() (req->handle->pending_cb = 1)
than we don't need to count in testleak_cleanup()

So just decrement allocated_chunks to 2,
like we already take care about it.