119 Commits

Author SHA1 Message Date
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
Nick Mathewson
3550be9387 r15331@catbus: nickm | 2007-09-25 11:46:52 -0400
Add EVPORT to test.sh script.  Patch from Trond Norbye.


svn:r454
2007-09-25 15:50:50 +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
Nick Mathewson
c895ee4618 r15094@catbus: nickm | 2007-09-18 10:52:11 -0400
Patch from Christopher Lane: Make regress.gen.* buildable from outside source directory.


svn:r434
2007-09-18 15:11:53 +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
Niels Provos
98f9616bf4 support setting local address on an evhttp_connection
svn:r416
2007-09-07 02:49:46 +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
Nick Mathewson
a36d4a930d r14699@catbus: nickm | 2007-08-20 10:42:57 -0400
Use $top_srcdir and $srcdir variables to refer to source paths in Makefile.am.  This makes it possible to build libevent from a separate directory.  Patch from Kelly Anderson.


svn:r400
2007-08-20 14:44: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
cd6dd9516d add a proper test for filtering new lines in headers
svn:r384
2007-08-06 21:00:49 +00:00
Niels Provos
073d359061 fix an embarassing bug where strchr was used with a cstring instead of a char
svn:r383
2007-08-06 20:53:33 +00:00
Niels Provos
8ea5ffefc3 request dispatching fix from Elliot Foster
svn:r382
2007-08-05 02:15:10 +00:00
Niels Provos
9e0333a8d5 include config.h if HAVE_CONFIG_H from Jan Kneschke
svn:r375
2007-07-30 23:56:05 +00:00
Niels Provos
72c479e76a remove c99 variable declarations; from Jan Kneschke
svn:r374
2007-07-30 23:54:25 +00:00
Niels Provos
7c6df310c9 remove c++ comments from Jan Kneschke
svn:r373
2007-07-30 23:53:10 +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
3794534feb change the signature of the client rpc callback to pass in an rpc status; the status
allows us to determine if an error happened.


svn:r363
2007-05-29 05:38:58 +00:00
Niels Provos
621a1b2947 support freeing of evrpc base
svn:r356
2007-05-23 05:31:33 +00:00
Niels Provos
0c2808246a support removing of http callbacks and removing of registered RPCs
svn:r355
2007-05-23 05:20:59 +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
50edb19f17 EVRPC_MAKE_REQUEST needs the pool argument
svn:r349
2007-03-05 07:28:15 +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
faf5f73a69 dns server support from Nick Mathewson; tiny tweaks
to the regression test from me to make it run on
systems where stack variables get initialized with
trash.


svn:r321
2007-02-08 16:39:15 +00:00
Niels Provos
121efe6530 small bug fixes to AAAA resolution and regression test; from Nick Mathewson!
we love regresson tests.



svn:r319
2007-01-27 08:38:51 +00:00
Niels Provos
d5d04949e3 fix http server so it can accept on high ports;
better warning messages for getnameinfo;
from Philip Lewis


svn:r310
2007-01-18 06:28:42 +00:00
Niels Provos
0db257b828 rename strlcpy so that it does not conflict with other tests; from
Nick Mathewson.


svn:r306
2007-01-03 07:11:17 +00:00