]> granicus.if.org Git - libevent/log
libevent
15 years agoMake event_del(E) block while E is running in another thread.
Nick Mathewson [Tue, 14 Jul 2009 16:54:48 +0000 (16:54 +0000)]
Make event_del(E) block while E is running in another thread.

This gives you the property that once you have called event_del(E),
you know that E is no longer running or pending or active at all, and
so it is safe to delete the resource used by E's callback.

svn:r1341

15 years agoPatch from Zack Weinberg: normalize perror() tt functions and add tt_fail/tt_abort_printf
Nick Mathewson [Mon, 13 Jul 2009 20:03:00 +0000 (20:03 +0000)]
Patch from Zack Weinberg: normalize perror() tt functions and add tt_fail/tt_abort_printf

svn:r1340

15 years agoUse -version-info, not -release.
Nick Mathewson [Mon, 13 Jul 2009 20:02:49 +0000 (20:02 +0000)]
Use -version-info, not -release.

Patch from Zack Weinberg.  His description:

This one might be a little more controversial. Libtool's -release and
-version-info options are supposed to be mutually exclusive, but it doesn't
either enforce that or make it sufficiently clear in the manual. Using
both makes the -version-info switch ineffective; you will get sonames like
"libevent-2.0.so.1", "libevent-2.1.so.1", etc., even though version 2.1
will presumably be backward ABI compatible with 2.0.

This patch just takes out the -release switches and bumps the -version-info
value to 2:0:0 so that people looking at the files in /usr/lib will not be
confused (it'll be "libevent.so.2"). This does change the soname, but the
current release is labeled an alpha, and it would be better to stop using
both switches as soon as possible, before someone over at libtool
headquarters decides to enforce the mutual exclusivity here...

Note that libevent_pthreads is not being linked with any versioning
switches I didn't change that because I wasn't sure whether it was
intentional.

svn:r1339

15 years agoChange use of AC_CHECK_LIB to AC_SEARCH_LIBS.
Nick Mathewson [Fri, 10 Jul 2009 19:38:16 +0000 (19:38 +0000)]
Change use of AC_CHECK_LIB to AC_SEARCH_LIBS.

Patch from Zack Weinberg.  His message:

  This one eliminates all use of AC_CHECK_LIB in the configure script.
  AC_CHECK_LIB has a serious flaw: if the library you mention *exists*
  but is not *necessary* for the function you want, it adds it to
  $(LIBS) anyway.  This was fine in the days of static libraries,
  because the linker would ignore an .a library that didn't contain
  anything you needed. However, ELF shared libraries are different
  (let's not get into why): the linker will by default record a
  DT_NEEDED entry for every shared object mentioned on the link
  command line. Thus, every use of AC_CHECK_LIB is a potential
  unnecessary DT_NEEDED, making extra work for the dynamic loader. The
  cure is simply to use AC_SEARCH_LIBS instead; it first tries to find
  the function you ask for in libc, and only if that doesn't work does
  it try to use the extra library you mention.

  For the same reasons, pkg-config .pc files should distinguish
  between the libraries to use for shared linkage (Libs:) and the
  additional libraries needed for static linkage (Libs.private:). I
  have also made that correction in this patch. I also took the
  opportunity to clean up the substitution variables a little and make
  absolutely sure that the core library does not get linked against
  zlib.

svn:r1338

15 years agoAdd a lock/unlock pair inside the event callbacks in bufferevents.
Nick Mathewson [Fri, 10 Jul 2009 19:34:00 +0000 (19:34 +0000)]
Add a lock/unlock pair inside the event callbacks in bufferevents.

This fixes part of bug 2800642, I believe, though there is still a
general race condition in multithreaded use of events that we need to
think about.

svn:r1337

15 years agoAllow C identifiers as struct names; allow multiple comments in .rpc files; from...
Niels Provos [Fri, 3 Jul 2009 17:43:26 +0000 (17:43 +0000)]
Allow C identifiers as struct names; allow multiple comments in .rpc files; from Zack Weinberg; plus a tiny tweak

svn:r1336

15 years agoAllow specifying the output filename for rpcgen; based on work by jmansion; patch...
Niels Provos [Fri, 3 Jul 2009 17:31:17 +0000 (17:31 +0000)]
Allow specifying the output filename for rpcgen; based on work by jmansion; patch from Zack Weinberg.

svn:r1335

15 years agofix preamble of rpcgen-generated files to rely on event2 includes; based on work...
Niels Provos [Fri, 3 Jul 2009 17:25:45 +0000 (17:25 +0000)]
fix preamble of rpcgen-generated files to rely on event2 includes; based on work by jmansion; patch from Zack Weinberg.

svn:r1334

15 years agoRaise RpcGenError in event_rpcgen.py; from jmanison and Zack Weinberg
Niels Provos [Fri, 3 Jul 2009 17:20:56 +0000 (17:20 +0000)]
Raise RpcGenError in event_rpcgen.py; from jmanison and Zack Weinberg

svn:r1333

15 years agoThe truncated bit is in the 3rd byte of a dns reply, not the 4th. [fwd-port]
Nick Mathewson [Tue, 30 Jun 2009 14:23:18 +0000 (14:23 +0000)]
The truncated bit is in the 3rd byte of a dns reply, not the 4th. [fwd-port]

svn:r1332

15 years agoFix type on freebsd sendfile. Patch from navin seshadri. Fixes bug 2811991
Nick Mathewson [Thu, 25 Jun 2009 15:22:36 +0000 (15:22 +0000)]
Fix type on freebsd sendfile. Patch from navin seshadri.  Fixes bug 2811991

svn:r1330

15 years agoWhen our IP address changes, do not break all existing dns server sockets. Patch...
Nick Mathewson [Wed, 24 Jun 2009 22:40:15 +0000 (22:40 +0000)]
When our IP address changes, do not break all existing dns server sockets.  Patch from Christopher Davis

svn:r1329

15 years agoFix compile on cygwin. This isnt the solution I would like: I would prefer to get...
Nick Mathewson [Thu, 11 Jun 2009 19:09:08 +0000 (19:09 +0000)]
Fix compile on cygwin.  This isnt the solution I would like: I would prefer to get pton and ntop to work even when AF_INET6 is not defined.

svn:r1326

15 years agoAdd sometimes-needed header to regress_bufferevent.c
Nick Mathewson [Thu, 11 Jun 2009 17:55:08 +0000 (17:55 +0000)]
Add sometimes-needed header to regress_bufferevent.c

svn:r1325

15 years agoReplace some read/write instances with send/recv to work properly on win32.
Nick Mathewson [Fri, 5 Jun 2009 19:52:13 +0000 (19:52 +0000)]
Replace some read/write instances with send/recv to work properly on win32.

svn:r1324

15 years agoFix compilation problems in win32.c
Nick Mathewson [Thu, 28 May 2009 20:44:04 +0000 (20:44 +0000)]
Fix compilation problems in win32.c

svn:r1322

15 years agoMake the headers compile happily with pedantic C compilers.
Nick Mathewson [Thu, 28 May 2009 15:58:28 +0000 (15:58 +0000)]
Make the headers compile happily with pedantic C compilers.

Original message from SF patch 2797966:

    While commas at the end of enumerator lists are valid in c99, they
    are not valid +in c89 nor in c++. When using gcc/g++ with the
    -pedantic flag, users will +receive a warning (gcc) or an
    error(g++) when including the event2/event.h and
    +event2/bufferevent.h. The errors look something like

    event2/event.h:159: error: comma at end of enumerator list

Patch from Akita Noek on Sourceforge.

svn:r1321

15 years agoSpell-check the the headers
Nick Mathewson [Thu, 28 May 2009 15:47:15 +0000 (15:47 +0000)]
Spell-check the the headers

svn:r1320

15 years agosmall doc fix.
Nick Mathewson [Wed, 27 May 2009 23:48:59 +0000 (23:48 +0000)]
small doc fix.

svn:r1319

15 years agoActivate fd events in a pseudorandom order on older backends.
Nick Mathewson [Wed, 27 May 2009 15:35:00 +0000 (15:35 +0000)]
Activate fd events in a pseudorandom order on older backends.

New backends like poll and kqueue and so on add fds to the queue in
the order that they are triggered.  But the select backend currently
activates low-numbered fds first, whereas the poll and win32 backends
currently favor whatever fds have been on for the longest.  This is no
good for fairness.

svn:r1318

15 years agoDefer EOF on paired bufferevent correctly.
Nick Mathewson [Mon, 25 May 2009 23:11:31 +0000 (23:11 +0000)]
Defer EOF on paired bufferevent correctly.

svn:r1317

15 years agoConsistently say "eventcb" instead of "errorcb"
Nick Mathewson [Mon, 25 May 2009 23:11:20 +0000 (23:11 +0000)]
Consistently say "eventcb" instead of "errorcb"

svn:r1316

15 years agoAdd documentation for bufferevent-internal.h stuff
Nick Mathewson [Mon, 25 May 2009 23:10:47 +0000 (23:10 +0000)]
Add documentation for bufferevent-internal.h stuff

svn:r1315

15 years agoAdd a generic mechanism to implement timeouts in bufferevents.
Nick Mathewson [Mon, 25 May 2009 23:10:23 +0000 (23:10 +0000)]
Add a generic mechanism to implement timeouts in bufferevents.

Paired and asynchronous bufferevents didn't do timeouts, and filtering
bufferevents gave them funny semantics.  Now they all should all work
in a way consistent with what socket bufferevents do now: a [read/write]
timeout triggers if [reading/writing] is enabled, and if the timeout is
set, and the right amount of time passes without any data getting
[added to the input buffer/drained from the output buffer].

svn:r1314

15 years agoAdd requirement in configure.in for autoconf 2.59c. Needed for ssize_t test. Spotte...
Nick Mathewson [Mon, 25 May 2009 20:02:51 +0000 (20:02 +0000)]
Add requirement in configure.in for autoconf 2.59c.  Needed for ssize_t test.  Spotted by Yang Hong.

svn:r1313

15 years agoAdd missing windows include in time-test.c
Nick Mathewson [Fri, 22 May 2009 20:11:29 +0000 (20:11 +0000)]
Add missing windows include in time-test.c

svn:r1311

15 years agowork around missing __func__ in sample code
Nick Mathewson [Fri, 22 May 2009 19:11:59 +0000 (19:11 +0000)]
work around missing __func__ in sample code

svn:r1310

15 years agoUse ev_ssize_t in place of ssize_t *everywhere*.
Nick Mathewson [Fri, 22 May 2009 19:11:48 +0000 (19:11 +0000)]
Use ev_ssize_t in place of ssize_t *everywhere*.

svn:r1309

15 years agoFix a potentially very annoying evdns bug that we found in Tor.
Nick Mathewson [Fri, 22 May 2009 18:20:59 +0000 (18:20 +0000)]
Fix a potentially very annoying evdns bug that we found in Tor.

Generally speaking, it way better to event_assign() an event when you
allocate it than to assign it before every time you event_add it: if
it is already event_add()ed, the assign will mess it up so that it
doesn't _look_ added, and event_add() will insert a second copy.
Later, event_del() will only delete the second copy.  Eventually, the
event_base will have a dangling pointer to freed memory.  Ouch!

svn:r1307

15 years agoFix some small win32 build issues on trunk.
Nick Mathewson [Fri, 22 May 2009 17:20:05 +0000 (17:20 +0000)]
Fix some small win32 build issues on trunk.

svn:r1306

15 years agoTry to contain the failure when we are running without socketpair().
Nick Mathewson [Fri, 22 May 2009 14:48:40 +0000 (14:48 +0000)]
Try to contain the failure when we are running without socketpair().

Some win32 systems (mostly those using Kaspersky, it would seem)
prevent us from faking socketpair().  This makes our signal
notification code just not work.  Our response since 1.4 has been to
assert.  For users who would rather work without signals than not work
at all, this has been a regression from 1.3e.

This patch makes adding signal events fail in this case; there's no
reason to kill the whole process.

svn:r1303

15 years agoDo not free the event base lock until we are done removing all the events. Spotted...
Nick Mathewson [Fri, 22 May 2009 14:31:07 +0000 (14:31 +0000)]
Do not free the event base lock until we are done removing all the events.  Spotted by Joachim Bauch; fixes bug 2795402.

svn:r1302

15 years agoDo not assume we know the value for FD_CLOEXEC.
Nick Mathewson [Thu, 21 May 2009 20:59:17 +0000 (20:59 +0000)]
Do not assume we know the value for FD_CLOEXEC.

svn:r1301

15 years agoDisallow backlog==0 in evconnlistener_new_bind().
Nick Mathewson [Thu, 21 May 2009 20:59:09 +0000 (20:59 +0000)]
Disallow backlog==0 in evconnlistener_new_bind().

svn:r1300

15 years agoUse the native "struct iovec" as our "struct evbuffer_iovec" when available, so we...
Nick Mathewson [Thu, 21 May 2009 20:59:00 +0000 (20:59 +0000)]
Use the native "struct iovec" as our "struct evbuffer_iovec" when available, so we do not need to copy more pointers than necessary.

svn:r1299

15 years agoFix a deadlock: there were some LOCKs that should have been UNLOCKs. Resolves bug...
Nick Mathewson [Wed, 20 May 2009 12:24:13 +0000 (12:24 +0000)]
Fix a deadlock: there were some LOCKs that should have been UNLOCKs.  Resolves bug 2794244

svn:r1298

15 years agoAdd changelog for last commit
Nick Mathewson [Tue, 19 May 2009 21:49:53 +0000 (21:49 +0000)]
Add changelog for last commit

svn:r1297

15 years agoReplace reserve/commit with new iovec-based interface. Add a new evbuffer_peek.
Nick Mathewson [Tue, 19 May 2009 21:39:35 +0000 (21:39 +0000)]
Replace reserve/commit with new iovec-based interface.  Add a new evbuffer_peek.

svn:r1296

15 years agoTweak the evconnlistener interface a little.
Nick Mathewson [Mon, 18 May 2009 16:15:56 +0000 (16:15 +0000)]
Tweak the evconnlistener interface a little.

svn:r1295

15 years agoChange the interface of evbuffer_add_reference: give the cleanup function more info.
Nick Mathewson [Fri, 15 May 2009 22:44:18 +0000 (22:44 +0000)]
Change the interface of evbuffer_add_reference: give the cleanup function more info.

svn:r1294

15 years agoNew semantics for evbuffer_cb_set_flags().
Nick Mathewson [Fri, 15 May 2009 20:23:59 +0000 (20:23 +0000)]
New semantics for evbuffer_cb_set_flags().

Previously, set_flags() would replace all previous user-visible flags.
Now it just sets the flags, and there is a clear_flags() function to
clear other flags.

svn:r1293

15 years agoTrim 22 bytes from struct event on 32 bit platforms, more on 64-bit platforms.
Nick Mathewson [Fri, 15 May 2009 18:44:44 +0000 (18:44 +0000)]
Trim 22 bytes from struct event on 32 bit platforms, more on 64-bit platforms.

svn:r1292

15 years agoWe were distributing the wrong event-config.h with our source distributions. Fix...
Nick Mathewson [Fri, 15 May 2009 01:38:23 +0000 (01:38 +0000)]
We were distributing the wrong event-config.h with our source distributions.  Fix that.

svn:r1289

15 years agoNote problems with some newer evbuffer interfaces.
Nick Mathewson [Thu, 14 May 2009 18:06:41 +0000 (18:06 +0000)]
Note problems with some newer evbuffer interfaces.

svn:r1286

15 years agoActually, do not provide a compatibility name "EVBUFFER_CONNECTED": there is no old...
Nick Mathewson [Thu, 14 May 2009 18:06:29 +0000 (18:06 +0000)]
Actually, do not provide a compatibility name "EVBUFFER_CONNECTED": there is no old code that uses it.

svn:r1285

15 years agoAdd a "ctrl" mechanism to bufferevents for property access.
Nick Mathewson [Wed, 13 May 2009 20:37:21 +0000 (20:37 +0000)]
Add a "ctrl" mechanism to bufferevents for property access.

OpenSSL uses something like this to implement get/set access for
properties on its BIOs, so that it doesn't need to add a pair of
get/set functions to the vtable struct for every new abstract property
it provides an accessor for.

Doing this lets us make bufferevent_setfd abstract, and implement an
abstract bufferevent_getfd.

svn:r1284

15 years agoDo not use the "evbuffer_" prefix to denote parts of bufferevents.
Nick Mathewson [Wed, 13 May 2009 20:36:56 +0000 (20:36 +0000)]
Do not use the "evbuffer_" prefix to denote parts of bufferevents.

This is a bit of an interface doozy, but it's really needed in order
to be able to document this stuff without apologizing it.  This patch
does the following renamings:

   evbuffercb -> bufferevent_data_cb
   everrorcb -> bufferevent_event_cb
   EVBUFFER_(READ,WRITE,...) -> BEV_EVENT_(...)
   EVBUFFER_(INPUT,OUTPUT) -> bufferevent_get_(input,output)

All the old names are available in event2/bufferevent_compat.h

svn:r1283

15 years agoAdd and use locale-independent strcasecmp functions.
Nick Mathewson [Thu, 7 May 2009 03:45:51 +0000 (03:45 +0000)]
Add and use locale-independent strcasecmp functions.

svn:r1280

15 years agoAddition to bufferevent_async unit test
Nick Mathewson [Wed, 6 May 2009 02:34:10 +0000 (02:34 +0000)]
Addition to bufferevent_async unit test

svn:r1279

15 years agoFix bufferevent_async to use lock/unlock, not unlock/unlock.
Nick Mathewson [Wed, 6 May 2009 02:33:37 +0000 (02:33 +0000)]
Fix bufferevent_async to use lock/unlock, not unlock/unlock.

You do NOT want to know what windows does when you unlock a lock that is already unlocked.

svn:r1278

15 years agoMake unit tests for bufferevent_async compile and _almost_ work.
Nick Mathewson [Tue, 5 May 2009 16:52:37 +0000 (16:52 +0000)]
Make unit tests for bufferevent_async compile and _almost_ work.

Either I need to make the callbacks get deferred in a base with no events (doable), or I need to make it okay to call launch_read from inside the callback for read (tricky).

svn:r1277

15 years agoAdd a trival start of a be_async test.
Nick Mathewson [Tue, 5 May 2009 15:36:28 +0000 (15:36 +0000)]
Add a trival start of a be_async test.

svn:r1276

15 years agoAdd missing include to buffer_iocp.c
Nick Mathewson [Tue, 5 May 2009 15:30:58 +0000 (15:30 +0000)]
Add missing include to buffer_iocp.c

svn:r1275

15 years agoAdd a constructor for bufferevent_async.
Nick Mathewson [Tue, 5 May 2009 14:18:14 +0000 (14:18 +0000)]
Add a constructor for bufferevent_async.

svn:r1274

15 years agooops; do not forget to distribute listener.h
Nick Mathewson [Tue, 5 May 2009 03:01:24 +0000 (03:01 +0000)]
oops; do not forget to distribute listener.h

svn:r1273

15 years agoAdd new code to make and accept connections.
Nick Mathewson [Tue, 5 May 2009 02:59:26 +0000 (02:59 +0000)]
Add new code to make and accept connections.

This is stuff that it's easy to get wrong (as I noticed when writing
bench_http), and that takes up a fair amount of space (see http.c).
Also, it's something that we'll eventually want to abstract to use
IOCP, where available.

svn:r1272

15 years agoAdd an event_get_base() function to remove one more reason to include event_struct.h
Nick Mathewson [Tue, 5 May 2009 01:09:03 +0000 (01:09 +0000)]
Add an event_get_base() function to remove one more reason to include event_struct.h

svn:r1271

15 years agoNothing ever sets event_sigcb or event_gotsig any more: remove them.
Nick Mathewson [Sun, 3 May 2009 18:56:08 +0000 (18:56 +0000)]
Nothing ever sets event_sigcb or event_gotsig any more: remove them.

svn:r1270

15 years agoRevise regress_pthreads.c to not use event_set
Nick Mathewson [Sat, 2 May 2009 16:24:23 +0000 (16:24 +0000)]
Revise regress_pthreads.c to not use event_set

svn:r1269

15 years agoUse fewer _compat.h headers in our own code.
Nick Mathewson [Sat, 2 May 2009 16:24:05 +0000 (16:24 +0000)]
Use fewer _compat.h headers in our own code.

svn:r1268

15 years agoMove event_set() and friends to event2/event_compat.h.
Nick Mathewson [Sat, 2 May 2009 16:23:29 +0000 (16:23 +0000)]
Move event_set() and friends to event2/event_compat.h.

These functions are deprecated in favor of event_assign().

svn:r1267

15 years agoMake evrpc use event2/rpc*.h, not evrpc.h
Nick Mathewson [Sat, 2 May 2009 16:23:08 +0000 (16:23 +0000)]
Make evrpc use event2/rpc*.h, not evrpc.h

svn:r1266

15 years agoRemove some duplicated includes in evdns.c
Nick Mathewson [Sat, 2 May 2009 16:22:55 +0000 (16:22 +0000)]
Remove some duplicated includes in evdns.c

svn:r1265

15 years agoAdd changelog entry for vc++ fixes
Nick Mathewson [Sat, 2 May 2009 16:11:06 +0000 (16:11 +0000)]
Add changelog entry for vc++ fixes

svn:r1264

15 years agoInitial core implementation of bufferevent_async.c
Nick Mathewson [Fri, 1 May 2009 01:42:33 +0000 (01:42 +0000)]
Initial core implementation of bufferevent_async.c

svn:r1263

15 years agoMore msvc build tweaks.
Nick Mathewson [Fri, 1 May 2009 00:54:14 +0000 (00:54 +0000)]
More msvc build tweaks.

svn:r1262

15 years agoApparently MSVC lacks a ssize_t. Define an ev_ssize_t for headers, and make ssize_t...
Nick Mathewson [Thu, 30 Apr 2009 23:56:53 +0000 (23:56 +0000)]
Apparently MSVC lacks a ssize_t.  Define an ev_ssize_t for headers, and make ssize_t work elsewhere.

svn:r1261

15 years agoCompilation fixes for vc++ 2008 express. Not the end of them.
Nick Mathewson [Thu, 30 Apr 2009 23:49:15 +0000 (23:49 +0000)]
Compilation fixes for vc++ 2008 express.  Not the end of them.

svn:r1260

15 years agoInitial unit test for overlapped evbuffer usage. It's lame, but it doesn't crash...
Nick Mathewson [Thu, 30 Apr 2009 20:48:40 +0000 (20:48 +0000)]
Initial unit test for overlapped evbuffer usage.  It's lame, but it doesn't crash any more.

svn:r1259

15 years agoGet launch_read and launch_write to (apparently) work.
Nick Mathewson [Thu, 30 Apr 2009 20:47:38 +0000 (20:47 +0000)]
Get launch_read and launch_write to (apparently) work.

svn:r1258

15 years agoFix a reversed check in upcast_evbuffer
Nick Mathewson [Thu, 30 Apr 2009 19:56:23 +0000 (19:56 +0000)]
Fix a reversed check in upcast_evbuffer

svn:r1257

15 years agoBeef up the events in the last test a little.
Nick Mathewson [Thu, 30 Apr 2009 19:20:42 +0000 (19:20 +0000)]
Beef up the events in the last test a little.

svn:r1256

15 years agoOops: actually commit changes to build and use regress_iocp
Nick Mathewson [Thu, 30 Apr 2009 19:05:43 +0000 (19:05 +0000)]
Oops: actually commit changes to build and use regress_iocp

svn:r1255

15 years agoFirst tests for IOCP loop, and related fixes.
Nick Mathewson [Thu, 30 Apr 2009 19:04:44 +0000 (19:04 +0000)]
First tests for IOCP loop, and related fixes.

The fixes are: a shutdown mode that works, and a way to activate an
arbitrary event_overlapped.

svn:r1254

15 years agoMake environment-variable tests work on win32, which has only one method and lacks...
Nick Mathewson [Thu, 30 Apr 2009 18:05:33 +0000 (18:05 +0000)]
Make environment-variable tests work on win32, which has only one method and lacks (un)setenv.

svn:r1253

15 years agoNote a place we might do better about lock releasing.
Nick Mathewson [Wed, 29 Apr 2009 20:48:43 +0000 (20:48 +0000)]
Note a place we might do better about lock releasing.

svn:r1252

15 years agofix a typo in a comment
Nick Mathewson [Wed, 29 Apr 2009 20:48:35 +0000 (20:48 +0000)]
fix a typo in a comment

svn:r1251

15 years agoCatch attempts to event_base_once a persistent event.
Nick Mathewson [Wed, 29 Apr 2009 20:48:28 +0000 (20:48 +0000)]
Catch attempts to event_base_once a persistent event.

svn:r1250

15 years agoClarify semantics on event_pending()
Nick Mathewson [Wed, 29 Apr 2009 20:48:21 +0000 (20:48 +0000)]
Clarify semantics on event_pending()

svn:r1249

15 years agoPatch from Eric Hopper: the test for EVENT_BASE_FLAG_IGNORE_ENV was inverted.
Nick Mathewson [Tue, 28 Apr 2009 19:08:36 +0000 (19:08 +0000)]
Patch from Eric Hopper: the test for EVENT_BASE_FLAG_IGNORE_ENV was inverted.

svn:r1248

15 years agoUnit test for disabling events with EVENT_NO*, and for EVENT_BASE_FLAG_IGNORE_ENV.
Nick Mathewson [Tue, 28 Apr 2009 19:08:27 +0000 (19:08 +0000)]
Unit test for disabling events with EVENT_NO*, and for EVENT_BASE_FLAG_IGNORE_ENV.

svn:r1247

15 years agoOops. We never actually defined event_config_set_flag().
Nick Mathewson [Tue, 28 Apr 2009 19:08:17 +0000 (19:08 +0000)]
Oops. We never actually defined event_config_set_flag().

svn:r1246

15 years agoFix compile: #elif FOO is not the same as #elif defined(FOO).
Nick Mathewson [Tue, 28 Apr 2009 19:08:07 +0000 (19:08 +0000)]
Fix compile: #elif FOO is not the same as #elif defined(FOO).

svn:r1245

15 years agomove more code directly into evrpc.c; provide backwards compatible vararg macros
Niels Provos [Sat, 25 Apr 2009 00:15:55 +0000 (00:15 +0000)]
move more code directly into evrpc.c; provide backwards compatible vararg macros

svn:r1244

15 years agoremove vararg macros for accessing evrpc structs
Niels Provos [Sat, 25 Apr 2009 00:15:31 +0000 (00:15 +0000)]
remove vararg macros for accessing evrpc structs

svn:r1243

15 years agorefactor evrpc.h header filer
Niels Provos [Sat, 25 Apr 2009 00:15:09 +0000 (00:15 +0000)]
refactor evrpc.h header filer

svn:r1242

15 years agorefactor evrpc.h header filer
Niels Provos [Sat, 25 Apr 2009 00:14:58 +0000 (00:14 +0000)]
refactor evrpc.h header filer

svn:r1241

15 years agomake sendfile work on freebsd
Niels Provos [Fri, 24 Apr 2009 03:24:22 +0000 (03:24 +0000)]
make sendfile work on freebsd

svn:r1239

15 years agoChangelog entry for r1237
Nick Mathewson [Thu, 23 Apr 2009 21:43:44 +0000 (21:43 +0000)]
Changelog entry for r1237

svn:r1238

15 years agoFix for evbuffer_read() when all data fits in penultimate chain.
Nick Mathewson [Thu, 23 Apr 2009 21:41:53 +0000 (21:41 +0000)]
Fix for evbuffer_read() when all data fits in penultimate chain.

Previously we were reading into the next-to-last chain, but incrementing
the fullness of the last.  Bug found by Victor Goya.

svn:r1237

15 years agoOops. event_config.flags was never initialized. Bugfix on 2.0.1-alpha. Found by...
Nick Mathewson [Thu, 23 Apr 2009 21:34:37 +0000 (21:34 +0000)]
Oops. event_config.flags was never initialized.  Bugfix on 2.0.1-alpha.  Found by Victor Goya.

svn:r1236

15 years agoMake main/methods test pass on systems where only one backend exists.
Nick Mathewson [Thu, 23 Apr 2009 18:08:42 +0000 (18:08 +0000)]
Make main/methods test pass on systems where only one backend exists.

svn:r1235

15 years agoFix win32 compilation issues.
Nick Mathewson [Thu, 23 Apr 2009 18:04:50 +0000 (18:04 +0000)]
Fix win32 compilation issues.

svn:r1234

15 years agoAdd missing case to make http.c compile with warnings enabled.
Nick Mathewson [Thu, 23 Apr 2009 06:27:58 +0000 (06:27 +0000)]
Add missing case to make http.c compile with warnings enabled.

svn:r1232

15 years agoFix c89 bugs reported by Cory Stup.
Nick Mathewson [Thu, 23 Apr 2009 05:40:06 +0000 (05:40 +0000)]
Fix c89 bugs reported by Cory Stup.

Others may remain.  I wasn't able to get gcc --std=c89 to build libevent
at all, so I don't know what compiler the original reporter is using here.

Note that this change requires us to disable the part of our rpc code
that uses variadic macros when using a non-gcc compiler.  This is a
problem if we want our rpc api to be portable.

svn:r1231

15 years agoAdd missing regress_minheap.c file
Nick Mathewson [Thu, 23 Apr 2009 05:20:08 +0000 (05:20 +0000)]
Add missing regress_minheap.c file

svn:r1230

15 years agoAdd a randomized test for heap correctness.
Nick Mathewson [Thu, 23 Apr 2009 00:33:37 +0000 (00:33 +0000)]
Add a randomized test for heap correctness.

svn:r1229

15 years agoUse signal.h, not sys/signal.h.
Nick Mathewson [Thu, 23 Apr 2009 00:21:23 +0000 (00:21 +0000)]
Use signal.h, not sys/signal.h.

This is patch 2673214 from mmadia.  It is correct, since we unconditionally
include signal.h in many other places, and only sometimes include sys/signal.h.
It is necessary to compile on Haiku, I'm told.

svn:r1228

15 years agoFix min_heap_erase when we remove an element from the middle of the heap.
Nick Mathewson [Thu, 23 Apr 2009 00:01:24 +0000 (00:01 +0000)]
Fix min_heap_erase when we remove an element from the middle of the heap.

Previously, we could lose the heap property when we removed an item
whose parent was greater than the last element in the heap.  We would
replace the removed item with the last element, and consider shifting
it down, but we wouldn't consider shifting it up.

Patch from Marko Kreen.

svn:r1226

15 years agoMake version test ignore the bottom byte of the version number.
Nick Mathewson [Thu, 23 Apr 2009 00:01:14 +0000 (00:01 +0000)]
Make version test ignore the bottom byte of the version number.

svn:r1225