]> granicus.if.org Git - libevent/log
libevent
13 years agoMerge remote-tracking branch 'origin/patches-2.0'
Nick Mathewson [Tue, 25 Oct 2011 15:43:01 +0000 (11:43 -0400)]
Merge remote-tracking branch 'origin/patches-2.0'

13 years agoNew event_base_update_cache_time() to set cached_tv to current time
Abel Mathew [Fri, 21 Oct 2011 19:53:32 +0000 (19:53 +0000)]
New event_base_update_cache_time() to set cached_tv to current time

This function is particularly useful for selectively increasing
the accuracy of the cached time value in 'base' during callbacks
that take a long time to execute.

This function has no effect if the base is currently not in its
event loop or if timeval caching is disabled via EVENT_BASE_FLAG_NO_CACHE_TIME.

13 years agoAdd argument checks to some memory functions in `event.c'.
Mansour Moufid [Fri, 14 Oct 2011 21:16:03 +0000 (17:16 -0400)]
Add argument checks to some memory functions in `event.c'.

Add a zero check to the function `event_mm_malloc_',
i.e. simply return NULL if the sz argument is zero.
On failure, set errno to ENOMEM and return NULL.

Add a zero check to the function `event_mm_calloc_',
i.e. simply return NULL if either argument is zero.
Also add an unsigned integer multiplication check, and if an integer
overflow would occur, set errno to ENOMEM and return NULL.
On failure, set errno to ENOMEM and return NULL.

Add a NULL check to the function `event_mm_strdup_',
i.e. set errno to EINVAL and return NULL.
Also add an unsigned integer addition check, and if an integer
overflow would occur, set errno to ENOMEM and return NULL.
If a memory allocation error occurs, again set errno to ENOMEM
and return NULL.

Add unit tests to `test/regress_util.c'.

13 years agoAdd note about evhttp_send_reply_end to its doxygen
Nick Mathewson [Thu, 20 Oct 2011 02:59:47 +0000 (22:59 -0400)]
Add note about evhttp_send_reply_end to its doxygen

13 years agoMerge remote-tracking branch 'origin/patches-2.0'
Nick Mathewson [Thu, 20 Oct 2011 02:44:33 +0000 (22:44 -0400)]
Merge remote-tracking branch 'origin/patches-2.0'

13 years agoMore detailed message in case of libevent self-debugging failure.
Leonid Evdokimov [Wed, 19 Oct 2011 13:44:17 +0000 (17:44 +0400)]
More detailed message in case of libevent self-debugging failure.

13 years agoStyle and comment tweaks for dns/leak* tests
Nick Mathewson [Thu, 20 Oct 2011 02:41:11 +0000 (22:41 -0400)]
Style and comment tweaks for dns/leak* tests

13 years agoTest for commit aff6ba1
Leonid Evdokimov [Tue, 18 Oct 2011 13:49:40 +0000 (17:49 +0400)]
Test for commit aff6ba1

13 years agoMerge remote-tracking branch 'origin/patches-2.0'
Nick Mathewson [Thu, 20 Oct 2011 02:20:15 +0000 (22:20 -0400)]
Merge remote-tracking branch 'origin/patches-2.0'

13 years agoEmpty DNS reply with OK status is another way to say NODATA.
Leonid Evdokimov [Wed, 19 Oct 2011 18:38:37 +0000 (22:38 +0400)]
Empty DNS reply with OK status is another way to say NODATA.

Sometimes DNS reply has nothing but query section. It does not look like
error, so it should be treated as NODATA with TTL=0 as soon as there is
no SOA record to deduce negative TTL from.

13 years agoTests for 94fba5b and f72e8f6
Leonid Evdokimov [Wed, 19 Oct 2011 18:36:12 +0000 (22:36 +0400)]
Tests for 94fba5b and f72e8f6

13 years agoMerge remote-tracking branch 'origin/patches-2.0'
Nick Mathewson [Wed, 12 Oct 2011 05:02:13 +0000 (01:02 -0400)]
Merge remote-tracking branch 'origin/patches-2.0'

13 years agoBump version to 2.0.15-stable-dev
Nick Mathewson [Wed, 12 Oct 2011 05:00:23 +0000 (01:00 -0400)]
Bump version to 2.0.15-stable-dev

13 years agoMerge remote-tracking branch 'origin/patches-2.0'
Nick Mathewson [Wed, 12 Oct 2011 04:57:55 +0000 (00:57 -0400)]
Merge remote-tracking branch 'origin/patches-2.0'

13 years agoCredit a patch from a one-named user release-2.0.15-stable
Nick Mathewson [Wed, 12 Oct 2011 04:39:22 +0000 (00:39 -0400)]
Credit a patch from a one-named user

13 years agoMerge remote-tracking branch 'origin/patches-2.0'
Nick Mathewson [Wed, 12 Oct 2011 04:22:54 +0000 (00:22 -0400)]
Merge remote-tracking branch 'origin/patches-2.0'

13 years agoIncrement version to 2.0.15-stable
Nick Mathewson [Wed, 12 Oct 2011 04:22:17 +0000 (00:22 -0400)]
Increment version to 2.0.15-stable

13 years agoMerge remote-tracking branch 'origin/patches-2.0'
Nick Mathewson [Wed, 12 Oct 2011 04:21:29 +0000 (00:21 -0400)]
Merge remote-tracking branch 'origin/patches-2.0'

13 years agoAdd changelog for 2.0.15-stable
Nick Mathewson [Wed, 12 Oct 2011 04:16:12 +0000 (00:16 -0400)]
Add changelog for 2.0.15-stable

13 years agobufferevent: Add functions to set/get max_single_read/write values.
Alexander Drozdov [Tue, 11 Oct 2011 05:26:57 +0000 (09:26 +0400)]
bufferevent: Add functions to set/get max_single_read/write values.

13 years agoMake evbase_priority_init() and evbase_get_npriorities() threadsafe
Nick Mathewson [Tue, 11 Oct 2011 13:50:57 +0000 (09:50 -0400)]
Make evbase_priority_init() and evbase_get_npriorities() threadsafe

13 years agoAdd event_base_get_npriorities() function.
Alexander Drozdov [Tue, 11 Oct 2011 07:12:34 +0000 (11:12 +0400)]
Add event_base_get_npriorities() function.

13 years agoMerge remote-tracking branch 'origin/patches-2.0'
Nick Mathewson [Mon, 10 Oct 2011 15:34:26 +0000 (11:34 -0400)]
Merge remote-tracking branch 'origin/patches-2.0'

13 years agorefer to non-deprecated evdns functions in comments
Greg Hazel [Mon, 10 Oct 2011 15:24:43 +0000 (08:24 -0700)]
refer to non-deprecated evdns functions in comments

13 years agoMake evbuffer_file_segment_types adaptable
Nick Mathewson [Thu, 6 Oct 2011 22:02:22 +0000 (18:02 -0400)]
Make evbuffer_file_segment_types adaptable

Instead of having a file segment born as one type and stay that way
forever, let them start out unmapped, but map themselves as needed
if they need to get written out on a non-drains_to_fd evbuffer.

13 years agoMerge remote-tracking branch 'origin/patches-2.0'
Nick Mathewson [Thu, 6 Oct 2011 19:21:55 +0000 (15:21 -0400)]
Merge remote-tracking branch 'origin/patches-2.0'

Conflicts:
buffer.c
test/regress_buffer.c

13 years agoMerge remote-tracking branch 'github/20_addfile_ssl' into patches-2.0
Nick Mathewson [Thu, 6 Oct 2011 19:11:50 +0000 (15:11 -0400)]
Merge remote-tracking branch 'github/20_addfile_ssl' into patches-2.0

13 years agoMerge branch '21_largefile_support'
Nick Mathewson [Wed, 5 Oct 2011 19:03:17 +0000 (15:03 -0400)]
Merge branch '21_largefile_support'

13 years agoMerge branch '21_evloop_noexit'
Nick Mathewson [Wed, 5 Oct 2011 15:26:52 +0000 (11:26 -0400)]
Merge branch '21_evloop_noexit'

13 years agoNew EVLOOP_NO_EXIT_ON_EMPTY option to keep looping even when no events are pending
Nick Mathewson [Thu, 2 Dec 2010 02:53:08 +0000 (21:53 -0500)]
New EVLOOP_NO_EXIT_ON_EMPTY option to keep looping even when no events are pending

This can be useful if you want to start an event loop and then add or
remove events to it from another thread.

13 years agoAllow evconnlistener to be created in disabled state.
Alexander Drozdov [Mon, 3 Oct 2011 04:12:32 +0000 (08:12 +0400)]
Allow evconnlistener to be created in disabled state.

13 years agoMerge remote-tracking branch 'origin/patches-2.0'
Nick Mathewson [Mon, 3 Oct 2011 16:54:35 +0000 (12:54 -0400)]
Merge remote-tracking branch 'origin/patches-2.0'

13 years agoFix some "value never used" warnings with gcc 4.6.1
Nick Mathewson [Mon, 3 Oct 2011 16:49:02 +0000 (12:49 -0400)]
Fix some "value never used" warnings with gcc 4.6.1

13 years agoMake write-checking fixes use tt_fail_perror
Nick Mathewson [Mon, 3 Oct 2011 16:45:36 +0000 (12:45 -0400)]
Make write-checking fixes use tt_fail_perror

13 years agoFixed compiler warnings for unchecked read/write calls.
Mark Ellzey [Tue, 12 Jul 2011 17:05:36 +0000 (13:05 -0400)]
Fixed compiler warnings for unchecked read/write calls.

13 years agoPrefer mmap to sendfile unless a DRAINS_TO_FD flag is set. Allows add_file to work...
Nick Mathewson [Thu, 29 Sep 2011 13:30:04 +0000 (09:30 -0400)]
Prefer mmap to sendfile unless a DRAINS_TO_FD flag is set. Allows add_file to work with SSL.

The sendfile() implementation for evbuffer_add_file is potentially more
efficient, but it has a problem: you can only use it to send bytes over
a socket using sendfile().  If you are writing bytes via SSL_send() or
via a filter, or if you need to be able to inspect your buffer, it
doesn't work.

As an easy fix, this patch disables the sendfile-based implementation of
evbuffer_add_file on an evbuffer unless the user sets a new
EVBUFFER_FLAG_DRAINS_TO_FD flag on that evbuffer, indicating that the
evbuffer will not be inspected, but only written out via
evbuffer_write(), evbuffer_write_atmost(), or drained with stuff like
evbuffer_drain() or evbuffer_add_buffer().  This flag is off by
default, except for evbuffers used for output on bufferevent_socket.

In the future, it could be interesting to make a best-effort file
segment implementation that tries to send via sendfile, but mmaps on
demand.  That's too much complexity for a stable release series, though.

13 years agoMerge remote-tracking branch 'origin/patches-2.0'
Nick Mathewson [Wed, 28 Sep 2011 13:23:41 +0000 (09:23 -0400)]
Merge remote-tracking branch 'origin/patches-2.0'

13 years agoMake evbuffer callbacks get the right n_added value after evbuffer_add
Nick Mathewson [Wed, 28 Sep 2011 13:22:17 +0000 (09:22 -0400)]
Make evbuffer callbacks get the right n_added value after evbuffer_add

Patch from Alex.

13 years agoMerge remote-tracking branch 'origin/patches-2.0'
Nick Mathewson [Mon, 26 Sep 2011 15:11:30 +0000 (11:11 -0400)]
Merge remote-tracking branch 'origin/patches-2.0'

13 years agoMerge branch '20_loopbreak_in_signal' into patches-2.0
Nick Mathewson [Mon, 26 Sep 2011 15:07:58 +0000 (11:07 -0400)]
Merge branch '20_loopbreak_in_signal' into patches-2.0

13 years agoMerge remote-tracking branch 'origin/patches-2.0'
Nick Mathewson [Sun, 25 Sep 2011 11:41:29 +0000 (07:41 -0400)]
Merge remote-tracking branch 'origin/patches-2.0'

13 years agoUse _SOURCES, not _sources, in sample/Makefile.am
Nick Mathewson [Sun, 25 Sep 2011 11:39:00 +0000 (07:39 -0400)]
Use _SOURCES, not _sources, in sample/Makefile.am

Found by Adrian Chadd

13 years agoMerge remote-tracking branch 'origin/patches-2.0'
Nick Mathewson [Fri, 16 Sep 2011 13:47:14 +0000 (09:47 -0400)]
Merge remote-tracking branch 'origin/patches-2.0'

13 years agole-proxy and regress depend on openssl directly
Sergey Avseyev [Thu, 15 Sep 2011 10:06:38 +0000 (13:06 +0300)]
le-proxy and regress depend on openssl directly

13 years agoMerge remote-tracking branch 'origin/patches-2.0'
Nick Mathewson [Mon, 12 Sep 2011 19:46:54 +0000 (15:46 -0400)]
Merge remote-tracking branch 'origin/patches-2.0'

13 years agoAdd DNS_ERR_NODATA error code to handle empty replies.
Leonid Evdokimov [Wed, 10 Aug 2011 11:58:47 +0000 (15:58 +0400)]
Add DNS_ERR_NODATA error code to handle empty replies.

13 years agoFix docstring in dns.h
Leonid Evdokimov [Wed, 10 Aug 2011 11:58:19 +0000 (15:58 +0400)]
Fix docstring in dns.h

13 years agoBuild with large-file support on platforms where it matters
Nick Mathewson [Mon, 12 Sep 2011 18:53:39 +0000 (14:53 -0400)]
Build with large-file support on platforms where it matters

Some hosts require you to define certain options to get a large off_t
instead of a small one, to get useful ftell and fseek calls instead of
ones that can only support 2GB files, and so on.  This patch makes
Libevent support those platforms by:

   * Defining the right options when we build, and
   * Changing our API so that it does not depend on the platform's
     definition of off_t.

Based on discusion with Michael Herf

13 years agoMerge branch '21_enable_debugging'
Nick Mathewson [Mon, 12 Sep 2011 15:31:19 +0000 (11:31 -0400)]
Merge branch '21_enable_debugging'

13 years agoClarify event_enable_debug_logging a little
Nick Mathewson [Mon, 12 Sep 2011 15:31:02 +0000 (11:31 -0400)]
Clarify event_enable_debug_logging a little

13 years agoRemove calls to deprecated bufferevent functions from evhttp.c
Nick Mathewson [Mon, 12 Sep 2011 14:57:37 +0000 (10:57 -0400)]
Remove calls to deprecated bufferevent functions from evhttp.c

13 years agoAdd evhttp callback for bufferevent creation; this lets evhttp support SSL.
Nick Mathewson [Mon, 12 Sep 2011 14:46:17 +0000 (10:46 -0400)]
Add evhttp callback for bufferevent creation; this lets evhttp support SSL.

Based on a patch uploaded anonymously to sourceforge; cleaned up
by Graham Leggett to work with current libevents.

13 years agoMerge branch 'new_configure_options'
Nick Mathewson [Mon, 12 Sep 2011 14:09:28 +0000 (10:09 -0400)]
Merge branch 'new_configure_options'

13 years agoImplement --enable-gcc-hardening configure option
Sebastian Hahn [Sun, 10 Apr 2011 16:25:05 +0000 (18:25 +0200)]
Implement --enable-gcc-hardening configure option

Using --enable-gcc-hardening enables some additional safety features
that gcc makes available such as stack smashing protection using
canaries and ASLR.

This commit is based on a patch for Tor:
(git commit 04fa935e02270bc90aca0f1c652d31c7a872175b by Jacob Appelbaum)
Copyright (c) 2007-2011, The Tor Project, Inc.

13 years agoMake gcc warnings on by default, and --enable-gcc-warnings only add -Werror
Sebastian Hahn [Sun, 20 Mar 2011 03:24:33 +0000 (04:24 +0100)]
Make gcc warnings on by default, and --enable-gcc-warnings only add -Werror

This commit is based on a patch for Tor
(git commit ca60a6ce3f4786626ac455ec1b798b2e8304635c by Peter
Palfrader), Copyright (c) 2007-2011, The Tor Project, Inc.

(Originally, it added --enable-gcc-warnings-advisory as in Tor; Nick
changed that.)

13 years agoWhen a signal callback is activated to run multiple times, allow event_base_loopbreak...
Nick Mathewson [Sat, 10 Sep 2011 00:53:30 +0000 (20:53 -0400)]
When a signal callback is activated to run multiple times, allow event_base_loopbreak to work even before they all have run.

Found by Abilio Marques.

13 years agoMerge remote-tracking branch 'origin/patches-2.0'
Nick Mathewson [Thu, 1 Sep 2011 21:39:37 +0000 (17:39 -0400)]
Merge remote-tracking branch 'origin/patches-2.0'

13 years agoDNS: add ttl for negative answers using RFC 2308 idea.
Leonid Evdokimov [Tue, 30 Aug 2011 20:56:45 +0000 (00:56 +0400)]
DNS: add ttl for negative answers using RFC 2308 idea.

13 years agoMake --enable-verbose-debug option match its help text
Nick Mathewson [Wed, 31 Aug 2011 15:58:40 +0000 (11:58 -0400)]
Make --enable-verbose-debug option match its help text

13 years agoMerge remote-tracking branch 'origin/patches-2.0'
Nick Mathewson [Wed, 31 Aug 2011 15:28:37 +0000 (11:28 -0400)]
Merge remote-tracking branch 'origin/patches-2.0'

Conflicts:
Makefile.am
WIN32-Code/event2/event-config.h
configure.in

13 years agoIncrement version to 2.0.14-stable-dev
Nick Mathewson [Wed, 31 Aug 2011 15:25:11 +0000 (11:25 -0400)]
Increment version to 2.0.14-stable-dev

13 years agoCredit new contributors for 2.0.14-stable release-2.0.14-stable
Nick Mathewson [Wed, 31 Aug 2011 04:23:20 +0000 (00:23 -0400)]
Credit new contributors for 2.0.14-stable

13 years agoPick a release date for the changelog
Nick Mathewson [Wed, 31 Aug 2011 02:35:51 +0000 (22:35 -0400)]
Pick a release date for the changelog

13 years agoBump version to 2.0.14-stable
Nick Mathewson [Wed, 31 Aug 2011 02:28:02 +0000 (22:28 -0400)]
Bump version to 2.0.14-stable

13 years agoUse SIG_IGN instead of a do-nothing handler for signal events with kqueue
Zack Weinberg [Thu, 11 Aug 2011 16:34:51 +0000 (09:34 -0700)]
Use SIG_IGN instead of a do-nothing handler for signal events with kqueue

13 years agoFix OSX build: $(OPENSSL_INCS) needs to be after $(AM_CPPFLAGS).
Zack Weinberg [Tue, 30 Aug 2011 16:38:18 +0000 (09:38 -0700)]
Fix OSX build: $(OPENSSL_INCS) needs to be after $(AM_CPPFLAGS).

13 years agoMerge remote-tracking branch 'origin/patches-2.0'
Nick Mathewson [Mon, 29 Aug 2011 21:51:45 +0000 (17:51 -0400)]
Merge remote-tracking branch 'origin/patches-2.0'

13 years agoclear read watermark on underlying bufferevent when creating filtering bev to fix...
Joachim Bauch [Mon, 29 Aug 2011 21:39:26 +0000 (23:39 +0200)]
clear read watermark on underlying bufferevent when creating filtering bev to fix potentially failing fragmented ssl handshakes

13 years agoCheckpoint changelog entries for 2.0.14-stable
Nick Mathewson [Mon, 29 Aug 2011 17:40:03 +0000 (13:40 -0400)]
Checkpoint changelog entries for 2.0.14-stable

13 years agoMerge remote-tracking branch 'origin/patches-2.0'
Nick Mathewson [Sun, 28 Aug 2011 18:51:36 +0000 (14:51 -0400)]
Merge remote-tracking branch 'origin/patches-2.0'

13 years agoCorrectly terminate IO on an async bufferevent on bufferevent_free
Nick Mathewson [Thu, 25 Aug 2011 01:39:28 +0000 (21:39 -0400)]
Correctly terminate IO on an async bufferevent on bufferevent_free

13 years agoHave test-ratelim.c support IOCP
Nick Mathewson [Wed, 24 Aug 2011 22:42:12 +0000 (18:42 -0400)]
Have test-ratelim.c support IOCP

13 years agoMake IOCP rate-limiting group support stricter and less surprising.
Nick Mathewson [Wed, 24 Aug 2011 22:41:35 +0000 (18:41 -0400)]
Make IOCP rate-limiting group support stricter and less surprising.

Previously, we wouldn't decrement read/write buckets because of IOCP
reads and writes until those reads and writes were complete.  That's
not so bad on the per-connection front.  But for group limits, the
old approach makes us launch a huge amount of reads and writes
whenever the group limit becomes positive, and then decrement the
limit to a hugely negative number as they complete.

With this patch, we decrement our read buckets whenever we launch an
IOCP read or write, based on the maximum that tried to read or
write.  Later, when the operations finish, we re-increment the
bucket based on the portion of the request that couldn't finish.

13 years agoSupport negative arguments to _bufferevent_decrement_(read/write)_buckets()
Nick Mathewson [Wed, 24 Aug 2011 22:42:00 +0000 (18:42 -0400)]
Support negative arguments to _bufferevent_decrement_(read/write)_buckets()

13 years agoWe need AM_CPPFLAGS when compiling bufferevent_openssl.c
Harlan Stenn [Sat, 27 Aug 2011 08:46:10 +0000 (04:46 -0400)]
We need AM_CPPFLAGS when compiling bufferevent_openssl.c

13 years agoUse pkg-config (if available) to handle OpenSSL.
Harlan Stenn [Sun, 28 Aug 2011 18:30:52 +0000 (14:30 -0400)]
Use pkg-config (if available) to handle OpenSSL.

13 years agoProvide the autoconf m4 macros for the new OpenSSL via pkg-config stuff.
Harlan Stenn [Sat, 27 Aug 2011 08:06:49 +0000 (04:06 -0400)]
Provide the autoconf m4 macros for the new OpenSSL via pkg-config stuff.

13 years agoMerge remote-tracking branch 'origin/patches-2.0'
Nick Mathewson [Sun, 28 Aug 2011 18:06:03 +0000 (14:06 -0400)]
Merge remote-tracking branch 'origin/patches-2.0'

13 years agoCleanup on 7c11e51e1ab: fix strtol usage
Nick Mathewson [Sun, 28 Aug 2011 18:03:10 +0000 (14:03 -0400)]
Cleanup on 7c11e51e1ab: fix strtol usage

13 years agoCleanup on 7c11e51e1ab: restore c90 declaration compliance
Nick Mathewson [Sun, 28 Aug 2011 18:02:40 +0000 (14:02 -0400)]
Cleanup on 7c11e51e1ab: restore c90 declaration compliance

13 years agoClean up some problems identified by Coverity.
Harlan Stenn [Sat, 27 Aug 2011 09:48:11 +0000 (05:48 -0400)]
Clean up some problems identified by Coverity.

13 years agoMerge remote-tracking branch 'origin/patches-2.0'
Nick Mathewson [Wed, 24 Aug 2011 20:17:56 +0000 (16:17 -0400)]
Merge remote-tracking branch 'origin/patches-2.0'

13 years agoMake rate limiting work with common_timeout logic
Nick Mathewson [Wed, 24 Aug 2011 20:17:05 +0000 (16:17 -0400)]
Make rate limiting work with common_timeout logic

13 years agoMerge remote-tracking branch 'origin/patches-2.0'
Nick Mathewson [Thu, 18 Aug 2011 19:18:14 +0000 (15:18 -0400)]
Merge remote-tracking branch 'origin/patches-2.0'

13 years agoMerge branch '20_iocp_fixes' into patches-2.0
Nick Mathewson [Thu, 18 Aug 2011 19:09:44 +0000 (15:09 -0400)]
Merge branch '20_iocp_fixes' into patches-2.0

13 years agoMake overlapped reads result in evbuffer callbacks getting invoked
Nick Mathewson [Thu, 18 Aug 2011 16:35:27 +0000 (12:35 -0400)]
Make overlapped reads result in evbuffer callbacks getting invoked

13 years agoIOCP: don't launch reads or writes on an unconnected socket
Nick Mathewson [Thu, 18 Aug 2011 15:41:55 +0000 (11:41 -0400)]
IOCP: don't launch reads or writes on an unconnected socket

13 years agoMerge remote-tracking branch 'origin/patches-2.0'
Nick Mathewson [Thu, 18 Aug 2011 02:08:06 +0000 (22:08 -0400)]
Merge remote-tracking branch 'origin/patches-2.0'

Conflict in buffer.c: the new file-segment logic conflicted with the
solaris sendfile fix.

13 years agoTry to fix 'make distcheck' errors when building out-of-tree
Dave Hart [Mon, 15 Aug 2011 18:40:32 +0000 (14:40 -0400)]
Try to fix 'make distcheck' errors when building out-of-tree

13 years agoMake the priority inversion code use gettime(), not evutil_gettimeofday()
Nick Mathewson [Thu, 11 Aug 2011 16:47:21 +0000 (12:47 -0400)]
Make the priority inversion code use gettime(), not evutil_gettimeofday()

Since we're computing the time after each callback, we might as well
update the time cache (if we're using it) and use monotonic time (if
we've got that).

13 years agoMake max_dispatch_interval able to apply only to low-priority events
Nick Mathewson [Thu, 11 Aug 2011 16:38:47 +0000 (12:38 -0400)]
Make max_dispatch_interval able to apply only to low-priority events

Suggested by Alexander Drozdov

13 years agoOptimization in event_process_active(): ignore maxcb & endtime for highest priority...
Alexander Drozdov [Fri, 22 Jul 2011 08:29:07 +0000 (12:29 +0400)]
Optimization in event_process_active(): ignore maxcb & endtime for highest priority events.

13 years agoMake sure max_dispatch_callbacks is never negative
Nick Mathewson [Thu, 11 Aug 2011 15:59:23 +0000 (11:59 -0400)]
Make sure max_dispatch_callbacks is never negative

Suggested by Alexander Drozdov.

13 years agoAdd event_config function to limit time/callbacks between calls to dispatch
Nick Mathewson [Thu, 2 Dec 2010 01:44:05 +0000 (20:44 -0500)]
Add event_config function to limit time/callbacks between calls to dispatch

13 years agoMerge branch '20_low_ratelim' into patches-2.0
Nick Mathewson [Thu, 18 Aug 2011 01:47:19 +0000 (21:47 -0400)]
Merge branch '20_low_ratelim' into patches-2.0

13 years agoSolaris sendfile: correctly detect amount of data sent
Michael Herf [Mon, 15 Aug 2011 17:39:10 +0000 (13:39 -0400)]
Solaris sendfile: correctly detect amount of data sent

Original message:

   Solaris sendfile seems to fail when sending moderately large (<1GB)
   files. Not a 32/64 problem, but a buffer problem.

   Anyone else ever try this? It is definitely broken in http-server.c.

   It seems to be broken in the following way:

   When sendfile sends partial data (EAGAIN, would block), "res" is
   always -1, rather than the amount sent.

   Here's a patch that reads from the "offset" pointer instead to
   discover what was sent. This seems to work:

13 years agoMerge remote-tracking branch 'ellzey/debug_timer_add_usec'
Nick Mathewson [Mon, 15 Aug 2011 15:29:39 +0000 (11:29 -0400)]
Merge remote-tracking branch 'ellzey/debug_timer_add_usec'

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

13 years agoFix request_finished memory leak with debugging turned on.
Leonid Evdokimov [Wed, 10 Aug 2011 23:24:06 +0000 (03:24 +0400)]
Fix request_finished memory leak with debugging turned on.

13 years agoFix evsig_dealloc memory leak with debugging turned on.
Leonid Evdokimov [Wed, 10 Aug 2011 23:10:08 +0000 (03:10 +0400)]
Fix evsig_dealloc memory leak with debugging turned on.