3203 Commits

Author SHA1 Message Date
Joakim Soderberg
78da644f3d Fix bench_cascade program on Windows. 2013-12-16 11:35:31 +01:00
Joakim Soderberg
9bbce0b63c Only include WIN32 getopt where it is used.
getopt is only used in the benchmark tests, don't include it in the core
lib...
2013-12-16 11:34:14 +01:00
Joakim Soderberg
c259d53c82 Add copyright and licensing files for CMake modules. 2013-12-16 11:27:13 +01:00
Joakim Soderberg
dbf2b5171a Use evutil_closesocket instead. 2013-12-16 11:26:29 +01:00
Joakim Soderberg
19222e5247 Added some GCC specific options.
- Added sample applications.
- Fixed the https-client to work on Windows kind of (No cert validation).
2013-12-13 16:27:10 +00:00
Joakim Soderberg
58fcd42880 Link libm on unix platforms. 2013-12-13 12:39:50 +00:00
Joakim Soderberg
ce14defeb6 Generate a dummy evconfig-private.h so things build properly.
Windows used to have an empty file for this before.
2013-12-13 13:33:43 +01:00
Joakim Soderberg
99c1dc3233 More work on adding tests to CMake project 2013-12-12 18:21:11 +01:00
Joakim Soderberg
e9fc014c86 Add all tests and benchmarks to CMake project.
Also fixed some minor issues with what's built.
2013-12-12 16:33:20 +01:00
Joakim Soderberg
e415196a7d Initial CMake commit. 2013-12-09 18:05:32 +01:00
Joakim Soderberg
3d10541474 Fix non-C89 variable declaration.
Microsofts C compiler does not support the C99 standard, so variables has
to be declared at the start of a scope.
2013-12-09 16:58:16 +01:00
Joakim Soderberg
e6b2a26755 Fix non-C89 variable declaration.
Microsofts C compiler does not support the C99 standard, so variables has
to be declared at the start of a scope.
2013-12-09 16:54:57 +01:00
Nick Mathewson
45eba6ffd5 Rename flush_outdated_host_addresses to clear_host_addresses
"flush" can imply writing something out to a file or connection before
clearing it; "clear" always means "remove".  It's also potentially
misleading to say "outdated" here, since the function removes _all_
addresses regardless, not just certain outdated ones.

Also, don't free the lock in this function.  Also reindent the function.
2013-12-06 10:50:17 -05:00
Nick Mathewson
aeb8d345b4 Merge remote-tracking branch 'origin/pr/86' 2013-12-06 10:37:53 -05:00
Kuldeep Gupta
f03d3535af bug fix for issues #293 evdns_base_load_hosts doesn't remove outdated addresses
As mentioned at https://sourceforge.net/p/levent/bugs/293/
created a small function "evdns_base_flush_outdated_host_addresses" which removes all the previous host addresses, if user wants to clean up the list of hosts can call and use this function.
Defination of this function is part of another patch.
2013-12-06 17:06:20 +05:30
Kuldeep Gupta
954d2f94c0 bug fix for issues #293 evdns_base_load_hosts doesn't remove outdated adresses
As mentioned at https://sourceforge.net/p/levent/bugs/293/
 created a small function "evdns_base_flush_outdated_host_addresses" which removes all the previous requests of hosts , if user wants to clean up the list of hosts can call and use this function. 
Requires function declaration to be added in include/event2/dns.h
 Adding it in another patch for the same bug.
2013-12-06 16:53:16 +05:30
Ondřej Kuzník
bd41947175 Clarifications in response to merge req. comments 2013-12-05 22:45:45 +00:00
Nick Mathewson
c11e7d9191 start writing a changelog for 2.1.4-(beta?) 2013-12-05 17:25:56 -05:00
Nick Mathewson
735d838b0a Merge remote-tracking branch 'origin/patches-2.0' 2013-12-05 17:14:54 -05:00
Nick Mathewson
f9284c3e3c update the 2.0 changelog 2013-12-05 17:14:05 -05:00
Ondřej Kuzník
a7384c7824 Add an option to trigger bufferevent event callbacks 2013-12-03 23:39:13 +00:00
Ondřej Kuzník
61ee18b8b1 Add an option to trigger bufferevent I/O callbacks 2013-12-03 23:39:13 +00:00
Ondřej Kuzník
4ce242bd00 Add watermark introspection 2013-12-03 23:39:13 +00:00
Ondřej Kuzník
13a9a020e1 Document deferred eventcb behaviour 2013-12-03 23:39:13 +00:00
Ondřej Kuzník
be7bf2c768 Fix a typo 2013-12-03 23:39:13 +00:00
Nick Mathewson
ccf432b912 Try another doxygen tweak 2013-11-21 11:47:34 -05:00
Nick Mathewson
6e67b51023 Small doxygen tweaks 2013-11-21 11:30:04 -05:00
Balint Reczey
b0bd7fe1db Allow registering callback for parsing HTTP headers
Slightly changed version of Espen Jürgensen's
commit 548141e72312126fa6121f6a5f436đ251c7fb1251 for forked-daapd.
2013-11-18 18:24:15 +01:00
Julien BLACHE
8d8decf114 Add a variant of evhttp_send_reply_chunk() with a callback on evhttp_write_buffer()
evhttp_write_buffer() used by evhttp_send_reply_chunk() can take callback
executed when (part of) the buffer has been written. Using this callback to
schedule the next chunk avoids buffering large amounts of data in memory.
2013-11-18 15:39:47 +01:00
Nick Mathewson
a60632a1ec Merge remote-tracking branch 'origin/patches-2.0' 2013-11-01 14:21:54 -04:00
Nick Mathewson
3b77d62829 Avoid redundant invocations of init_extension_functions for IOCP 2013-11-01 14:20:25 -04:00
Nick Mathewson
515ed87943 Merge branch 'pr_81' 2013-10-14 11:22:40 -04:00
Azat Khuzhin
4dd500cdf4 regress_http: add tests for evhttp_connection_get_addr() 2013-10-14 11:22:30 -04:00
Azat Khuzhin
0c7f0405e3 http: implement new evhttp_connection_get_addr() api.
Basically tcp final handshake looks like this:
    (C - client, S - server)
    ACK[C] - FIN/ACK[S] - FIN/ACK[S] - ACK [C]

However there are servers, that didn't close connection like this,
while it is still _considered_ as valid, and using libevent http layer
we can do requests to such servers.

Modified handshake:
    (C - client, S - server)
    ACK[C] - RST/ACK[S] - RST/ACK[S]

And in this case we can't extract IP address from socket, because it is
already closed, and getpeername() will return: "transport endpoint is not connected".
So we need to store address that we are connecting to, after we know it,
and that is what this patch do.

I have reproduced it, however it have some extra packages.
(I will try to fix it)
https://github.com/azat/nfq-examples/blob/master/nfqnl_rst_fin.c
2013-10-14 11:22:29 -04:00
Nick Mathewson
4464bd2396 Tweak indentation 2013-10-10 16:10:50 -04:00
Nick Mathewson
206124a23c Merge remote-tracking branch 'origin/pr/79' 2013-10-10 16:09:45 -04:00
Nick Mathewson
9721137775 Merge pull request #80 from azat/tests-add-event-debug-logging-all
regress_main: logging all if env EVENT_DEBUG_LOGGING_ALL isset
2013-10-02 08:45:54 -07:00
Azat Khuzhin
611e28b6ee regress_main: logging all if env EVENT_DEBUG_LOGGING_ALL isset 2013-10-01 20:22:27 +04:00
Nicolas Martyanoff
5a5acd9a70 add a http default content type option 2013-09-30 18:11:26 +02:00
Nick Mathewson
a093137809 Merge remote-tracking branch 'origin/patches-2.0' 2013-09-19 10:48:27 -04:00
Nick Mathewson
e64a2b0b11 Fix another arc4random_buf-related warning 2013-09-19 10:48:09 -04:00
Nick Mathewson
ee063766f6 Merge remote-tracking branch 'origin/patches-2.0'
Conflicts:
	evutil_rand.c
2013-09-19 10:45:58 -04:00
Nick Mathewson
5cb3865a40 Fix a compiler warning when checking for arc4random_buf linker breakage.
Patch by Ralph Castain.
2013-09-19 10:43:54 -04:00
Nick Mathewson
0a051ef93c Merge remote-tracking branch 'rosslagerwall/tree-build' 2013-09-16 12:29:48 -04:00
Ross Lagerwall
243386ccc2 rpcgen: Generate regress.gen.[c,h] in build rather than src dir
Currently an out-of-tree build will either write to the src dir or reuse
the existing regress.gen.[c,h].  But if building from a read-only git
tree (or if the git dir is cleaned), these files will not exist and the
build fails.  So write the files to the build dir.  If the system does
not have python, the regress.gen.[c,h] will be used from the src dir if
they exist.
2013-09-15 21:48:15 +02:00
Nick Mathewson
b04d13cd72 Merge remote-tracking branch 'origin/patches-2.0' 2013-09-09 12:06:53 -04:00
Nate Rosenblum
5eb178855a Avoid racy bufferevent activation
The evhttp_send_reply method invokes evhttp_write_buffer with a
callback that may release the underlying request object and
bufferevent upon completion. This cleanup callback is invoked by the
underlying bufferevent's write callback. Improperly enabling write
events before referencing the bufferevent could lead to use after free
and memory corruption.
2013-09-09 11:59:00 -04:00
maksqwe
ebfd8a8967 Fix reinit of fds with EV_WRITE but not EV_READ.
Bugfix on 2.1.1-alpha.
2013-09-04 12:22:18 -04:00
Nick Mathewson
911abf3dd2 Check CLOCK_MONOTONIC_* at runtime if needed.
(We need this to avoid compile errors on cygwin.  Fixes github issue
75.)
2013-08-19 10:14:43 -04:00
Nick Mathewson
3807a30b03 Merge remote-tracking branch 'origin/patches-2.0'
Conflicts:
	util-internal.h
2013-08-19 10:05:14 -04:00