470 Commits

Author SHA1 Message Date
Niels Provos
640c61bac9 deal with out of memory situations for realloc
svn:r429
2007-09-15 00:53:47 +00:00
Nick Mathewson
82153e6e92 r15025@catbus: nickm | 2007-09-10 10:54:46 -0400
More DNS standard correctness changes: we preserve the CD flag,not the TC flag on responses.  When we get a nonstandard query, we should say "NOTIMPL" rather than ignoring it.


svn:r428
2007-09-10 14:56:00 +00:00
Nick Mathewson
8b39254926 r15024@catbus: nickm | 2007-09-10 10:49:15 -0400
Fix evdns_resolve_reverse_ipv6() so buffer is bug enough, and so the string ends with ".ip6.arpa" rather than "..ip6.arpa".


svn:r427
2007-09-10 14:55:55 +00:00
Nick Mathewson
c396c767e2 r15023@catbus: nickm | 2007-09-10 10:46:16 -0400
Add a missing begin-comment to the DNS_USE_OPENSSL_FOR_ID code in evdns.c.


svn:r426
2007-09-10 14:55:50 +00:00
Niels Provos
fc1211ed8a fix another memory leak
svn:r424
2007-09-10 01:37:57 +00:00
Niels Provos
7c66bf33e1 fix a memory leak in the dns server; found by valgrind
svn:r422
2007-09-10 01:30:11 +00:00
Niels Provos
babd622f7a make allocating array members in event_rpcgen more efficient, but doubling the size of
available slots every time we run out.


svn:r421
2007-09-09 03:10:16 +00:00
Niels Provos
e2f564116e Fix a memory leak in which failed HTTP connections whould not free the request object
svn:r419
2007-09-09 02:33:10 +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
23866b7657 Another tweak on the date patch: win32 has no gmtime_r, but its gmtime() function uses thread-local storage for safety. Backportable.
svn:r414
2007-09-07 01:18:53 +00:00
Nick Mathewson
003698c0df r14975@catbus: nickm | 2007-09-06 21:00:38 -0400
Oops; we were already including sys/time.h.  Remove the redundant include.


svn:r413
2007-09-07 01:03:01 +00:00
Nick Mathewson
8d5ef326ba r14974@catbus: nickm | 2007-09-06 20:59:14 -0400
Changes to http.c: Add a Date header on replies if there is none already set.  Also, include time.h unconditionally to be sure that struct tm is declared: every platform has time.h; the conditional should have been for sys/time.h.


svn:r412
2007-09-07 01:02:56 +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
ff9e1af68f demote most warnings to debug messages;
execute callback later to allow freeing of connection object


svn:r407
2007-09-02 01:33:38 +00:00
Niels Provos
11a0a9e42f allow \r or \n individually to separate HTTP headers instead of
the standard "\r\n"; from Charles Kerr.


svn:r406
2007-08-25 18:47:22 +00:00
Niels Provos
49e01ff789 include event.h in evhttp.h; found by Charles Kerr
svn:r404
2007-08-25 18:42:42 +00:00
Nick Mathewson
5f04e3b7b5 Bump version number in svn trunk to 1.3.99.
svn:r403
2007-08-24 01:08:39 +00:00
Niels Provos
9a99bab0db let's try to keep a log of changes; as suggested by Nick
svn:r401
2007-08-23 15:36:38 +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
41c69fc335 fix typo in comments
svn:r399
2007-08-19 17:26:02 +00:00
Nick Mathewson
3d2320b218 r14697@catbus: nickm | 2007-08-19 13:24:39 -0400
Remove redundant typedef of socklen_t in evdns.c: On windows, it is already defined by autoconf in config.h.


svn:r398
2007-08-19 17:25:52 +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
12fe087e12 r14505@catbus: nickm | 2007-08-10 12:35:52 -0400
Fix win32 build errors (reported by Phobos): mingw gcc seems to dislike unnamed function parameters.


svn:r390
2007-08-10 16:37:33 +00:00
Nick Mathewson
7d821580e8 Fix compile warning on osx: the udata field in struct kevent is supposed to be void*, not intptr_t.
svn:r387
2007-08-10 16:31:02 +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
b7ff0248c7 fix memory leak; found by Elliot F
svn:r378
2007-07-31 00:32:00 +00:00
Niels Provos
5e0ac7f239 check for sys/select.h
svn:r377
2007-07-31 00:25:22 +00:00
Niels Provos
aa106169a0 use AM_CLFAGS from Jan Kneschke
svn:r376
2007-07-31 00:21:04 +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
10267216a6 initalize ev_res from Scott Lamb
svn:r372
2007-07-30 23:49:00 +00:00
Niels Provos
3ad6b47e03 make clock_monotonic work; do not use default timeout;
from Scott Lamb, plus some fixes from me.


svn:r371
2007-07-30 22:41:00 +00:00
Niels Provos
d7918e7963 drop illegal header values
svn:r370
2007-07-30 21:27:33 +00:00
Niels Provos
b15d715cbc make event_rpcgen.py use the uint_ types;
make event.h include stdint.h (wonder which OS that will break)


svn:r369
2007-07-06 03:36:31 +00:00
Niels Provos
753ffa563b convert u_int8_t types to uint8_t types
svn:r368
2007-06-30 19:08:46 +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
aa5c806888 make it compile on solaris; from Andrei Nigmatulin
svn:r366
2007-06-16 03:23:15 +00:00
Niels Provos
d1848a8872 include config.h
svn:r365
2007-06-14 04:38:42 +00:00
Niels Provos
cf5c1fcebb made the wrong fd non-blocking in accept_socket; from szjwwu
svn:r364
2007-06-08 16:06:23 +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
f0d0559c3e allow DNS server to get access to the IP address for the requestor; from tor cvs via Nick Mathewson
svn:r362
2007-05-28 21:21:59 +00:00
Niels Provos
5d3b6a8387 fail quicker on bad replies; from tor cvs via Nick Mathewson
svn:r361
2007-05-28 21:20:57 +00:00
Niels Provos
d06ab8569e fix bug where req was freed and dereferenced afterwards; from tor cvs via Nick Mathewson
svn:r360
2007-05-28 21:19:18 +00:00