]>
granicus.if.org Git - libevent/log
Nick Mathewson [Fri, 22 May 2009 20:11:29 +0000 (20:11 +0000)]
Add missing windows include in time-test.c
svn:r1311
Nick Mathewson [Fri, 22 May 2009 19:11:59 +0000 (19:11 +0000)]
work around missing __func__ in sample code
svn:r1310
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
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
Nick Mathewson [Fri, 22 May 2009 17:20:05 +0000 (17:20 +0000)]
Fix some small win32 build issues on trunk.
svn:r1306
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
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
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
Nick Mathewson [Thu, 21 May 2009 20:59:09 +0000 (20:59 +0000)]
Disallow backlog==0 in evconnlistener_new_bind().
svn:r1300
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
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
Nick Mathewson [Tue, 19 May 2009 21:49:53 +0000 (21:49 +0000)]
Add changelog for last commit
svn:r1297
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
Nick Mathewson [Mon, 18 May 2009 16:15:56 +0000 (16:15 +0000)]
Tweak the evconnlistener interface a little.
svn:r1295
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
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
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
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
Nick Mathewson [Thu, 14 May 2009 18:06:41 +0000 (18:06 +0000)]
Note problems with some newer evbuffer interfaces.
svn:r1286
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
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
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
Nick Mathewson [Thu, 7 May 2009 03:45:51 +0000 (03:45 +0000)]
Add and use locale-independent strcasecmp functions.
svn:r1280
Nick Mathewson [Wed, 6 May 2009 02:34:10 +0000 (02:34 +0000)]
Addition to bufferevent_async unit test
svn:r1279
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
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
Nick Mathewson [Tue, 5 May 2009 15:36:28 +0000 (15:36 +0000)]
Add a trival start of a be_async test.
svn:r1276
Nick Mathewson [Tue, 5 May 2009 15:30:58 +0000 (15:30 +0000)]
Add missing include to buffer_iocp.c
svn:r1275
Nick Mathewson [Tue, 5 May 2009 14:18:14 +0000 (14:18 +0000)]
Add a constructor for bufferevent_async.
svn:r1274
Nick Mathewson [Tue, 5 May 2009 03:01:24 +0000 (03:01 +0000)]
oops; do not forget to distribute listener.h
svn:r1273
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
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
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
Nick Mathewson [Sat, 2 May 2009 16:24:23 +0000 (16:24 +0000)]
Revise regress_pthreads.c to not use event_set
svn:r1269
Nick Mathewson [Sat, 2 May 2009 16:24:05 +0000 (16:24 +0000)]
Use fewer _compat.h headers in our own code.
svn:r1268
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
Nick Mathewson [Sat, 2 May 2009 16:23:08 +0000 (16:23 +0000)]
Make evrpc use event2/rpc*.h, not evrpc.h
svn:r1266
Nick Mathewson [Sat, 2 May 2009 16:22:55 +0000 (16:22 +0000)]
Remove some duplicated includes in evdns.c
svn:r1265
Nick Mathewson [Sat, 2 May 2009 16:11:06 +0000 (16:11 +0000)]
Add changelog entry for vc++ fixes
svn:r1264
Nick Mathewson [Fri, 1 May 2009 01:42:33 +0000 (01:42 +0000)]
Initial core implementation of bufferevent_async.c
svn:r1263
Nick Mathewson [Fri, 1 May 2009 00:54:14 +0000 (00:54 +0000)]
More msvc build tweaks.
svn:r1262
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
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
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
Nick Mathewson [Thu, 30 Apr 2009 20:47:38 +0000 (20:47 +0000)]
Get launch_read and launch_write to (apparently) work.
svn:r1258
Nick Mathewson [Thu, 30 Apr 2009 19:56:23 +0000 (19:56 +0000)]
Fix a reversed check in upcast_evbuffer
svn:r1257
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
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
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
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
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
Nick Mathewson [Wed, 29 Apr 2009 20:48:35 +0000 (20:48 +0000)]
fix a typo in a comment
svn:r1251
Nick Mathewson [Wed, 29 Apr 2009 20:48:28 +0000 (20:48 +0000)]
Catch attempts to event_base_once a persistent event.
svn:r1250
Nick Mathewson [Wed, 29 Apr 2009 20:48:21 +0000 (20:48 +0000)]
Clarify semantics on event_pending()
svn:r1249
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
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
Nick Mathewson [Tue, 28 Apr 2009 19:08:17 +0000 (19:08 +0000)]
Oops. We never actually defined event_config_set_flag().
svn:r1246
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
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
Niels Provos [Sat, 25 Apr 2009 00:15:31 +0000 (00:15 +0000)]
remove vararg macros for accessing evrpc structs
svn:r1243
Niels Provos [Sat, 25 Apr 2009 00:15:09 +0000 (00:15 +0000)]
refactor evrpc.h header filer
svn:r1242
Niels Provos [Sat, 25 Apr 2009 00:14:58 +0000 (00:14 +0000)]
refactor evrpc.h header filer
svn:r1241
Niels Provos [Fri, 24 Apr 2009 03:24:22 +0000 (03:24 +0000)]
make sendfile work on freebsd
svn:r1239
Nick Mathewson [Thu, 23 Apr 2009 21:43:44 +0000 (21:43 +0000)]
Changelog entry for r1237
svn:r1238
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
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
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
Nick Mathewson [Thu, 23 Apr 2009 18:04:50 +0000 (18:04 +0000)]
Fix win32 compilation issues.
svn:r1234
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
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
Nick Mathewson [Thu, 23 Apr 2009 05:20:08 +0000 (05:20 +0000)]
Add missing regress_minheap.c file
svn:r1230
Nick Mathewson [Thu, 23 Apr 2009 00:33:37 +0000 (00:33 +0000)]
Add a randomized test for heap correctness.
svn:r1229
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
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
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
Nick Mathewson [Thu, 23 Apr 2009 00:01:05 +0000 (00:01 +0000)]
bump the numeric version; this is not the same as the alpha.
svn:r1224
Nick Mathewson [Thu, 23 Apr 2009 00:00:55 +0000 (00:00 +0000)]
Somehow free_active_base was using the socketpair, but not saying it needed it. How did this ever work?
svn:r1223
Nick Mathewson [Wed, 22 Apr 2009 20:28:30 +0000 (20:28 +0000)]
Detect and reject n_priorities less than 1.
svn:r1222
Nick Mathewson [Wed, 22 Apr 2009 20:27:21 +0000 (20:27 +0000)]
Add forgotten changelog.
svn:r1221
Nick Mathewson [Wed, 22 Apr 2009 19:41:23 +0000 (19:41 +0000)]
Add a flag to disable checking the EVENT_* environment variables.
svn:r1220
Nick Mathewson [Wed, 22 Apr 2009 15:38:50 +0000 (15:38 +0000)]
Add a missing "static".
svn:r1219
Nick Mathewson [Tue, 21 Apr 2009 18:48:05 +0000 (18:48 +0000)]
Make sure the test case for mem_functions hits strdup too.
svn:r1218
Nick Mathewson [Tue, 21 Apr 2009 18:47:53 +0000 (18:47 +0000)]
Do not free the signal index unless it was at some point allocated
svn:r1217
Nick Mathewson [Tue, 21 Apr 2009 18:47:35 +0000 (18:47 +0000)]
Add a basic test for set_mem_functions
svn:r1216
Nick Mathewson [Tue, 21 Apr 2009 18:47:23 +0000 (18:47 +0000)]
Fix the documentation of event_pending.
svn:r1215
Nick Mathewson [Tue, 21 Apr 2009 18:47:02 +0000 (18:47 +0000)]
Add a test for event_pending; especially the timeout part.
svn:r1214
Nick Mathewson [Tue, 21 Apr 2009 18:46:43 +0000 (18:46 +0000)]
Unit tests for event_base_once.
svn:r1213
Nick Mathewson [Tue, 21 Apr 2009 18:46:30 +0000 (18:46 +0000)]
Refactor test wrappers to divide legacy items from useful stuff.
svn:r1212
Nick Mathewson [Tue, 21 Apr 2009 18:46:11 +0000 (18:46 +0000)]
Add unit tests for version methods and feature-based backend selection
svn:r1211
Nick Mathewson [Tue, 21 Apr 2009 18:45:59 +0000 (18:45 +0000)]
Call the main testcases "main", not "legacy".
svn:r1210
Nick Mathewson [Tue, 21 Apr 2009 16:17:59 +0000 (16:17 +0000)]
Format microseconds correctly in bench_httpclient
svn:r1209
Nick Mathewson [Sun, 19 Apr 2009 20:54:12 +0000 (20:54 +0000)]
Update copyright notices, add some missing license statements
svn:r1208
Niels Provos [Sun, 19 Apr 2009 13:33:52 +0000 (13:33 +0000)]
defer-internal.h was missing from dist; so our first tar ball did not even compile. ouch.
svn:r1207
Nick Mathewson [Sun, 19 Apr 2009 01:59:25 +0000 (01:59 +0000)]
Note dns work in changelog and whatsnew
svn:r1206
Nick Mathewson [Sun, 19 Apr 2009 01:59:09 +0000 (01:59 +0000)]
Make dns callbacks run deferred
svn:r1205
Nick Mathewson [Sun, 19 Apr 2009 01:58:54 +0000 (01:58 +0000)]
Add locks to evdns.
svn:r1204
Nick Mathewson [Sun, 19 Apr 2009 01:58:41 +0000 (01:58 +0000)]
Use new-style headers in evdns.c
svn:r1203
Nick Mathewson [Sun, 19 Apr 2009 01:58:26 +0000 (01:58 +0000)]
Do not try to double-free the nameserver in regression test
svn:r1202
Nick Mathewson [Sat, 18 Apr 2009 18:28:18 +0000 (18:28 +0000)]
More tweaks to http stress-tester
svn:r1201
Nick Mathewson [Sat, 18 Apr 2009 18:27:56 +0000 (18:27 +0000)]
fix a misindent
svn:r1200