]>
granicus.if.org Git - libevent/log
Nick Mathewson [Sun, 5 Apr 2009 04:26:46 +0000 (04:26 +0000)]
Finally, get unit tests to pass with threading turned off again.
svn:r1137
Nick Mathewson [Sun, 5 Apr 2009 04:15:01 +0000 (04:15 +0000)]
Munge the read_suspended flag before re-enabling reads on the underlying bufferevent. This makes it so the enabled thing has some idea whether reads are supposed to be suspended or not.
svn:r1136
Nick Mathewson [Sun, 5 Apr 2009 04:10:05 +0000 (04:10 +0000)]
Actually, move EVUTIL_NIL_STMT to util-internal.h
svn:r1135
Nick Mathewson [Sun, 5 Apr 2009 02:44:17 +0000 (02:44 +0000)]
Add locking to evbuffers.
svn:r1134
Nick Mathewson [Sun, 5 Apr 2009 02:44:04 +0000 (02:44 +0000)]
Fix build with thread support disabled, and make no-op macros a little more no-oppy.
svn:r1133
Nick Mathewson [Sun, 5 Apr 2009 02:43:55 +0000 (02:43 +0000)]
Add some more utility macros to evthread-internal.h
svn:r1132
Nick Mathewson [Fri, 3 Apr 2009 14:27:03 +0000 (14:27 +0000)]
Make the new evbuffer callbacks use a new struct-based interface.
The old interface would fail pretty hard when we had to batch up
multiple adds and drains in a single call.
svn:r1131
Nick Mathewson [Fri, 3 Apr 2009 01:21:36 +0000 (01:21 +0000)]
Add a new improved search function.
The old evbuffer_find didn't allow iterative searching, and forced us
to repack the buffer completely every time we searched in it. The
new evbuffer_search addresses both of these. As a side-effect, the
evbuffer_find implementation is now a little more efficient.
svn:r1130
Nick Mathewson [Wed, 1 Apr 2009 16:08:34 +0000 (16:08 +0000)]
Glibc mkstemp requires exactly 6 Xs.
svn:r1129
Niels Provos [Mon, 30 Mar 2009 17:36:22 +0000 (17:36 +0000)]
correct evbuffer_drain documentation from John Khvatov
svn:r1127
Niels Provos [Thu, 12 Mar 2009 17:43:43 +0000 (17:43 +0000)]
include Doxyfile in tar ball; from Jeff Garzik
svn:r1125
Nick Mathewson [Fri, 13 Feb 2009 13:43:35 +0000 (13:43 +0000)]
Make tmpfile code compile without warnings
svn:r1123
Niels Provos [Fri, 13 Feb 2009 01:42:59 +0000 (01:42 +0000)]
a simple test for evbuffer_add_file
svn:r1122
Nick Mathewson [Thu, 12 Feb 2009 22:19:54 +0000 (22:19 +0000)]
Make threading functions global, like the mm_ functions. Use the libevent_pthread.la library in regress_pthread.
svn:r1121
Nick Mathewson [Wed, 11 Feb 2009 17:29:17 +0000 (17:29 +0000)]
Fix some of the crazier indentation and tabbing choices in evdns.c
svn:r1120
Nick Mathewson [Wed, 11 Feb 2009 17:24:11 +0000 (17:24 +0000)]
New bind-to option to allow DNS clients to bind to arbitrary ports for their outgoing addresses.
svn:r1119
Nick Mathewson [Wed, 11 Feb 2009 17:23:32 +0000 (17:23 +0000)]
Make evutil_parse_sockaddr_port give a useful socket-length output.
svn:r1118
Nick Mathewson [Wed, 11 Feb 2009 17:22:40 +0000 (17:22 +0000)]
Better comments for some confusing-to-me code.
svn:r1117
Nick Mathewson [Wed, 11 Feb 2009 17:21:48 +0000 (17:21 +0000)]
Port some evdns changes over from Tor.
svn:r1116
Nick Mathewson [Wed, 11 Feb 2009 05:17:27 +0000 (05:17 +0000)]
oops; coding too quickly on nil-filter patch. Caught by niels.
svn:r1115
Nick Mathewson [Tue, 10 Feb 2009 21:40:12 +0000 (21:40 +0000)]
Do not use ctypes functions in cases when we need the "net" locale.
This patch adds a new set of EVUTIL_IS* functions to replace use of
the ctypes is* functions in all cases where we care about characters'
interpretations in net ascii rather than in the locale. For example,
when we're working with DNS hostnames, we don't want to do the 0x20
hack on non-ascii characters, even if the host thinks they should be
isalpha.
svn:r1114
Nick Mathewson [Tue, 10 Feb 2009 21:39:56 +0000 (21:39 +0000)]
Stop rolling our own offsetof twice.
svn:r1113
Nick Mathewson [Tue, 10 Feb 2009 19:43:19 +0000 (19:43 +0000)]
Make a couple of newer evdns functions more bulletproof.
svn:r1112
Nick Mathewson [Tue, 10 Feb 2009 19:43:11 +0000 (19:43 +0000)]
Stop using platform inet_aton/inet_addr; they can behave strangely on certain misformed addresses.
svn:r1111
Nick Mathewson [Tue, 10 Feb 2009 19:39:22 +0000 (19:39 +0000)]
Explode less badly in the case where we're told to prepend/append/remove a buffer to itself. Note some API/implementation deficiencies.
svn:r1110
Nick Mathewson [Tue, 10 Feb 2009 19:39:12 +0000 (19:39 +0000)]
Make default (nil) filter use evbuffer_remove_buffer to respect the high-water mark of the target buffer.
svn:r1109
Nick Mathewson [Tue, 10 Feb 2009 19:39:03 +0000 (19:39 +0000)]
Test some formerly untested prepend cases of evbuffer. Now evbuffer coverage is over 80 percent.
svn:r1108
Nick Mathewson [Tue, 10 Feb 2009 19:38:54 +0000 (19:38 +0000)]
More unit tests for evbuffer_add_reference to make sure that certain interleaved data patterns work; that free invokes callback; that callbacks are not invoked too early or later; etc.
svn:r1107
Nick Mathewson [Tue, 10 Feb 2009 19:38:43 +0000 (19:38 +0000)]
A few more comments on evbuffer-internal structures.
svn:r1106
Nick Mathewson [Tue, 10 Feb 2009 19:38:34 +0000 (19:38 +0000)]
Add an assertion to evbuffer_chain_align so we can't reuse it in the future.
svn:r1105
Nick Mathewson [Tue, 10 Feb 2009 19:38:25 +0000 (19:38 +0000)]
Remove some needless includes
svn:r1104
Nick Mathewson [Tue, 10 Feb 2009 19:38:14 +0000 (19:38 +0000)]
use new evutil_make_listen_socket_reuseable() in http.c
svn:r1103
Nick Mathewson [Tue, 10 Feb 2009 19:38:05 +0000 (19:38 +0000)]
New function to abstract SO_REUSEADDR.
svn:r1102
Nick Mathewson [Tue, 3 Feb 2009 18:28:53 +0000 (18:28 +0000)]
Move bufferevent tests to regress_bufferevent.c file.
svn:r1101
Nick Mathewson [Tue, 3 Feb 2009 05:22:57 +0000 (05:22 +0000)]
Enable (and debug) WSARecv for evbuffer iovec-like reads.
The two things we were missing: the flags parameter is not optional, and an error can actually indicate a close.
svn:r1100
Nick Mathewson [Mon, 2 Feb 2009 22:17:32 +0000 (22:17 +0000)]
Compile http_connection_retry_test, but mark it skipped on win32.
svn:r1099
Nick Mathewson [Mon, 2 Feb 2009 21:59:53 +0000 (21:59 +0000)]
Some mingws have AF_UNIX, which may have prevented our socketpair from working at all on them. Fix that.
svn:r1098
Nick Mathewson [Mon, 2 Feb 2009 21:24:04 +0000 (21:24 +0000)]
convert new bufferevent_*.c files to event-config.h only.
svn:r1097
Nick Mathewson [Mon, 2 Feb 2009 19:22:27 +0000 (19:22 +0000)]
forward-port: Make evdns_resolve_reverse args const.
svn:r1096
Nick Mathewson [Mon, 2 Feb 2009 19:22:13 +0000 (19:22 +0000)]
checkpoint work on big bufferevent refactoring
svn:r1095
Nick Mathewson [Sun, 1 Feb 2009 05:26:47 +0000 (05:26 +0000)]
Allocate callback entries with contents 0d out.
svn:r1093
Nick Mathewson [Sun, 1 Feb 2009 02:20:16 +0000 (02:20 +0000)]
Enable the edge-triggered test again
svn:r1092
Nick Mathewson [Sun, 1 Feb 2009 01:43:58 +0000 (01:43 +0000)]
Support temporarily suspending an evbuffer callback. This is different from disabling the callback, since we want to process changes, but not just yet.
svn:r1091
Nick Mathewson [Sun, 1 Feb 2009 01:07:42 +0000 (01:07 +0000)]
Unit tests for evbuffer callback manipulation
svn:r1090
Nick Mathewson [Sun, 1 Feb 2009 01:07:33 +0000 (01:07 +0000)]
Fix a typo in buffer.h
svn:r1089
Nick Mathewson [Sun, 1 Feb 2009 01:07:22 +0000 (01:07 +0000)]
Change evbuffer callbacks to use tinytest natively and never assert.
svn:r1088
Nick Mathewson [Sun, 1 Feb 2009 01:07:12 +0000 (01:07 +0000)]
Move evbuffer tests into their own file.
svn:r1087
Nick Mathewson [Sat, 31 Jan 2009 19:32:20 +0000 (19:32 +0000)]
slightly more coverage for evutil.
svn:r1086
Nick Mathewson [Sat, 31 Jan 2009 18:36:47 +0000 (18:36 +0000)]
Convert evtag test.
svn:r1085
Nick Mathewson [Sat, 31 Jan 2009 18:36:37 +0000 (18:36 +0000)]
Move rpc_test to regress_rpc.
svn:r1084
Nick Mathewson [Sat, 31 Jan 2009 18:36:24 +0000 (18:36 +0000)]
Convert RPC suite. There are still some places it can exit(1), but those always run forked, so no big deal.
svn:r1083
Nick Mathewson [Sat, 31 Jan 2009 18:36:08 +0000 (18:36 +0000)]
Add missing initializers
svn:r1082
Nick Mathewson [Sat, 31 Jan 2009 07:32:14 +0000 (07:32 +0000)]
Port DNS tests.
svn:r1081
Nick Mathewson [Sat, 31 Jan 2009 07:32:00 +0000 (07:32 +0000)]
Tinytest update: mostly just to allow test skipping.
svn:r1080
Nick Mathewson [Sat, 31 Jan 2009 07:31:47 +0000 (07:31 +0000)]
Build with the -fno-strict-aliasing flag on GCC.
You do not want to know about the 2 hours I just spent tracking down
an evdns bug that only affected me on some platforms to the way we
were using sockaddr* and sockaddr_in*. Suffice it to say that I do
not think this is the only C99-aliasing-dubiousness in our code, nor
that I am smart enough to keep my code correct with the GCC's strict
aliasing optimizations in place.
svn:r1079
Nick Mathewson [Sat, 31 Jan 2009 05:45:26 +0000 (05:45 +0000)]
Do not attempt to pass a va_args to regular snprintf. Hilarity will ensue. Fortunately, 1.4 does not have this bug.
svn:r1078
Nick Mathewson [Sat, 31 Jan 2009 05:45:16 +0000 (05:45 +0000)]
Rename a couple of http tests so they all end with _test. This lets us simplify the naming.
svn:r1077
Nick Mathewson [Fri, 30 Jan 2009 17:44:13 +0000 (17:44 +0000)]
Port the HTTP unit tests. Most are still legacy (since they use test_ok so much), but at least they no longer exit(1) on failure
svn:r1076
Nick Mathewson [Fri, 30 Jan 2009 17:43:59 +0000 (17:43 +0000)]
Move util tests to regress_util.c
svn:r1075
Nick Mathewson [Fri, 30 Jan 2009 17:43:48 +0000 (17:43 +0000)]
Convert test_evutil_strtoll to new framework.
svn:r1074
Nick Mathewson [Thu, 29 Jan 2009 23:19:57 +0000 (23:19 +0000)]
Refactor unit tests using my spiffy new "tinytest" framework.
The big win here is that we can get process-level isolation.
This has been tested to work okay on at least Linux and Win32. Only
the tests in regress.c have been converted wrapped in the new wrapper
functions; the others are still on the old system.
svn:r1073
Nick Mathewson [Thu, 29 Jan 2009 20:07:59 +0000 (20:07 +0000)]
Make ht-internal.h get distributed.
svn:r1072
Nick Mathewson [Thu, 29 Jan 2009 18:15:36 +0000 (18:15 +0000)]
fix signed/unsigned warning in unit tests. can we just use "char*" on all new APIs? this void/unsigned char*/char* business is awful.
svn:r1071
Nick Mathewson [Thu, 29 Jan 2009 15:09:24 +0000 (15:09 +0000)]
Have util-internal.h define socklen_t if we need it, and include it appropriately. This fixes win32 compilation.
svn:r1070
Niels Provos [Thu, 29 Jan 2009 03:22:47 +0000 (03:22 +0000)]
make it so that evbuffer_add_file where we read the complete contents of the file can fail without side effects
svn:r1069
Niels Provos [Thu, 29 Jan 2009 03:20:40 +0000 (03:20 +0000)]
test evbuffer_add_reference
svn:r1068
Nick Mathewson [Wed, 28 Jan 2009 20:31:19 +0000 (20:31 +0000)]
Fix an unlikely degenerate case of evutil_vsnprintf
svn:r1067
Nick Mathewson [Wed, 28 Jan 2009 20:24:12 +0000 (20:24 +0000)]
Use size_t for name length in DNS requests. Not that it matters much.
svn:r1066
Nick Mathewson [Tue, 27 Jan 2009 22:34:36 +0000 (22:34 +0000)]
Update copyright statements to reflect the facts that:
a) this is 2009
b) niels and nick have been comaintainers for a while
c) saying "all rights reserved" when you then go on to explicitly
disclaim some rights is sheer cargo-cultism.
svn:r1065
Nick Mathewson [Tue, 27 Jan 2009 22:30:46 +0000 (22:30 +0000)]
Replace all use of config.h with event-config.h.
svn:r1064
Nick Mathewson [Tue, 27 Jan 2009 21:10:31 +0000 (21:10 +0000)]
Remove all trailing whitespace in all the source files.
svn:r1063
Niels Provos [Tue, 27 Jan 2009 16:35:28 +0000 (16:35 +0000)]
make it so that test_persistent_timeout can call loopexit only once; reported by Alexander Drozdov
svn:r1062
Niels Provos [Tue, 27 Jan 2009 16:29:48 +0000 (16:29 +0000)]
fix memory leak whens etting up priorities; reported by Alexander Drozdov
svn:r1061
Nick Mathewson [Tue, 27 Jan 2009 13:37:09 +0000 (13:37 +0000)]
Fix some warnings on linux gcc with --enable-gcc-warnings
svn:r1060
Niels Provos [Tue, 27 Jan 2009 06:21:12 +0000 (06:21 +0000)]
use %zu for off_t
svn:r1059
Niels Provos [Tue, 27 Jan 2009 06:18:45 +0000 (06:18 +0000)]
make it compile on linux
svn:r1058
Niels Provos [Tue, 27 Jan 2009 06:05:38 +0000 (06:05 +0000)]
sendfile/mmap and memory reference implementation for evbuffers
svn:r1057
Niels Provos [Tue, 27 Jan 2009 05:33:39 +0000 (05:33 +0000)]
second argument to evbuffer_pullup should be ssize_t
svn:r1056
Nick Mathewson [Mon, 26 Jan 2009 18:04:18 +0000 (18:04 +0000)]
More docs and example code in whatsnew
svn:r1055
Nick Mathewson [Mon, 26 Jan 2009 17:29:45 +0000 (17:29 +0000)]
Initial documentation for evdns server functions. Also deprecate the one that didn't take an event_base.
svn:r1054
Nick Mathewson [Mon, 26 Jan 2009 17:29:27 +0000 (17:29 +0000)]
Accept evutil_socket_t for evdns_server_ports.
svn:r1053
Nick Mathewson [Mon, 26 Jan 2009 17:09:37 +0000 (17:09 +0000)]
For every deprecated function, explain why it is deprecated and what you should call instead.
svn:r1052
Nick Mathewson [Mon, 26 Jan 2009 17:09:22 +0000 (17:09 +0000)]
Documentation (or more accurate documentation) for a few more functions.
svn:r1051
Nick Mathewson [Mon, 26 Jan 2009 17:09:09 +0000 (17:09 +0000)]
Reformat util.h slightly so that it looks ok with 8-char tabs.
svn:r1050
Niels Provos [Mon, 26 Jan 2009 06:13:24 +0000 (06:13 +0000)]
fix memleak in evmap_signal_clear; from Alexander Drozdov
svn:r1049
Niels Provos [Sat, 24 Jan 2009 17:38:27 +0000 (17:38 +0000)]
really install the buffer_compat.h file
svn:r1048
Nick Mathewson [Fri, 23 Jan 2009 18:04:34 +0000 (18:04 +0000)]
Add a "flags" field to evbuffer callbacks.
For now, there is just one: enabled. This lets us avoid lots of
mallocs/frees/tailq-manipulations just to turn a callback on and off.
The revised bufferevent code wants this.
svn:r1047
Nick Mathewson [Fri, 23 Jan 2009 18:03:45 +0000 (18:03 +0000)]
Remove in_callbacks check: allow full recursion in evbuffer callbacks. If you get yourself in an infinite loop, that's not our fault. Note this in the docs. Also reindent some docs now that my tabs match Niels's.
svn:r1046
Niels Provos [Fri, 23 Jan 2009 02:04:41 +0000 (02:04 +0000)]
also install the buffer_compat.h header file
svn:r1044
Nick Mathewson [Fri, 23 Jan 2009 01:35:57 +0000 (01:35 +0000)]
Move obsolete evbuffer function into include/event2/buffer_compat.h
svn:r1043
Nick Mathewson [Fri, 23 Jan 2009 01:11:13 +0000 (01:11 +0000)]
Code to allow multiple callbacks per evbuffer.
svn:r1042
Nick Mathewson [Fri, 23 Jan 2009 01:04:10 +0000 (01:04 +0000)]
Start writing more of whatsnew-xx.txt, which will become whatsnew-2.0.txt
svn:r1041
Nick Mathewson [Thu, 22 Jan 2009 17:56:15 +0000 (17:56 +0000)]
Remove evperiodic_assign and its related parts: its functionality is subsumed by EV_PERSIST timeouts.
svn:r1040
Nick Mathewson [Thu, 22 Jan 2009 17:48:55 +0000 (17:48 +0000)]
Use EV_PERSIST on notify event for efficiency and simplicity.
svn:r1039
Nick Mathewson [Thu, 22 Jan 2009 17:48:27 +0000 (17:48 +0000)]
Use EV_PERSIST in bufferevents for efficiency and simplicity.
svn:r1038
Nick Mathewson [Thu, 22 Jan 2009 17:48:16 +0000 (17:48 +0000)]
Fix warnings on compile: make static functions static.
svn:r1037
Niels Provos [Thu, 22 Jan 2009 06:23:14 +0000 (06:23 +0000)]
fix signal processing for non-kqueue backends; when a signal callback delivers a signal; from Alexander Drozdov
svn:r1035
Niels Provos [Thu, 22 Jan 2009 02:47:35 +0000 (02:47 +0000)]
rename sys/signal.h to signal.h; configure m4 macro dir; this assist with compilation on Haiku
svn:r1033
Niels Provos [Thu, 22 Jan 2009 02:33:38 +0000 (02:33 +0000)]
Change the semantics of timeouts in conjunction with EV_PERSIST; timeouts in that case will now repeat until deleted.
svn:r1032
Nick Mathewson [Wed, 21 Jan 2009 07:51:25 +0000 (07:51 +0000)]
New functions to provide sane threading callbacks with pthreads and win32 threading implementations.
svn:r1031