151 Commits

Author SHA1 Message Date
Niels Provos
67bf29ad72 simplify evbuffer by removing orig_buffer
svn:r654
2008-02-23 06:02:04 +00:00
Nick Mathewson
11230f7e16 r18145@catbus: nickm | 2008-02-18 15:02:20 -0500
Stop using deprecated autoconf code to set integer types; detect actual files to include more thoroughly.   This should make us work on solaris 9 again.  This should be a backport candidate, if it works.  Also, make all libevent code use ev_uint32_t etc, rather than uint_32_t.


svn:r649
2008-02-18 20:04:01 +00:00
Niels Provos
23ef0d0936 allow regression code to be build even without Python installed
svn:r645
2008-02-17 01:15:36 +00:00
Nick Mathewson
807ab182d0 r14211@tombo: nickm | 2008-02-16 15:28:54 -0500
Add new evutil_strtoll() function so we can apply 64-bit content-length patch from Scott Lamb in a portable way.


svn:r640
2008-02-16 20:49:47 +00:00
Niels Provos
8c66d4e289 remove pending timeouts on event_base_free
svn:r627
2008-01-26 07:29:57 +00:00
Nick Mathewson
9859bc783a r15764@tombo: nickm | 2007-12-31 15:46:16 -0500
Forward-port from 1.4 branch: Make generated rpc files build-depend on event_rpcgen.


svn:r626
2007-12-31 20:47:12 +00:00
Niels Provos
2460aa5939 allow hooks to get access to the connection object
svn:r623
2007-12-31 19:33:30 +00:00
Niels Provos
5a5609c753 allow association of meta data with RPC requests for hook processing
svn:r622
2007-12-29 22:45:54 +00:00
Niels Provos
024804cce7 the win32 changes for regress_http broke the regression test under unix. making the socket non-blocking can return -1 on connect; so now, we need to check the errno; not sure if that is supported under windows.
svn:r621
2007-12-28 07:58:29 +00:00
Niels Provos
955c6abf53 pausing an rpc via a hook needs to deal with the fact that http callbacks free the request after they return; provide a way for a callback to take ownership of the request structure; the user then needs to explicitly free it.
svn:r620
2007-12-28 00:36:47 +00:00
Nick Mathewson
6d291da240 Fix at least two bugs that are keeping the HTTP regression tests from running on windows. There are some more bugs somewhere, since the HTTP regression tests still fail on windows. But now they fail less.
svn:r619
2007-12-28 00:34:05 +00:00
Niels Provos
819d4a33d7 allow hooks to pause RPC processing; this will allow hooks to do meaningful work before resuming the
RPC processing; this is not backwards compatible.


svn:r617
2007-12-27 23:17:24 +00:00
Niels Provos
7e3a7af7d0 support string arrays in event_rpcgen
svn:r613
2007-12-24 23:59:41 +00:00
Niels Provos
68725dc8bd support integer arrays in rpc structures; this involved some refactoring of the event_rpcgen code, so that other types should be able to get arrays fairly easily
svn:r609
2007-12-23 07:38:11 +00:00
Nick Mathewson
a5176a65cc Fix a win32 warning in regress.c
svn:r608
2007-12-20 22:45:30 +00:00
Niels Provos
d4bdbca847 add -Wstrict-aliasing and remove bogus evtag_test from event.h
svn:r602
2007-12-18 03:54:19 +00:00
Nick Mathewson
d56a34e466 r16991@catbus: nickm | 2007-12-06 15:05:56 -0500
Move event_init in regress.c to the function that actually messed up the current_base value.


svn:r598
2007-12-16 19:33:52 +00:00
Niels Provos
622f69cc5a forgot to make new member optional
svn:r590
2007-12-14 07:12:05 +00:00
Niels Provos
850534734b fix a bug with event_rpcgen for integers
svn:r588
2007-12-13 06:36:54 +00:00
Niels Provos
ffd606cd6d prefix {encode,decode}_tag functions with evtag to avoid collisions
svn:r587
2007-12-13 06:14:18 +00:00
Niels Provos
ba48719946 support for 32-bit tag numbers in rpc structures
svn:r583
2007-12-12 04:39:42 +00:00
Nick Mathewson
fa89d661d9 Adjust more unit tests to pass on win32.
svn:r580
2007-12-06 19:40:49 +00:00
Nick Mathewson
fd418645ff Add winsock init functions to bench.c so it can run on win32.
svn:r579
2007-12-06 19:36:49 +00:00
Nick Mathewson
1e435af17e r15170@tombo: nickm | 2007-12-06 12:38:03 -0500
Fix a warning in regress.c


svn:r572
2007-12-06 18:12:44 +00:00
Niels Provos
60103d25a9 remove duplicate submit of test_evbuffer_readln
svn:r569
2007-12-01 16:36:00 +00:00
Nick Mathewson
395dd198cb r15096@tombo: nickm | 2007-12-01 04:29:39 -0500
Test for corner-cases of re-adding non-persistent events from one another's handlers


svn:r568
2007-12-01 09:30:07 +00:00
Nick Mathewson
d73cf1e1f2 svn:r567 2007-12-01 09:29:52 +00:00
Niels Provos
876c3af7b0 add another benchmark that tests cascading events
svn:r566
2007-11-30 02:21:33 +00:00
Niels Provos
74b3db50ae always generate Date and Content-Length headers for HTTP/1.1
svn:r564
2007-11-29 06:08:24 +00:00
Niels Provos
eeb5e4cd88 a bug in the regression test of event_reinit caused epoll to fail
svn:r560
2007-11-29 02:52:32 +00:00
Niels Provos
e2e4cf1f6c more complete test for forking behavior
svn:r556
2007-11-27 06:11:28 +00:00
Nick Mathewson
ce4ee418d2 r16733@catbus: nickm | 2007-11-26 14:18:25 -0500
Add an --enable-gcc-warnings option (lifted from Tor) to the configure script.  When provided, and when we are using GCC, we enable a bunch of extra GCC warnings in the compiler.  Also, make the code all build happily with these warnings.


svn:r553
2007-11-26 19:18:49 +00:00
Nick Mathewson
6773a59721 r14953@tombo: nickm | 2007-11-25 15:56:40 -0500
Replace evbuffer_readline with a more powerful evbuffer_readln that can handle more EOL styles, and that can give useful results when there are NUL characters inside the returned values. Includes regression tests.


svn:r550
2007-11-25 21:32:26 +00:00
Nick Mathewson
2823cb0579 r14944@tombo: nickm | 2007-11-25 12:12:28 -0500
Make kqueue pass more unit tests.


svn:r544
2007-11-25 17:15:28 +00:00
Niels Provos
88897852fc provide event_reinit() to reinitialized an event_base after fork - necessary for epoll/kqueue
svn:r539
2007-11-25 06:57:59 +00:00
Nick Mathewson
8c3396b0c6 r14935@tombo: nickm | 2007-11-22 11:36:54 -0500
Always set test_ok to zero after finishing a test, and before starting one.  This turns up some failures we had been missing.


svn:r537
2007-11-22 16:41:29 +00:00
Nick Mathewson
1c23e21952 r14931@tombo: nickm | 2007-11-17 17:21:09 -0500
Patch from Scott Lamb: Implement event_{base_}loopbreak.  Includes documentation and tests.  From sf.net Feature Request 1826546.


svn:r535
2007-11-17 22:21:42 +00:00
Niels Provos
f586f42885 provide event_base_new() as a mechanism for not setting the current_global
svn:r529
2007-11-14 17:52:21 +00:00
Niels Provos
568095bfa1 srcdir for verify; from Christopher Layne
svn:r516
2007-11-12 05:34:10 +00:00
Nick Mathewson
321dfd55d4 r16585@catbus: nickm | 2007-11-10 00:16:11 -0500
Patch from Christopher Layne: Make event_del() restore previous signal handlers, not the default.


svn:r506
2007-11-10 05:18:17 +00:00
Nick Mathewson
f74e7258fd r16501@catbus: nickm | 2007-11-07 01:00:31 -0500
This is one of those patches which will either make matters far
 simpler after the bugs shake out, or will get reverted pretty quick
 once we realize that it is a stupid idea.
 
 We now post-process the config.h file into a new event-config.h file,
 whose macros are prefixed with _EVENT_ and which is thus safe for
 headers to include.  Using this, we can define replacement timeval
 manipulation functions in evutil.h, and use them uniformly through our
 code.  We can also detect which headers are needful in event.h, and
 include them as required.
 
 This is also the perfect time to remove the long-deprecated acconfig.h
 file, so that autoheader no longer warns.
 
 Should resolve the following issues:
 
 [ 1826530 ] Header files should have access to autoconf output.
 [ 1826545 ] acconfig.h is deprecated.
 [ 1826564 ] On some platforms, event.h can't be included alone.
 


svn:r492
2007-11-07 06:01:57 +00:00
Nick Mathewson
206d433638 r16497@catbus: nickm | 2007-11-07 00:01:02 -0500
Resolve issue 1826588: make event_base_free() succeed even if there are pending non-INTERNAL events still in the base.  This can leak memory and fds if used injudiciously, but at least it no longer crashes.


svn:r490
2007-11-07 05:02:21 +00:00
Nick Mathewson
bab0e6d440 r16492@catbus: nickm | 2007-11-06 23:27:32 -0500
Fix unit tests so that an outdated nameserver means "Skip IPv6 tests", not "Abort."


svn:r487
2007-11-07 04:28:54 +00:00
Nick Mathewson
7c507668d7 r16489@catbus: nickm | 2007-11-06 22:51:05 -0500
Do not use "class" as identifier in evdns.h; but use a backward-compatible fix. (Should fix bug 1826515, originally reported by Roger Clark)


svn:r486
2007-11-07 03:52:20 +00:00
Nick Mathewson
e9564eceb3 r16487@catbus: nickm | 2007-11-06 22:38:44 -0500
Remove rtsig method, as discussed in July.  It hasn't compiled for quite a while, and nobody has seemed to miss it much.  Please let us know if this was a bad call. [Tracker issue 1826539].


svn:r485
2007-11-07 03:40:26 +00:00
Niels Provos
22bd8b0094 remove last vestiges of RBTREE
svn:r471
2007-11-03 23:54:27 +00:00
Niels Provos
881731028b split libevent into two extra libraries libevent_core and libevent_extra
svn:r469
2007-11-03 23:45:38 +00:00
Niels Provos
1d3a008af3 provide hooks for outgoing pools; associate a base with a pool
svn:r468
2007-11-03 22:51:26 +00:00
Niels Provos
65236aa857 simple hooks for processing incoming and outgoing rpcs
svn:r466
2007-11-02 06:34:04 +00:00
Nick Mathewson
c91794e25d Instead of read/write in regress.c, use send/recv. Now all of the win32 regression tests pass, except for http and rpc.
svn:r461
2007-10-12 18:02:56 +00:00