summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* Add a prototype for event_disable_debug_mode()disable_debug_modeSebastian Hahn2015-08-13
| | | | | | | | Exporting this function seems rather useless, as debugging mode has to be enabled early and calling this function doesn't allow it to get toggled back on later. Fixes a compile warning when using clang 3.6.
* Updated gitignoreMark Ellzey2015-06-21
|
* Merge pull request #190 from JohnOhl/evhttp-post-fixMark Ellzey2015-06-17
|\ | | | | evhttp: Fix failure to send all output data for POST/PUT requests
| * evhttp: Fix failure to send all output data for POST/PUT requestsJohn Ohl2014-11-24
| |
* | Update dns-example.Mark Ellzey2015-06-17
| | | | | | There's somebody out there who is going to have a compiler from 1986 who will complain. Better to fix c99 now.
* | Merge pull request #183 from azat/dns-exampleMark Ellzey2015-06-17
|\ \ | | | | | | Some improvements for dns-example
| * | dns-example: allow to set ns from argsAzat Khuzhin2014-11-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We can't do this using resolv.conf: $ dns-example -v -c <(echo nameserver 127.0.0.1:10053) ya.ru Because of how evutil_read_file_() works (using fstat()) And actually glibc for example will not use port from nameserver line, and because of inet_aton() it will fail if nameserver will have arbitary port: (gdb) p inet_aton("127.0.0.1", malloc(10000)) $1 = 1 (gdb) p inet_aton("127.0.0.1:53", malloc(10000)) $2 = 0 From glibc/resolv/res_init.c: if (MATCH(buf, "nameserver") && nserv < MAXNS) { struct in_addr a; cp = buf + sizeof("nameserver") - 1; while (*cp == ' ' || *cp == '\t') cp++; if ((*cp != '\0') && (*cp != '\n') && __inet_aton(cp, &a)) { statp->nsaddr_list[nservall].sin_addr = a; statp->nsaddr_list[nservall].sin_family = AF_INET; statp->nsaddr_list[nservall].sin_port = htons(NAMESERVER_PORT);
| * | dns-example: convert to getopt()Azat Khuzhin2014-11-08
| | |
* | | Merge pull request #254 from zeliard/masterMark Ellzey2015-06-07
|\ \ \ | | | | | | | | Fix bench_httpclient to support win32
| * | | Update bench_httpclient.cSeungmo Koo2015-06-07
| | | | | | | | | | | | *fixed: socket_geterror instead of WSAGetLastError
| * | | *fix: bench_httpclient to support win32zeliard2015-06-05
| | | |
* | | | Merge pull request #253 from ellzey/masterMark Ellzey2015-06-06
|\ \ \ \ | |/ / / |/| | | Set correct socklen for PF_INET6 sockaddr len
| * | | Set correct socklen for PF_INET6 sockaddr lenMark Ellzey2015-06-01
|/ / / | | | | | | | | | Reported and patched by Pankaj Sharma
* | | Merge pull request #251 from ellzey/21_err_on_thread_init_orderingMark Ellzey2015-05-29
|\ \ \ | | | | | | | | Debug mode option to error on evthread init AFTER other event calls.
| * | | Debug mode option to error on evthread init AFTER other event calls.Mark Ellzey2015-05-15
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - A handy event_enable_debug_mode() feature which will error and abort the application if any thread-aware libevent functions are called BEFORE the evthread API has been initialized (manually, or through evthread_use_windows_threads() / evthread_use_pthreads() - This is done by setting the global debug variable 'event_debug_created_threadable_ctx_' whenever the following functions are called: evthreadimpl_lock_alloc_() evthreadimpl_cond_alloc_() event_base_new_with_config() <- this checks to see if the thread callbacks are enabled first, so we have to manually set the variable. - Example: int main(int argc, char ** argv) { struct event_base * base; event_enable_debug_mode(); base = event_base_new(); evthread_use_pthreads(); return 0; } When executed, the program will throw an error and exit: [err] evthread initialization must be called BEFORE anything else!
* | | Merge pull request #245 from ellzey/21_size_and_misc_fixesMark Ellzey2015-05-13
|\ \ \ | | | | | | | | Fix garbage value in socketpair util function, stdint?
| * \ \ Merge branch 'master' into 21_size_and_misc_fixesMark Ellzey2015-05-11
| |\ \ \
| * | | | Fix garbage value in socketpair util function, stdint?Mark Ellzey2015-05-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Fixed an issue with evutil_ersatz_socketpair_, listen_addr could all be compared against with agarbage values. So just memset it before using it anywhere. * Nick might punch me in the face, but if we have stdint.h; (as in EVENT__HAVE_STDINT_H is defined), might as well use those instead of the manual [U]INT[X}_MAX/MIN muck in there now.
* | | | | Merge pull request #239 from ellzey/issue237Mark Ellzey2015-05-13
|\ \ \ \ \ | | | | | | | | | | | | Call underlying bev ctrl SET_FD on filtered bufferevents
| * \ \ \ \ Merge branch 'master' into issue237Mark Ellzey2015-05-11
| |\ \ \ \ \ | | |/ / / /
| * | | | | Call underlying bev ctrl SET_FD on filtered buffereventsMark Ellzey2015-05-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a bufferevent_filter is set on an underlying bufferevent which has ctrl functions, bufferevent_filter needs to handle this. For now I have added just BEV_CTRL_SET_FD, since this is needed for bufferevent_sock to assign file descriptors to the proper bufferevent_read/write callbacks. A good example of the problem can be found in issue #237 https://github.com/libevent/libevent/issues/237
* | | | | | Update README.mdMark Ellzey2015-05-13
| | | | | |
* | | | | | Update README.mdMark Ellzey2015-05-13
| | | | | |
* | | | | | Update README.mdMark Ellzey2015-05-13
| | | | | |
* | | | | | Update travis config for status updatesMark Ellzey2015-05-12
| | | | | |
* | | | | | Update README.mdMark Ellzey2015-05-12
| | | | | |
* | | | | | Use autotools for appveyor until cmake is fixed.Mark Ellzey2015-05-12
| | | | | |
* | | | | | Commented out a WIN32 threading / timing test for nowMark Ellzey2015-05-11
| |_|/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | - seems as if windows has some time scale issues which I am looking into. For now I am commenting out the regression test until it is fixed.
* | | | | Merge pull request #241 from ellzey/21_fix_appveyor_ssl_linkMark Ellzey2015-05-11
|\ \ \ \ \ | |_|/ / / |/| | | | Fix download link for appveyor SSL
| * | | | Fix the link for appveyor OpenSSL installer (WIN32)Mark Ellzey2015-05-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * change and move the openssl self installer off to a site we own - the old link was 404, probably due to being replaced with a newer non-vuln version. But since we are only using this installer to auto-build with on appveyor (not as a release), then having a file we don't change and own seems to be a better solution. * reduce verbosity
* | | | | Merge pull request #242 from ellzey/pullRequest118Mark Ellzey2015-05-09
|\ \ \ \ \ | |/ / / / | | / / / | |/ / / |/| | | expose bufferevent_incref/decref (with fewer modifications)
| * | | expose bufferevent_incref/decref (with fewer modifications)Mark Ellzey2015-05-06
|/ / /
* | | Fix potential fd leak in listener_read_cb()Mark Ellzey2015-04-27
| | | | | | | | | | | | | | | As pointed out by harlan_ in #libevent after running a coverity sweep. If the listener is free'd, 'new_fd' is never closed.
* | | tabGreg Hazel2015-03-24
| | |
* | | fix the return value of event_deferred_cb_schedule_Greg Hazel2015-03-24
| | |
* | | Merge pull request #220 from miniupnp/fix_warningsNick Mathewson2015-02-17
|\ \ \ | | | | | | | | Fix warnings
| * | | Fix mixed declarations and code (forbidden by ISO C90)Thomas Bernard2015-02-16
| | | |
| * | | Fix "function declaration isn’t a prototype"Thomas Bernard2015-02-16
|/ / / | | | | | | | | | add "void" to argument list
* | | Merge pull request #214 from JoakimSoderberg/appveyorNick Mathewson2015-02-05
|\ \ \ | | | | | | | | Forgot to install OpenSSL for appveyor
| * | | Forgot to install OpenSSL for appveyorJoakim Söderberg2015-02-05
| | | |
* | | | Merge pull request #117 from JoakimSoderberg/appveyorNick Mathewson2015-02-05
|\ \ \ \ | |/ / / | | | | Add support for appveyor.com windows CI
| * | | Add support for appveyor.com windows CIJoakim Söderberg2015-02-05
|/ / / | | | | | | | | | | | | | | | | | | | | | This does the same thing as Travis-CI but for windows. @nmathewson Go to: https://ci.appveyor.com/login -> Login using Github Click **+New Project** -> Choose **Github** to the left -> Find **Libevent** in the list and click **Add**
* | | Merge pull request #116 from JoakimSoderberg/fix_build_tree_cmake_configNick Mathewson2015-02-05
|\ \ \ | | | | | | | | This fixes a bug introduced in 27bd9faf498b91923296cc91643e03ec4055c230
| * | | This fixes a bug introduced in 27bd9faf498b91923296cc91643e03ec4055c230Joakim Söderberg2015-02-05
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CMake configuration files are intended to be used by other projects to find the library. Specifically the CMake find_package command can use it to find all files related to the project. The idea is to support 2 different CMake configuration files for Libevent. One if you simply build libevent that is generated for the build tree. And a second one that is generated for an install target that will be installed on the system and point to where on the system the lib files and such can be find. So for instance, in the build tree the config would set the cmake variable `LIBEVENT_INCLUDE_DIRS` to `/path/to/libevent/build/include`. And for the system config it would be set to `/usr/local/include` (or whatever target the user chose when running cmake). 27bd9faf498b91923296cc91643e03ec4055c230 changed this behavior so that both configs would point to the system wide path `/usr/local/include` This meant that projects just wanting to import directly for the build tree would fail.
* | | Merge remote-tracking branch 'azat/be-pair-fix-freeing-shared-lock-v5'Nick Mathewson2015-02-04
|\ \ \
| * | | be_pair/regress: cover use of shared lock (lock/unlock/free)Azat Khuzhin2015-01-26
| | | | | | | | | | | | | | | | | | | | For more info look at 92a359ee3adf4636db508e6c6d7179d4d59eaafc ("be_pair: release shared lock with the latest of bufferevent_pair")
| * | | event_free_debug_globals_locks(): disable lock debuggingAzat Khuzhin2015-01-26
| | | | | | | | | | | | | | | | | | | | | | | | This will allow to use library event after event_free_debug_globals_locks()/libevent_global_shutdown() without invalid read/write's.
| * | | evthread: evthreadimpl_disable_lock_debugging_() for libevent_global_shutdown()Azat Khuzhin2015-01-26
| | | |
| * | | evthread: add evthread_get_{lock,condition}_callbacks() helpersAzat Khuzhin2015-01-26
| | | |
| * | | be_pair: release shared lock with the latest of bufferevent_pairAzat Khuzhin2015-01-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Then next code sample will use free'd lock: evthread_use_pthreads(); ... assert(!bufferevent_pair_new(base, BEV_OPT_THREADSAFE, pair)); ... bufferevent_free(pair[0]); # refcnt == 0 -> unlink bufferevent_free(pair[1]); # refcnt == 0 -> unlink ... event_base_free() -> finalizers -> EVTHREAD_FREE_LOCK(bev1->lock) -> BEV_LOCK(bev2->lock) <-- *already freed* While if you will reverse the order: bufferevent_free(pair[1]); # refcnt == 0 -> unlink bufferevent_free(pair[0]); # refcnt == 0 -> unlink ... event_base_free() -> finalizers -> BEV_LOCK(bev2->lock)/!own_lock/BEV_UNLOCK(bev2->lock) -> EVTHREAD_FREE_LOCK(bev1->lock) (own_lock) It is ok now, but I guess that it will be better to relax order of freeing pairs.