853 Commits

Author SHA1 Message Date
Nick Mathewson
3502a472b5 convert new bufferevent_*.c files to event-config.h only.
svn:r1097
2009-02-02 21:24:04 +00:00
Nick Mathewson
4d92e4261b forward-port: Make evdns_resolve_reverse args const.
svn:r1096
2009-02-02 19:22:27 +00:00
Nick Mathewson
ea4b8724c0 checkpoint work on big bufferevent refactoring
svn:r1095
2009-02-02 19:22:13 +00:00
Nick Mathewson
e84c765615 Allocate callback entries with contents 0d out.
svn:r1093
2009-02-01 05:26:47 +00:00
Nick Mathewson
2e3f0f682a Enable the edge-triggered test again
svn:r1092
2009-02-01 02:20:16 +00:00
Nick Mathewson
8d3a10f8f1 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
2009-02-01 01:43:58 +00:00
Nick Mathewson
e3e1153109 Unit tests for evbuffer callback manipulation
svn:r1090
2009-02-01 01:07:42 +00:00
Nick Mathewson
2e50658d8d Fix a typo in buffer.h
svn:r1089
2009-02-01 01:07:33 +00:00
Nick Mathewson
ca37fef951 Change evbuffer callbacks to use tinytest natively and never assert.
svn:r1088
2009-02-01 01:07:22 +00:00
Nick Mathewson
a30c9eb1ac Move evbuffer tests into their own file.
svn:r1087
2009-02-01 01:07:12 +00:00
Nick Mathewson
ff7a5e1272 slightly more coverage for evutil.
svn:r1086
2009-01-31 19:32:20 +00:00
Nick Mathewson
12e8db5b23 Convert evtag test.
svn:r1085
2009-01-31 18:36:47 +00:00
Nick Mathewson
5831d11a42 Move rpc_test to regress_rpc.
svn:r1084
2009-01-31 18:36:37 +00:00
Nick Mathewson
fa6ae16992 Convert RPC suite. There are still some places it can exit(1), but those always run forked, so no big deal.
svn:r1083
2009-01-31 18:36:24 +00:00
Nick Mathewson
d9628ef4ff Add missing initializers
svn:r1082
2009-01-31 18:36:08 +00:00
Nick Mathewson
eac75f91e4 Port DNS tests.
svn:r1081
2009-01-31 07:32:14 +00:00
Nick Mathewson
e6ba208ba3 Tinytest update: mostly just to allow test skipping.
svn:r1080
2009-01-31 07:32:00 +00:00
Nick Mathewson
52eb495130 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
2009-01-31 07:31:47 +00:00
Nick Mathewson
2546ea665e Do not attempt to pass a va_args to regular snprintf. Hilarity will ensue. Fortunately, 1.4 does not have this bug.
svn:r1078
2009-01-31 05:45:26 +00:00
Nick Mathewson
4ec690d35e Rename a couple of http tests so they all end with _test. This lets us simplify the naming.
svn:r1077
2009-01-31 05:45:16 +00:00
Nick Mathewson
153093ecc3 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
2009-01-30 17:44:13 +00:00
Nick Mathewson
241690b230 Move util tests to regress_util.c
svn:r1075
2009-01-30 17:43:59 +00:00
Nick Mathewson
4e9470b481 Convert test_evutil_strtoll to new framework.
svn:r1074
2009-01-30 17:43:48 +00:00
Nick Mathewson
a8203b3490 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
2009-01-29 23:19:57 +00:00
Nick Mathewson
39c8dbe073 Make ht-internal.h get distributed.
svn:r1072
2009-01-29 20:07:59 +00:00
Nick Mathewson
cc7a53c152 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
2009-01-29 18:15:36 +00:00
Nick Mathewson
7dd362b158 Have util-internal.h define socklen_t if we need it, and include it appropriately. This fixes win32 compilation.
svn:r1070
2009-01-29 15:09:24 +00:00
Niels Provos
a0cae310d0 make it so that evbuffer_add_file where we read the complete contents of the file can fail without side effects
svn:r1069
2009-01-29 03:22:47 +00:00
Niels Provos
66b2a7ffb7 test evbuffer_add_reference
svn:r1068
2009-01-29 03:20:40 +00:00
Nick Mathewson
f13bede758 Fix an unlikely degenerate case of evutil_vsnprintf
svn:r1067
2009-01-28 20:31:19 +00:00
Nick Mathewson
e3e696c822 Use size_t for name length in DNS requests. Not that it matters much.
svn:r1066
2009-01-28 20:24:12 +00:00
Nick Mathewson
b85b710cf5 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
2009-01-27 22:34:36 +00:00
Nick Mathewson
8889a77039 Replace all use of config.h with event-config.h.
svn:r1064
2009-01-27 22:30:46 +00:00
Nick Mathewson
9993137cbb Remove all trailing whitespace in all the source files.
svn:r1063
2009-01-27 21:10:31 +00:00
Niels Provos
3065389973 make it so that test_persistent_timeout can call loopexit only once; reported by Alexander Drozdov
svn:r1062
2009-01-27 16:35:28 +00:00
Niels Provos
1c927b7d2f fix memory leak whens etting up priorities; reported by Alexander Drozdov
svn:r1061
2009-01-27 16:29:48 +00:00
Nick Mathewson
88f2b7a00f Fix some warnings on linux gcc with --enable-gcc-warnings
svn:r1060
2009-01-27 13:37:09 +00:00
Niels Provos
1757cf717f use %zu for off_t
svn:r1059
2009-01-27 06:21:12 +00:00
Niels Provos
8b5bd77415 make it compile on linux
svn:r1058
2009-01-27 06:18:45 +00:00
Niels Provos
fdf694933c sendfile/mmap and memory reference implementation for evbuffers
svn:r1057
2009-01-27 06:05:38 +00:00
Niels Provos
b93e505452 second argument to evbuffer_pullup should be ssize_t
svn:r1056
2009-01-27 05:33:39 +00:00
Nick Mathewson
4f02a9630d More docs and example code in whatsnew
svn:r1055
2009-01-26 18:04:18 +00:00
Nick Mathewson
c0712b1608 Initial documentation for evdns server functions. Also deprecate the one that didn't take an event_base.
svn:r1054
2009-01-26 17:29:45 +00:00
Nick Mathewson
2b1d535e0d Accept evutil_socket_t for evdns_server_ports.
svn:r1053
2009-01-26 17:29:27 +00:00
Nick Mathewson
bdbd5e0e2f For every deprecated function, explain why it is deprecated and what you should call instead.
svn:r1052
2009-01-26 17:09:37 +00:00
Nick Mathewson
52a75f18e1 Documentation (or more accurate documentation) for a few more functions.
svn:r1051
2009-01-26 17:09:22 +00:00
Nick Mathewson
dddd58ba13 Reformat util.h slightly so that it looks ok with 8-char tabs.
svn:r1050
2009-01-26 17:09:09 +00:00
Niels Provos
0e779906f9 fix memleak in evmap_signal_clear; from Alexander Drozdov
svn:r1049
2009-01-26 06:13:24 +00:00
Niels Provos
765ff1b9de really install the buffer_compat.h file
svn:r1048
2009-01-24 17:38:27 +00:00
Nick Mathewson
81dd04a726 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
2009-01-23 18:04:34 +00:00