213 Commits

Author SHA1 Message Date
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
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
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
Niels Provos
22bd8b0094 remove last vestiges of RBTREE
svn:r471
2007-11-03 23:54:27 +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
Niels Provos
a4cc3d148a rename the rpc member from kill to attack; that way the
structure does not have the same name.  might find some
bugs.


svn:r449
2007-09-22 23:57:11 +00:00
Nick Mathewson
1e1f77c5b0 Make the test/ subdirectory buildable under Windows. Well, mingw at least. The tests still don't all pass, but at least now we know that.
svn:r447
2007-09-20 19:08:20 +00:00
Niels Provos
8ee20a3fa4 fix memory leaks/unitialized memory found by valgrind
svn:r418
2007-09-09 02:15:34 +00:00
Niels Provos
e678f009a8 fix a couple memory leaks; time buffer marshaling
svn:r417
2007-09-09 01:46:35 +00:00
Nick Mathewson
9c3ac4e444 r14970@catbus: nickm | 2007-09-06 20:09:39 -0400
Fix compilation on Solaris; Patch from Magne Mahre.


svn:r409
2007-09-07 00:10:15 +00:00
Niels Provos
67947ce381 provide evhttp_new and evhttp_bind_socket instead of evhttp_start;
using evhttp_new, it is possible to associate an event_base with
the http server so that multi-threaded applications can have their
own http server per thread; add appropriate testing.


svn:r397
2007-08-19 02:41:23 +00:00
Nick Mathewson
35983cd60f r14618@catbus: nickm | 2007-08-16 17:11:47 -0400
In ANSI C, int func() is a function with unspecified arguments, whereas int func(void) is a function that takes no arguments.  Using int func() to mean a function with no arguments is a C++ism, so let's not use or generate it.


svn:r395
2007-08-16 21:12:53 +00:00
Nick Mathewson
21a7e7ed67 r14498@catbus: nickm | 2007-08-10 11:58:32 -0400
Fix compilation warnings in trunk on linux with gcc 4.1.2.  In time-test.c, always include time.h, so that time() is defined.  In test/Makefile.am, put -I../compat in CPPFLAGS, and fix a typo.  In test/regress.c, cast unsigned char pointers to char* before passing them to str[n]cmp.


svn:r385
2007-08-10 15:59:31 +00:00
Niels Provos
72c479e76a remove c99 variable declarations; from Jan Kneschke
svn:r374
2007-07-30 23:54:25 +00:00
Niels Provos
f0ff792afa fixes from Joerg Sonnenberger:
http.c is a violation of the ctype(3) interface and an unused function.

test/regress_http.c are incorrect format strings.

test/regress.c uses raise(3) from signal.h.

evdns.c: evdns_error_strings is unused. The GET* macros can eat the
semicolon from the expression. pos is passed in as off_t, so just pass
that down. When assigning negativ values to unsigned variables, an
explicit cast is considered good style.


svn:r367
2007-06-30 18:58:34 +00:00
Niels Provos
621a1b2947 support freeing of evrpc base
svn:r356
2007-05-23 05:31:33 +00:00
Niels Provos
4408a5f8fc fix evbuffer_find off by one; found by Ken Cox; regression test by him
and fix by me


svn:r353
2007-04-19 03:13:12 +00:00
Niels Provos
41b7cbc381 more the signal base into the event base; this removes global state and makes signals
work better with threading; from Wouter Wijngaards
small fixes for kqueue and style by me


svn:r351
2007-03-10 06:37:53 +00:00
Niels Provos
b5d2f9a255 rolling back r339: evconfig.h does not work
svn:r341
2007-03-01 06:25:18 +00:00
Niels Provos
8d94bd03eb signal fixes from scott lamb
svn:r340
2007-02-28 04:29:18 +00:00
Niels Provos
127c260bb7 make evconfig.h available as installed header file; not
really ideal but good enough for me; from Nick Mathewson


svn:r339
2007-02-28 04:02:29 +00:00
Niels Provos
f554234f74 first stab at an rpc layer; this breaks the regression test.
svn:r254
2006-11-16 07:36:20 +00:00
Niels Provos
64c76fbea4 typo in kqueue delete; from Bert JW Regeer
svn:r232
2006-09-03 21:12:59 +00:00
Niels Provos
07c3fb5067 add a simple regression test for the DNS resolver; requires internet access.
do some KNF on evdns.c; add checks to prevent potential buffer overflows.
fix one memory leak.


svn:r230
2006-08-27 20:04:20 +00:00
Niels Provos
6813af3f11 move http related prototypes to evhttp.h
svn:r214
2006-06-10 22:37:21 +00:00
Niels Provos
147b71e33c rename http.h to http-internal.h - i wish there were decent refactoring tools
for open source programmers.


svn:r213
2006-06-10 22:28:21 +00:00
Niels Provos
60192b4625 improved/well-completely rewritten rtsig support by Mathew Mills; fix some
cases where regress would not pass on Linux


svn:r204
2006-02-26 20:18:35 +00:00
Niels Provos
a3bb4a035f I often need some very simple HTTP functionality, so this is a first stab
at integrating something really simple with HTTP.  The interface is still
evolving as I start messing with it.  Not all the interfaces are properly
exported yet.

I am also trying to figure out how to intelligently hide the details about
the different structures from users, so that that things can be changed
around later.


svn:r196
2006-01-22 05:08:50 +00:00
Niels Provos
139e862e32 do not remove kq inkernel flag before event_del gets to it; bug reported by
Tassilo von Parseval; also add a test for this behavior.


svn:r190
2005-12-17 20:15:25 +00:00
Niels Provos
8d1317d71c add evbuffer_add_vprintf interface from artur grabowski; add some testing
svn:r188
2005-12-06 03:26:28 +00:00
Niels Provos
50f7aaef6b make it compile on mac os x
svn:r183
2005-09-09 06:56:12 +00:00
Niels Provos
3b9b3f6b7e don't spam on stderr
svn:r182
2005-09-02 05:34:14 +00:00
Niels Provos
b4ab56dc04 support for arrays on structs.
svn:r178
2005-08-28 23:48:16 +00:00
Niels Provos
c4e60994a2 including the tagging code that is required by event_rpcgen.py; test the
new functionality.


svn:r172
2005-08-22 01:34:34 +00:00
Niels Provos
bc9b24876b make it compile on solaris
svn:r142
2005-04-04 00:10:17 +00:00
Niels Provos
1e128e2d05 fix bug that broke poll/select stuff
svn:r141
2005-04-03 07:46:27 +00:00
Niels Provos
d85d47f8ca devpoll improvements from Andrew Danforth <adanforth@gmail.com>
svn:r137
2005-03-29 07:16:52 +00:00
Niels Provos
256460459e provide more base-based functions :-)
svn:r125
2004-12-01 20:04:54 +00:00
Niels Provos
8773c4c96c make libevent thread-safe; first cut
svn:r122
2004-11-25 09:50:18 +00:00