2073 Commits

Author SHA1 Message Date
Nick Mathewson
4a5c82d617 Use AM_CPPFLAGS in sample/Makefile.am, not AM_CFLAGS
Reported by Dagobert Michelsen.
2011-07-15 10:20:01 -04:00
Nick Mathewson
d5bd604a8b Add doxygen to .gitignore 2011-07-05 14:57:08 -04:00
Nick Mathewson
caf695afdb Fix up test_evutil_snprintf 2011-07-05 14:55:09 -04:00
Nick Mathewson
af6a05f723 Merge remote-tracking branch 'github/20_size_fmt' into patches-2.0 2011-07-05 14:51:24 -04:00
Nick Mathewson
341e1b03a8 Merge branch 'doxygen' into patches-2.0 2011-07-05 13:04:30 -04:00
Nick Mathewson
aea0555b76 Update Doxyfile to produce more useful output 2011-07-05 13:01:31 -04:00
Nick Mathewson
2888faccd1 Revise the event/evbuffer/bufferevent doxygen for clarity and accuracy 2011-07-05 13:01:07 -04:00
Nick Mathewson
49d1136205 Fix select.c compilation on systems with no NFDBITS 2011-07-05 00:15:51 -04:00
Nick Mathewson
e7fe92709e Merge remote-tracking branch 'github/20_global_locks_init' into patches-2.0 2011-07-04 12:16:08 -04:00
Mark Ellzey
f87f56894d Speed up invoke_callbacks on evbuffers when there are no callbacks
This fixes a performance regression against 1.4
2011-07-04 11:47:24 -04:00
Joachim Bauch
e050703d47 Fix bug in SSL bufferevents backed by a bev with a write high-watermarks
Original mail:

   the logic that handles write watermarks in "bio_bufferevent_write"
   is not working. It currently doesn't write any data if the high
   watermark is *above* the amount of data to write (i.e. when there
   is actually enough room available).
2011-07-04 11:36:14 -04:00
Nicholas Marriott
8ee9f9c1cf Fix a few warnings on OpenBSD
- redeclaration of dst_size

- arpa/inet.h requires netinet/in.h first

- don't use a local with the same name as a global - it isn't needed so
  remove it
2011-07-02 21:49:07 -04:00
Nick Mathewson
e934096490 Fix AIX build issue with TAILQ_FOREACH definition
Reported by Lawnstein Chan.
2011-06-22 11:22:35 -04:00
Harlan Stenn
e23cda3dae Don't install event_rpcgen.py when --disable-libevent-install is used 2011-06-21 10:05:28 -04:00
Nick Mathewson
79ff78d2e7 Merge branch '20_kqueue_badf' into patches-2.0 2011-06-16 13:19:43 -04:00
Nick Mathewson
b031adf112 Don't break when building tests from git without python installed 2011-06-14 14:52:53 -04:00
Nick Mathewson
812d42e886 Simplify windows commandname logic in tinytest
Instead of using a dup'd pointer, let's use a static array, so we
don't need to free it.  This patch also makes tinytest build on
non-windows again.
2011-06-11 01:39:31 -04:00
Ed Day
57def3460a Fix tinytest invocation from windows shell
Original post:

  This post is in response to a posting last December on a Windows
  regression fork failure ([Libevent-users] Re: Libevent 2.0.10-stable
  is released by Dongsheng Song).  I noticed the question was not
  answered and I recently experienced the same error myself when
  trying to run the Windows regression tests myself.

  I checked the return status from the CreateProcess call and found it
  was "file not found".  This led me to look at the command-line I was
  using which was .\regress in a Visual Studio 2008 command prompt
  window.  Windows could not find the file because it did not have the
  .exe extension on the end.  The code that builds the command should
  be modified to ensure the extension is present.
2011-06-11 01:31:59 -04:00
Nick Mathewson
3203f88c5f Use the correct printf args when formatting size_t
Based on a patch from Mansour Moufid
2011-06-08 17:37:45 -04:00
Mansour Moufid
446cc7a0a1 Check if the evhttp_new_object' function in http.c' returns NULL. 2011-06-08 16:46:21 -04:00
Nick Mathewson
1fd34ab424 Report kqueue ebadf, epipe, and eperm as EV_READ events
When asked to add one side of a pipe, and the other side has been
closed, kqueue on NetBSD will say EBADF; kqueue on FreeBSD will say
EPIPE, and kqueue on OpenBSD will say EPERM.  So treat all of these
as EV_READ events, to give the user an opportunity to notice that
the pipe is closed.

Diagnosed by Nicholas Marriott and Dale Rahn; based on a patch by
Nicholas Marriott.
2011-06-08 15:34:52 -04:00
Nick Mathewson
09fe97da3b Replace an assertion for event_base_free(NULL) with a check-and-warn
event_base_free(NULL) means "free the current event base".
Previously, it would assert if there was no 'current' base.  Now it
just warns and returns.

Reported by Gilad Benjamini
2011-06-08 14:24:45 -04:00
Nick Mathewson
89d5e09e4d Add some missing checks for mm_calloc failures
Found by Gilad Benjamini
2011-06-08 14:23:37 -04:00
Nick Mathewson
4461f1a096 Fix incorrect results from evbuffer_search_eol(EOL_LF)
Our evbuffer_strchr() function [which was only used for
search_eol(EOL_LF) could give incorrect results if it found its answer
in the first chunk but didn't start searching from the front of the
chunk.

Also, this patch adds unit tests for evbuffer_search_eol, particularly
in those cases that evbuffer_readln() tests didn't exercise.
2011-06-06 15:11:28 -04:00
Nick Mathewson
60c1426f2c Bump version to 2.0.12-stable-dev 2011-06-04 21:36:34 -04:00
Nick Mathewson
281ab5c5f3 Merge branch 'patches-2.0' of ssh://levent.git.sourceforge.net/gitroot/levent/libevent into patches-2.0 2011-06-04 21:12:53 -04:00
Nick Mathewson
452a8342f5 tweak date on changelog 2011-06-04 21:11:09 -04:00
Nick Mathewson
be5e857584 Merge branch 'patches-2.0' of ssh://levent.git.sourceforge.net/gitroot/levent/libevent into patches-2.0 2011-06-04 10:34:14 -04:00
Nick Mathewson
c355583750 Changelog and new credits for 2.0.12-stable release-2.0.12-stable 2011-06-03 17:08:30 -04:00
Nick Mathewson
7283facdb9 Bump version to 2.0.12-stable. Not release just yet 2011-06-03 17:08:14 -04:00
Nick Mathewson
bdfb8330df Fix regress_ssl.c build on openbsd 2011-06-03 17:06:17 -04:00
Nick Mathewson
27ce38b618 Avoid a segfault when all methods are disabled or broken 2011-06-01 17:28:21 -04:00
Nick Mathewson
d54d3fc40d cygwin: make it possible to build DLLs
Patch from Brian Koehmstedt
2011-06-01 13:48:02 -04:00
Nick Mathewson
87c0dff6aa Merge branch '20_select_nfds' into patches-2.0 2011-05-30 12:06:36 -04:00
Nick Mathewson
d90149d4b6 Fix a fencepost bug in the select backend
This bug would sometimes lead us to looking one bit off the end of
the fdset arrays, and trying to activate a (nonexistent) event if
that bit was set.

Found by Harlann Stenn.  Fixes a test failure on OpenSolaris.
2011-05-30 11:53:19 -04:00
Nick Mathewson
f47c15e7ba Make the new http_connect_fail_test use a multicast addr, not broadcast
Turns out that FreeBSD does _not_ give a ENETUNREACH error when
told to make a TCP socket to 255.255.255.255, but it is quite happy
to do so for 239.10.20.30.  So that's what we'll do.

Found by Robert Ransom and Dave Hart.
2011-05-27 23:30:06 -04:00
Peter Rosin
816115a17e InitializeCriticalSectionAndSpinCount requires _WIN32_WINNT >= 0x0403. 2011-05-27 23:14:10 -04:00
Nick Mathewson
203ba2742f Fix a couple of signed/unsigned warnings in http.c 2011-05-27 15:08:25 -04:00
Nick Mathewson
c11c6fcd82 Disable main/many_events_slow_add with evport backend
In 2.0 and earlier, evport only reports up to 8 events at a time, which
confuses this test badly.
2011-05-27 14:58:21 -04:00
Nick Mathewson
dbb3c65288 Fix compilation. 2011-05-26 17:43:17 -04:00
Nick Mathewson
f0c9b51cc7 Merge branch 'intcmp_overflow_fixes' into patches-2.0 2011-05-26 17:34:15 -04:00
Mark Ellzey
1814ae9677 updated EV_S(s)IZE definitions 2011-05-26 17:33:18 -04:00
Mark Ellzey
84560fc4dc Added overflow checks in evhttp_read_body and evhttp_get_body 2011-05-26 17:33:18 -04:00
Mark Ellzey
a27927229f Added several checks for under/overflow conditions in evhttp_handle_chunked_read 2011-05-26 17:33:18 -04:00
Sebastian Hahn
d1b2d11bb5 Always use evutil_snprintf, even if OS provides it
In test/tinytest_local.h we can't redefine snprintf if the OS has it
defined already.
2011-05-26 02:05:54 +02:00
Peter Rosin
0de87fe69c Use evutil_gettimeofday instead of relying on the system gettimeofday. 2011-05-25 19:44:06 -04:00
Peter Rosin
3d768dc967 Fix winsock2.h #include issues with MSVC
Define WIN32_LEAN_AND_MEAN, so that windows.h does not bring in
winsock.h which in turn makes it impossible to #include <winsock2.h>
(at least with MSVC)
2011-05-25 19:44:06 -04:00
Peter Rosin
8fa030c032 Make sure TINYTEST_LOCAL is defined when building tinytest.c 2011-05-25 19:44:06 -04:00
Peter Rosin
fe93022a66 unistd.h and sys/time.h might not exist. 2011-05-25 19:44:06 -04:00
Peter Rosin
70be7d17e4 MSVC does not provide S_ISDIR, so provide it manually. 2011-05-25 19:44:06 -04:00