3091 Commits

Author SHA1 Message Date
Nick Mathewson
82b6956c1b Finalize tests: add a missing check 2013-08-06 19:39:35 -04:00
Nick Mathewson
f314900dfd DNS tests: add a missing check 2013-08-06 19:38:48 -04:00
Nick Mathewson
87cd6f0186 Fix some crash-on-fail cases in DNS regression tests
Found by coverity.
2013-08-06 19:35:56 -04:00
Nick Mathewson
eba4506abf Add missing check to test_evbuffer_file_segment_add_cleanup_cb 2013-08-06 19:33:45 -04:00
Nick Mathewson
776588468b Fix a logic error in test_evbuffer_freeze 2013-08-06 19:32:21 -04:00
Nick Mathewson
1104d0bee9 Fix a (failure-only) null dereference in the unit tests 2013-08-06 19:31:26 -04:00
Nick Mathewson
7080d55c49 Use void casts to suppress some "unchecked return value" warns 2013-08-06 19:28:53 -04:00
Nick Mathewson
44b2491bcd sample/le-proxy: Fail more gracefully if opening listener fails 2013-08-06 19:23:36 -04:00
Nick Mathewson
f22049e359 Fix an unlikely but possible error case for http connections
Found by coverity
2013-08-06 19:17:08 -04:00
Nick Mathewson
69b5c64704 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.
2013-08-06 19:10:13 -04:00
Nick Mathewson
1b065d07df 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.
2013-08-06 19:10:13 -04:00
Nick Mathewson
197abd8bf3 Fix compilation 2013-08-06 17:51:21 -04:00
Nick Mathewson
f391b0030c Merge remote-tracking branch 'origin/patches-2.0'
Conflicts:
	arc4random.c
2013-08-06 17:29:34 -04:00
Nick Mathewson
2bbb5d7612 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.
2013-08-06 17:06:23 -04:00
Nick Mathewson
e639a9e10f Remove an unreachable return statement in minheap-internal.h
Found by Brian Utterback; see http://bugs.ntp.org/show_bug.cgi?id=2446
2013-08-01 10:47:48 -04:00
Nick Mathewson
d4095146af Avoid leaking segment mappings when offset is not a page multiple
Found by Bob / Black Hole on the mailing list.
2013-07-31 22:25:28 -04:00
Maxime Henrion
fbc323b76b 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.
2013-07-31 21:55:19 -04:00
Maxime Henrion
a7f82a314f Add evhttp_connection_get_server(). 2013-07-31 21:55:13 -04:00
Nick Mathewson
600c58656a Merge remote-tracking branch 'ellzey/bev_ratelimit_get_token_cfg' 2013-07-30 10:44:42 -04:00
Nick Mathewson
25c350b29e Add Maxime Henrion to README 2013-07-29 09:10:24 -04:00
Nick Mathewson
01a6ef78b9 Merge remote-tracking branch 'origin/patches-2.0' 2013-07-21 13:27:49 +02:00
Frank Denis
b8f59807ce libevent/win32_dealloc() : fix sizeof(pointer) vs sizeof(*pointer) 2013-07-21 13:01:56 +02:00
Mark Ellzey
1c77fbb0dc Pass and return const for bufferevent_get_token_bucket_cfg 2013-07-11 16:26:43 -04:00
Mark Ellzey
4b3d5af8e2 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.
2013-07-11 12:31:39 -04:00
Nick Mathewson
c3260cb974 Merge pull request #69 from makotokato/clang
Don't use return since return type is void and build error occurs using ...
2013-07-11 06:57:16 -07:00
Makoto Kato
1ea1f26b41 We should return after arc4random_buf() 2013-07-10 11:05:02 +09:00
Makoto Kato
838161dc01 Don't use return since return type is void and build error occurs using clang 2013-07-09 11:50:33 +09:00
Mobai Zhang
0fa107d8cb Added event_base_get_num_events() 2013-07-02 16:01:02 -04:00
Nick Mathewson
90a8c539aa Merge remote-tracking branch 'origin/patches-2.0' 2013-06-10 15:17:34 -04:00
Nick Mathewson
387e6b90c3 Merge remote-tracking branch 'public/pr/79' into patches-2.0 2013-06-10 15:16:13 -04:00
Nick Mathewson
36ab0721be Merge branch '21_evdns_log_debug' 2013-06-10 10:47:35 -04:00
Nick Mathewson
0b05aa6591 Merge remote-tracking branch 'origin/patches-2.0' 2013-06-10 10:47:28 -04:00
Nick Mathewson
6e49696147 Document that arc4random is not a great cryptographic PRNG. 2013-06-10 10:38:38 -04:00
Nick Mathewson
e35b540832 When we seed from /proc/sys/kernel/random/uuid, count it as success
Found by Joseph Spadavecchia
2013-06-10 10:33:56 -04:00
Greg Hazel
363388a043 restore the comment 2013-05-29 14:19:14 -07:00
Azat Khuzhin
f8d7df8591 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
2013-05-29 14:05:17 -07:00
Nick Mathewson
e1766a1b6d 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.
2013-05-29 16:26:50 -04:00
Nick Mathewson
c307a250d4 Merge remote-tracking branch 'origin/patches-2.0' 2013-05-29 13:32:47 -04:00
Nick Mathewson
e826f19e05 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.
2013-05-29 13:31:53 -04:00
Nick Mathewson
0ac2ed655a Merge remote-tracking branch 'origin/pr/62' 2013-05-28 11:30:14 -04:00
Nick Mathewson
3dc2d8ab83 Remove a debugging assert that should not have been left in 2013-05-28 10:14:51 -04:00
Maxime Henrion
dbc9cd4dd1 Fix locking in bufferevent_get_options_(). 2013-05-24 11:04:17 -04:00
Maxime Henrion
31db8a02bd Fix a double close() bug in evhttp when the underlying bufferevent uses BEV_OPT_CLOSE_ON_FREE. 2013-05-24 11:04:11 -04:00
Nick Mathewson
1f29b18f51 Avoid redundant syscall if making a socket cloexec twice
I got the idea from Maxime's last patch.
2013-05-20 12:30:40 -04:00
Maxime Henrion
42c03da9b9 Avoid redundant syscall to make a nonblocking socket nonblocking 2013-05-20 12:23:53 -04:00
Maxime Henrion
9b5a527f5b 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.
2013-05-17 09:55:20 -04:00
Azat Khuzhin
7e876df71b 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.
2013-05-13 19:56:00 +00:00
Azat Khuzhin
1cd9ff591d Add tests for evdns_base_resume().
- leak_resume
- leak_cancel_and_resume
- leak_resume_send_err
- leak_cancel_and_resume_send_err
2013-05-13 19:56:00 +00:00
Azat Khuzhin
14971a833c 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()
2013-05-13 19:56:00 +00:00
Nick Mathewson
8ab612e396 Whoops. It is gdi.lib, not gdi32.lib. (github issue #61) 2013-05-11 22:21:30 -04:00