kc3-lang/libevent/ChangeLog

Branch :


Log

Author Commit Date CI Message
0b9eb1bf 2009-11-03 20:40:48 Add a bufferevent function to resolve a name then connect to it. This function, bufferevent_socket_connect_hostname() can either use evdns to do the resolve, or use a new function (evutil_resolve) that uses getaddrinfo or gethostbyname, like http.c does now. This function is meant to eventually replace the hostname resolution mess in http.c. svn:r1496
0fd0255f 2009-11-03 19:54:56 Remove compat/sys/_time.h I've gone through everything that it declared to see where it was used, and it seems that we probably don't need it anywhere. Here's what it declared, and why I think we're okay dropping it. o struct timeval {} (Used all over, and we can't really get away with declaring it ourselves; we need the same definition the system uses. If we can't find struct timeval, we're pretty much sunk.) o struct timespec {} (Used in event.c, evdns.c, kqueue.c, evport.c. Of these, kqueue.c and event.c include sys/_time.h. event.c conditions its use on _EVENT_HAVE_CLOCK_GETTIME, and kqueue() only works if timespec is defined.) o TIMEVAL_TO_TIMESPEC (Used in kqueue.c, but every place with kqueue has sys/time.h) o struct timezone {} (event2/util.h has a forward declaration; only evutil.c references it and doesn't look at its contents.) o timerclear, timerisset, timercmp, timeradd, timersub (Everything now uses the evutil_timer* variants.) o ITIMER_REAL, ITIMER_VIRTUAL, ITIMER_PROF, struct itemerval (These are only used in test/regress.c, which does not include _time.h) o CLOCK_REALTIME (Only used in evdns.c, which does not include _time.h) o TIMESPEC_TO_TIMEVAL o DST_* o timespecclear, timespecisset, timespeccmp, timespecadd, timespecsub o struct clockinfo {} o CLOCK_VIRTUAL, CLOCK_PROF o TIMER_RELTIME, TIMER_ABSTIME (unused) svn:r1494
904b5721 2009-10-27 06:47:25 Avoid calling exit() during event_base_new*() Previously, each of the three make-an-event-base functions would exit under different, weird circumstances, but return NULL on others. - All three would exit on OOM sometimes. - event_base_new() and event_init() would die if all backends were disabled. - None of them would die if the socketpair() call failed. Now, only event_init() exits on failure, and it exits on every kind of failure. event_base_new() and event_base_new_with_config() never do. svn:r1472
e9ee1057 2009-10-27 04:25:45 Give event_assign a return value, and make it less inclined to exit(). We also refactor event_assign so that it is the core function, and event_set() is only the wrapper. svn:r1469
7f10fac3 2009-10-26 20:07:06 Note assert-related change in changelog svn:r1465
a8267663 2009-10-26 19:59:51 API to replace all calls to exit() with a user-supplied fatal-error handler. Also, add unit tests for logging. svn:r1462
b73ad7bc 2009-10-21 18:48:22 Treat the bitwise OR of two enum values as an int. This makes our interfaces usable from C++, which doesn't believe you can say "bufferevent_socket_nase(base, -1, BEV_OPT_CLOSE_ON_FREE|BEV_OPT_DEFER_CALLBACKS)" but which instead would demand "static_cast<bufferevent_options>(BEV_OPT_CLOSE_ON_FREE| BEV_OPT_DEFER_CALLBACKS))" for the last argument. Diagnosis and patch from Chris Davis. svn:r1456
d8164d0c 2009-10-21 07:00:14 Fix win32 connect() event handling. Christopher Davis reported: Connection failures aren't reported on Windows when using bufferevent_socket_connect, because Windows uses select's exceptfds to notify of failure, and libevent treats them like read events. Only the write event handler is currently used to handle connection events. We should think hard about this one, since it changes behavior from 1.4.x. Anything that worked on Mac/Unix before will work more consistently on Windows now... but this might break stuff that worked only on Windows, but nowhere else. Patch from Chris Davis. svn:r1454
6b22e74a 2009-10-21 03:54:00 Add locking to event_base_loop. This is harder than it sounds, since we need to make sure to release the lock around the key call to the kernel (e.g., select, epoll_wait, kevent), AND we need to make sure that none of the fields that are used in that call are touched by anything that might be running concurrently in another thread. I managed to do this pretty well for everything but poll(). With poll, I needed to introduce a copy of the event_set structure. This patch also fixes a bug in win32.c where we called realloc() instead of mm_realloc(). svn:r1450
e1c9b84a 2009-10-19 16:20:12 Fix compilation for listener.h for C++ - missing extern "C". Patch from Ferenc Szalai. svn:r1448
25af6954 2009-10-14 00:46:47 When a bufferevent_connect() call fails, give the client an error callback. Patch from Christopher Davis. svn:r1444
fc83ca3c 2009-10-14 00:46:40 Fix some crash bugs when initializing evdns svn:r1443
633f3fb7 2009-10-02 03:07:29 Add changelog for last commit svn:r1440
d5b640fc 2009-10-01 15:29:08 Apply Ka-Hing Cheung's event_base_got_[break|exit] patch, with locking and whitespace fixes. svn:r1438
8e8d94a3 2009-09-24 22:18:19 Do not drop data from evbuffer when out of memory; reported by Jacek Masiulaniec svn:r1436
18fe4008 2009-09-23 23:51:26 Forward-port: fix android compilation svn:r1435
c2ead9f1 2009-09-11 21:02:19 Treat events with fd == -1 as addable. This turns out to simplify a fair bit of logic, including the bufferevent code, and should fix bug 2850656. svn:r1431
85255a63 2009-09-11 18:47:35 Make epoll use less RAM. We do this by not allocating the maximum epoll_event array for the epoll backend at startup. Instead, we start out accepting 32 events at a time, and double the array's size when it seems that the OS is generating events faster than we're requesting them. This saves up to 374K per epoll-based event_base. Resolves bug 2839240. svn:r1428
e3f89fa2 2009-09-11 18:21:57 Add a trivial race-fix from Chromium: do not try to re-detect whether we have a monotonic clock every time we make a new event_base. svn:r1427
3b461a6d 2009-09-11 18:21:37 Treat a negative number of bytes to read as the kernel saying "I don't know." svn:r1426
f65b8b09 2009-08-19 20:55:25 On connect, call only one of BEV_EVENT_CONNECTED or writecb. Previously, if we had a socket bufferevent in connect state, we'd send both of these to indicate that the connection was done. That was broken since the point of adding BEV_EVENT_CONNECTED was so that we could distinguish "we're connected" and "we wrote something". Now, writecb is called only when A) the connection finished but the user never put the socket into a "connecting" state, or B) data was actually written. svn:r1425
2c1b0e44 2009-08-16 19:22:15 Fix build warnings and add changelog entry for evhttp patches. svn:r1424
22bd5b42 2009-08-16 16:40:42 Support sendfile on solaris: patch from Caitlin Mercer. svn:r1419
7a55c48d 2009-08-09 20:18:00 Add a few missing changelog entries svn:r1412
d4134772 2009-07-31 17:35:42 Refactor evbuffer_readln() into a search-for-eol function and an extract-line function. svn:r1404
7c688dd9 2009-07-31 14:41:45 New function to expose bufferevent.enabled svn:r1401
621aafd2 2009-07-30 22:11:23 Export sockaddr comparison functionality. svn:r1400
d1a2254b 2009-07-30 20:41:31 Fix some bugs in bufferevent_socket_connect svn:r1398
7c20a6ae 2009-07-30 17:01:21 Export an ev_socklen_t. svn:r1391
75fe762e 2009-07-30 17:00:56 Accessor function to get a listener's associated fd svn:r1390
3c99c79d 2009-07-28 19:45:54 Changelog entry for msvc fixes. svn:r1388
72ea534f 2009-07-28 19:41:57 Export evutil_str[n]casecmp as evutil_ascii_str[n]casecmp. svn:r1387
12199fa7 2009-07-28 17:11:03 Fix segfault during failed allocatino of locked evdns base. We need to comb the rest of the code to make sure that we don't blindly wrap functions in LOCK(x), UNLOCK(x) when those functions might contain a FREE(x) in the middle. Rocco Carbone found and reported this bug. svn:r1384
f8b527e6 2009-07-28 05:09:06 Fix a dumb bug where we would allocate too little memory in event_get_supported_methods(). svn:r1383
709c21c4 2009-07-28 04:03:57 Bufferevent support for openssl. This code adds a new Bufferevent type that is only compiled when the openssl library is present. It supports using an SSL object and an event alert mechanism, which can either be an fd or an underlying bufferevent. There is still more work to do: the unit tests are incomplete, and we need to support flush and shutdown much better. Sometimes events are generated needlessly: this will hose performance. There's a new encrypting proxy in sample/le-proxy.c. This code has only been tested on OSX, and nowhere else. svn:r1382
e8400a43 2009-07-20 14:55:35 Rename encode_int(64) to avoid polluting the global namespace. They're now called evtag_encode_int(64). The old names are available as macros in event2/tag_compat.h. Also, add unit tests for encode/decode_int64. svn:r1365
9fcd84d1 2009-07-14 19:19:45 Include disabled methods in event_get_supported_methods() output. Previously, events that were disabled using EVENT_NO* were left out of event_get_supported_methods(). This was wrong, broke unit tests (under some circumstances) and left the user with no good way to tell which methods were actually compiled in. Fixes bug 2821015. svn:r1344
6b4b77a2 2009-07-14 16:54:48 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
d3a8ccb8 2009-07-10 19:38:16 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
a501d683 2009-07-10 19:34:00 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
6469598e 2009-07-03 17:43:26 Allow C identifiers as struct names; allow multiple comments in .rpc files; from Zack Weinberg; plus a tiny tweak svn:r1336
fbb181d1 2009-07-03 17:31:17 Allow specifying the output filename for rpcgen; based on work by jmansion; patch from Zack Weinberg. svn:r1335
bbcc54ef 2009-07-03 17:25:45 fix preamble of rpcgen-generated files to rely on event2 includes; based on work by jmansion; patch from Zack Weinberg. svn:r1334
37d3e16c 2009-07-03 17:20:56 Raise RpcGenError in event_rpcgen.py; from jmanison and Zack Weinberg svn:r1333
342ad355 2009-06-30 14:23:18 The truncated bit is in the 3rd byte of a dns reply, not the 4th. [fwd-port] svn:r1332
d1ffba1d 2009-06-05 19:52:13 Replace some read/write instances with send/recv to work properly on win32. svn:r1324
cdaca02c 2009-05-27 15:35:00 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
8c66eb2e 2009-05-22 14:48:40 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
59cd4936 2009-05-22 14:31:07 Do not free the event base lock until we are done removing all the events. Spotted by Joachim Bauch; fixes bug 2795402. svn:r1302
59484297 2009-05-20 12:24:13 Fix a deadlock: there were some LOCKs that should have been UNLOCKs. Resolves bug 2794244 svn:r1298
66df9daf 2009-05-19 21:49:53 Add changelog for last commit svn:r1297
dc4c7b95 2009-05-15 22:44:18 Change the interface of evbuffer_add_reference: give the cleanup function more info. svn:r1294
bba69e03 2009-05-15 20:23:59 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
b4886ec8 2009-05-15 18:44:44 Trim 22 bytes from struct event on 32 bit platforms, more on 64-bit platforms. svn:r1292
31d89f27 2009-05-13 20:37:21 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
83f46e51 2009-05-13 20:36:56 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
f11dff2c 2009-05-07 03:45:51 Add and use locale-independent strcasecmp functions. svn:r1280
659d54d5 2009-05-05 02:59:26 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
0fd70978 2009-05-05 01:09:03 Add an event_get_base() function to remove one more reason to include event_struct.h svn:r1271
0e63e72a 2009-05-03 18:56:08 Nothing ever sets event_sigcb or event_gotsig any more: remove them. svn:r1270
d5ca0763 2009-05-02 16:23:29 Move event_set() and friends to event2/event_compat.h. These functions are deprecated in favor of event_assign(). svn:r1267
a109d95c 2009-05-02 16:11:06 Add changelog entry for vc++ fixes svn:r1264
2ebfd3ba 2009-04-28 19:08:17 Oops. We never actually defined event_config_set_flag(). svn:r1246
b228ff91 2009-04-25 00:15:31 remove vararg macros for accessing evrpc structs svn:r1243
5c4c13d8 2009-04-24 03:24:22 make sendfile work on freebsd svn:r1239
a5897917 2009-04-23 21:43:44 Changelog entry for r1237 svn:r1238
faa756c7 2009-04-23 21:34:37 Oops. event_config.flags was never initialized. Bugfix on 2.0.1-alpha. Found by Victor Goya. svn:r1236
9516df0e 2009-04-23 05:40:06 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
df0617f2 2009-04-23 00:21:23 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
8b7a3b36 2009-04-23 00:01:24 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
253151c5 2009-04-22 20:28:30 Detect and reject n_priorities less than 1. svn:r1222
01bda2b8 2009-04-22 20:27:21 Add forgotten changelog. svn:r1221
d3fbe7fa 2009-04-21 18:47:53 Do not free the signal index unless it was at some point allocated svn:r1217
b7907a7b 2009-04-19 01:59:25 Note dns work in changelog and whatsnew svn:r1206
a98a512b 2009-04-17 23:12:34 Add a generic way for any bufferevent to make its callback deferred svn:r1197
e3d82497 2009-04-10 14:21:53 Don't allow internal events to starve lower-priority events. This is exceptionally important with multithreaded stuff, where we use an event to notify the base that other events have been made active. If the activated events have a prioirty number greater than that of the notification event, it will starve them, and that's no good. svn:r1149
ce146eb1 2009-04-10 05:43:45 Fix parsing of queries where the encoded queries contained \r, \n or + svn:r1148
72b6ffe8 2009-04-08 03:05:42 Prevent unsupported modifications to bufferevent_sock buffers. In particular, we don't allow adding any data to end front of inbuf (we do that when we read), or removing it from the front of outbuf (we drain data only when we write). svn:r1144
747331d1 2009-04-08 03:04:39 Add freeze support to evbuffers. From the documentation: Prevent calls that modify an evbuffer from succeeding. A buffer may frozen at the front, at the back, or at both the front and the back. If the front of a buffer is frozen, operations that drain data from the front of the buffer, or that prepend data to the buffer, will fail until it is unfrozen. If the back a buffer is frozen, operations that append data from the buffer will fail until it is unfrozen. We'll use this to ensure correctness on an evbuffer when we're waiting for an overlapped IO call to finish. svn:r1143
77c80b8d 2009-02-11 17:24:11 New bind-to option to allow DNS clients to bind to arbitrary ports for their outgoing addresses. svn:r1119
c7b2f8fd 2009-02-10 19:38:05 New function to abstract SO_REUSEADDR. svn:r1102
fdf69493 2009-01-27 06:05:38 sendfile/mmap and memory reference implementation for evbuffers svn:r1057
56ea4687 2009-01-22 02:33:38 Change the semantics of timeouts in conjunction with EV_PERSIST; timeouts in that case will now repeat until deleted. svn:r1032
309fc7c4 2009-01-21 07:51:25 New functions to provide sane threading callbacks with pthreads and win32 threading implementations. svn:r1031
f6eb1f81 2009-01-19 21:53:03 Change evbuffer_read implementation to split data across chunks, and use readv when available. This should make us use less space. svn:r1024
a5901991 2009-01-19 20:37:24 Use eventfd for main-thread notification where available (i.e., linux). svn:r1023
99db0e7f 2009-01-12 20:42:19 Add a new evbuffer_write_atmost() functino to write no more than a given number of bytes to an fd. svn:r993
135591ae 2009-01-02 20:46:35 Change the type of nameserver.address from u32 to sockaddr_storage, so that we can handle nameservers at IPv6 addresses. svn:r985
0d9d5cfe 2009-01-02 20:46:12 New functions in evutil to clone inet_pton and inet_ntop, with tests. Adapted from Tor code. svn:r983
02b2b4d1 2008-12-23 16:37:01 Restructure the event backends so that they do not need to keep track of events themselves, as a side effect multiple events can use the same fd or signal. svn:r972
f700566c 2008-12-19 21:31:43 Make the http connection close detection work properly with bufferevents and fix a potential memory leak associated with it svn:r963
dd731685 2008-12-03 20:09:13 Implement increased DSN-poisoning resistance via the 0x20 hack. svn:r958
4fa4a562 2008-11-27 19:57:48 fix a typo in setting the global event base; reported by lance svn:r953
4fe25cef 2008-11-27 19:27:33 Clear the timer cache when leaving the event loop; reported by Robin Haberkorn svn:r950
5792d42f 2008-11-16 23:22:14 Allow setting of local port for evhttp connections to support millions of connections from a single system; from Richard Jones svn:r948
50202d75 2008-11-15 05:27:23 only bind the socket on connect when a local address has been provided; reported by Ajejo Sanchez svn:r946
31cfe526 2008-10-30 19:38:31 clear the timer cache on entering event loop; reported by Victor Chang svn:r944
b3d6a569 2008-09-07 23:24:54 do not remove accept-encoding header in make request svn:r938
de069b99 2008-09-05 16:29:56 On win32, errno is not the last socket error. Worse, WSAGetLastError() is not the last socket error sometimes (i.e., EWOULDBLOCK). Also, strerror() does not handle winsock errors. Therefore, event_err() and event_warn() are completely wrong for windows socket errors. Fix that. svn:r936
a710d817 2008-08-30 23:19:49 Match the query in DNS replies to the query in the request; from Vsevolod Stakhov svn:r930