]> granicus.if.org Git - libevent/log
libevent
15 years agoDefine evhttp_{bind,accept}_socket_with_handle
Nick Mathewson [Sun, 16 Aug 2009 19:22:04 +0000 (19:22 +0000)]
Define evhttp_{bind,accept}_socket_with_handle

[Patch from David Reiss]

svn:r1422

15 years agoMake evhttp_bound_socket visible, and provide an accessor to its fd
Nick Mathewson [Sun, 16 Aug 2009 19:21:57 +0000 (19:21 +0000)]
Make evhttp_bound_socket visible, and provide an accessor to its fd

Declare the previously private struct evhttp_bound_socket in
event2/http.h as an opaque struct.

Implement evhttp_bound_socket_get_fd, which returns the file descriptor
of an evhttp_bound_socket.

[Patch from David Reiss]

svn:r1421

15 years agoMinor documentation fixes
Nick Mathewson [Sun, 16 Aug 2009 19:21:50 +0000 (19:21 +0000)]
Minor documentation fixes

[Patch from David Reiss]

svn:r1420

15 years agoSupport sendfile on solaris: patch from Caitlin Mercer.
Nick Mathewson [Sun, 16 Aug 2009 16:40:42 +0000 (16:40 +0000)]
Support sendfile on solaris: patch from Caitlin Mercer.

svn:r1419

15 years agoNew function to put an SSL bufferevent into a renegotiating state.
Nick Mathewson [Fri, 14 Aug 2009 20:07:35 +0000 (20:07 +0000)]
New function to put an SSL bufferevent into a renegotiating state.

svn:r1418

15 years agoDisable whichever struct event we don't want during ssl handshaking.
Nick Mathewson [Fri, 14 Aug 2009 20:07:17 +0000 (20:07 +0000)]
Disable whichever struct event we don't want during ssl handshaking.

svn:r1417

15 years agoOnly send a connected event _after_ we've adjusted the SSL state.
Nick Mathewson [Fri, 14 Aug 2009 20:07:09 +0000 (20:07 +0000)]
Only send a connected event _after_ we've adjusted the SSL state.

This is important if the callback adjusts it to something else.

svn:r1416

15 years agoRemove an extraneous puts().
Nick Mathewson [Fri, 14 Aug 2009 20:07:01 +0000 (20:07 +0000)]
Remove an extraneous puts().

svn:r1415

15 years agotab/whitespace fixes in bufferevent_sock.c
Nick Mathewson [Fri, 14 Aug 2009 20:06:48 +0000 (20:06 +0000)]
tab/whitespace fixes in bufferevent_sock.c

Also note that write() doesn't usually say 0.

svn:r1414

15 years agoWhen running with deferred callbacks, always send the "connected" event
Nick Mathewson [Tue, 11 Aug 2009 19:47:46 +0000 (19:47 +0000)]
When running with deferred callbacks, always send the "connected" event
before any read/write events, and send timeout/error/eof events after.

svn:r1413

15 years agoAdd a few missing changelog entries
Nick Mathewson [Sun, 9 Aug 2009 20:18:00 +0000 (20:18 +0000)]
Add a few missing changelog entries

svn:r1412

15 years agoWhen bufferevent_socket_connect is called with no address, assume that our existing...
Nick Mathewson [Sun, 9 Aug 2009 20:17:29 +0000 (20:17 +0000)]
When bufferevent_socket_connect is called with no address, assume that our existing fd is connecting and put the connection into "connecting" mode.

svn:r1411

15 years agoAdd an evbuffer_search_range() to search a bounded range of a buffer
Nick Mathewson [Fri, 7 Aug 2009 17:16:52 +0000 (17:16 +0000)]
Add an evbuffer_search_range() to search a bounded range of a buffer

This can be handy when you have one search to find the end of a header
section, and then you want to find a substring within the header
section without looking at the body.

svn:r1410

15 years agoAdd a couple more evdns tests. Libevent is now, for me, at 80.02% coverage.
Nick Mathewson [Mon, 3 Aug 2009 20:50:56 +0000 (20:50 +0000)]
Add a couple more evdns tests.  Libevent is now, for me, at 80.02% coverage.

svn:r1409

15 years agoAnother DNS unit tests, to handle reissues.
Nick Mathewson [Mon, 3 Aug 2009 20:15:45 +0000 (20:15 +0000)]
Another DNS unit tests, to handle reissues.

The evdns module is now up to ~72% coverage; Libevent is up to nearly 80%.

svn:r1408

15 years agowhy say fprintf(stdout, X) when you can say printf?
Nick Mathewson [Mon, 3 Aug 2009 20:15:39 +0000 (20:15 +0000)]
why say fprintf(stdout, X) when you can say printf?

svn:r1407

15 years agoFix an annoying evdns crash bug, and add more unit tests for evdns.
Nick Mathewson [Mon, 3 Aug 2009 20:15:32 +0000 (20:15 +0000)]
Fix an annoying evdns crash bug, and add more unit tests for evdns.

svn:r1406

15 years agoUnit tests for DNS search.
Nick Mathewson [Mon, 3 Aug 2009 16:15:57 +0000 (16:15 +0000)]
Unit tests for DNS search.

svn:r1405

15 years agoRefactor evbuffer_readln() into a search-for-eol function and an extract-line function.
Nick Mathewson [Fri, 31 Jul 2009 17:35:42 +0000 (17:35 +0000)]
Refactor evbuffer_readln() into a search-for-eol function and an extract-line function.

svn:r1404

15 years agoRefactor evbuffer_readln to use evbuffer_ptr; remove old evbuffer_iterator.
Nick Mathewson [Fri, 31 Jul 2009 17:34:47 +0000 (17:34 +0000)]
Refactor evbuffer_readln to use evbuffer_ptr; remove old evbuffer_iterator.

svn:r1403

15 years agoImproved coverage for evbuffer_readln()
Nick Mathewson [Fri, 31 Jul 2009 17:34:18 +0000 (17:34 +0000)]
Improved coverage for evbuffer_readln()

svn:r1402

15 years agoNew function to expose bufferevent.enabled
Nick Mathewson [Fri, 31 Jul 2009 14:41:45 +0000 (14:41 +0000)]
New function to expose bufferevent.enabled

svn:r1401

15 years agoExport sockaddr comparison functionality.
Nick Mathewson [Thu, 30 Jul 2009 22:11:23 +0000 (22:11 +0000)]
Export sockaddr comparison functionality.

svn:r1400

15 years agoMore unit tests for Openssl, including initializing with no socket. Up to 75% coverage.
Nick Mathewson [Thu, 30 Jul 2009 20:41:41 +0000 (20:41 +0000)]
More unit tests for Openssl, including initializing with no socket. Up to 75% coverage.

svn:r1399

15 years agoFix some bugs in bufferevent_socket_connect
Nick Mathewson [Thu, 30 Jul 2009 20:41:31 +0000 (20:41 +0000)]
Fix some bugs in bufferevent_socket_connect

svn:r1398

15 years agoAdd unit tests for SSL session renegotiation.
Nick Mathewson [Thu, 30 Jul 2009 20:41:21 +0000 (20:41 +0000)]
Add unit tests for SSL session renegotiation.

This tickles the write-blocked-on-read code, and in this case turned
up a bug in it.

svn:r1397

15 years agoAlways retry SSL_write() with the same number you told it last time.
Nick Mathewson [Thu, 30 Jul 2009 20:41:12 +0000 (20:41 +0000)]
Always retry SSL_write() with the same number you told it last time.

svn:r1396

15 years agoAdd a function to extract the SSL object from a bufferevent_openssl.
Nick Mathewson [Thu, 30 Jul 2009 20:41:00 +0000 (20:41 +0000)]
Add a function to extract the SSL object from a bufferevent_openssl.

svn:r1395

15 years agoSet the SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER flag, and explain why.
Nick Mathewson [Thu, 30 Jul 2009 20:40:50 +0000 (20:40 +0000)]
Set the SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER flag, and explain why.

svn:r1394

15 years agoUse SSL_do_handshake in place of SSL_connect/SSL_accept
Nick Mathewson [Thu, 30 Jul 2009 20:40:40 +0000 (20:40 +0000)]
Use SSL_do_handshake in place of SSL_connect/SSL_accept

svn:r1393

15 years agoMore evconnlistener unit tests: bump its coverage from 71% to 83%.
Nick Mathewson [Thu, 30 Jul 2009 17:01:38 +0000 (17:01 +0000)]
More evconnlistener unit tests: bump its coverage from 71% to 83%.

svn:r1392

15 years agoExport an ev_socklen_t.
Nick Mathewson [Thu, 30 Jul 2009 17:01:21 +0000 (17:01 +0000)]
Export an ev_socklen_t.

svn:r1391

15 years agoAccessor function to get a listener's associated fd
Nick Mathewson [Thu, 30 Jul 2009 17:00:56 +0000 (17:00 +0000)]
Accessor function to get a listener's associated fd

svn:r1390

15 years agoAdd unit test for parsing addresses with bad ports.
Nick Mathewson [Thu, 30 Jul 2009 17:00:46 +0000 (17:00 +0000)]
Add unit test for parsing addresses with bad ports.

svn:r1389

15 years agoChangelog entry for msvc fixes.
Nick Mathewson [Tue, 28 Jul 2009 19:45:54 +0000 (19:45 +0000)]
Changelog entry for msvc fixes.

svn:r1388

15 years agoExport evutil_str[n]casecmp as evutil_ascii_str[n]casecmp.
Nick Mathewson [Tue, 28 Jul 2009 19:41:57 +0000 (19:41 +0000)]
Export evutil_str[n]casecmp as evutil_ascii_str[n]casecmp.

svn:r1387

15 years agoSome tweaks to Brodie Thesfield's MSVC patch.
Nick Mathewson [Tue, 28 Jul 2009 19:41:48 +0000 (19:41 +0000)]
Some tweaks to Brodie Thesfield's MSVC patch.

svn:r1386

15 years agoVarious MSVC cleanups from Brodie Thiesfield.
Nick Mathewson [Tue, 28 Jul 2009 19:41:39 +0000 (19:41 +0000)]
Various MSVC cleanups from Brodie Thiesfield.

svn:r1385

15 years agoFix segfault during failed allocatino of locked evdns base.
Nick Mathewson [Tue, 28 Jul 2009 17:11:03 +0000 (17:11 +0000)]
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

15 years agoFix a dumb bug where we would allocate too little memory in event_get_supported_metho...
Nick Mathewson [Tue, 28 Jul 2009 05:09:06 +0000 (05:09 +0000)]
Fix a dumb bug where we would allocate too little memory in event_get_supported_methods().

svn:r1383

15 years agoBufferevent support for openssl.
Nick Mathewson [Tue, 28 Jul 2009 04:03:57 +0000 (04:03 +0000)]
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

15 years agoMake "deferred callback queue" independent of event_base.
Nick Mathewson [Sun, 26 Jul 2009 01:29:39 +0000 (01:29 +0000)]
Make "deferred callback queue" independent of event_base.

This way, we can more easily have an IOCP bufferevent implementation
that does not need an event_base at all.  Woot.

svn:r1381

15 years agoFix the main/methods unit test to pass from "make verify".
Nick Mathewson [Sat, 25 Jul 2009 03:35:32 +0000 (03:35 +0000)]
Fix the main/methods unit test to pass from "make verify".

The problem was introduced when we changed the semantics of
get_supported_methods() to reflect all the methods that exist.
Previously, it had not returned methods disabled from the environment,
but the test didn't know that.

svn:r1379

15 years agocall it 2.0.2-alpha
Niels Provos [Sat, 25 Jul 2009 03:23:46 +0000 (03:23 +0000)]
call it 2.0.2-alpha

svn:r1378

15 years agoFix build on platforms (like Solaris 10, reportedly) which lack a MAP_FILE.
Nick Mathewson [Thu, 23 Jul 2009 14:48:24 +0000 (14:48 +0000)]
Fix build on platforms (like Solaris 10, reportedly) which lack a MAP_FILE.

svn:r1375

15 years agoPush coverage of event.c a little higher
Nick Mathewson [Tue, 21 Jul 2009 19:20:44 +0000 (19:20 +0000)]
Push coverage of event.c a little higher

svn:r1373

15 years agoAdd clarifying "static" to definitions of fns in event.c
Nick Mathewson [Tue, 21 Jul 2009 19:20:25 +0000 (19:20 +0000)]
Add clarifying "static" to definitions of fns in event.c

svn:r1372

15 years agoCorrect the signatures for evdns_configure_windows_nameservers(), now that it is...
Nick Mathewson [Tue, 21 Jul 2009 18:32:57 +0000 (18:32 +0000)]
Correct the signatures for evdns_configure_windows_nameservers(), now that it is exposed.

svn:r1369

15 years agoRefactor evtag tests into their own suite.
Nick Mathewson [Mon, 20 Jul 2009 14:55:51 +0000 (14:55 +0000)]
Refactor evtag tests into their own suite.

svn:r1366

15 years agoRename encode_int(64) to avoid polluting the global namespace.
Nick Mathewson [Mon, 20 Jul 2009 14:55:35 +0000 (14:55 +0000)]
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

15 years agoAdd strcasecmp tests to improve evutil coverage a bit
Nick Mathewson [Mon, 20 Jul 2009 14:55:07 +0000 (14:55 +0000)]
Add strcasecmp tests to improve evutil coverage a bit

svn:r1364

15 years agoUse a uniform strategy when a function is not working: do not expose
Nick Mathewson [Fri, 17 Jul 2009 21:47:45 +0000 (21:47 +0000)]
Use a uniform strategy when a function is not working: do not expose
it.

Rather than failing at runtime, it is better to fail at compile or
link time.

svn:r1363

15 years agoFix a simple warning
Nick Mathewson [Fri, 17 Jul 2009 21:47:35 +0000 (21:47 +0000)]
Fix a simple warning

svn:r1362

15 years agoFinish implementing new convention that whenever an optional function is declared...
Nick Mathewson [Fri, 17 Jul 2009 20:32:25 +0000 (20:32 +0000)]
Finish implementing new convention that whenever an optional function is declared, a corresponding macro is defined.

svn:r1361

15 years agoChecking for MS_WINDOWS rather than WIN32 is a Tor-ism. Fix that!
Nick Mathewson [Fri, 17 Jul 2009 20:28:03 +0000 (20:28 +0000)]
Checking for MS_WINDOWS rather than WIN32 is a Tor-ism. Fix that!

svn:r1360

15 years agoTrivial tests to exercise deferred and locking bufferevent code.
Nick Mathewson [Fri, 17 Jul 2009 20:23:12 +0000 (20:23 +0000)]
Trivial tests to exercise deferred and locking bufferevent code.

These are done as variations of test_bufferevent_connect, since that
one exercises event callbacks as well as read/write callbacks.

The coverage for bufferevent.c is now up to about 87%, from about 70%.

svn:r1358

15 years agoAdd a tinytest flag to initialize threading.
Nick Mathewson [Fri, 17 Jul 2009 20:23:05 +0000 (20:23 +0000)]
Add a tinytest flag to initialize threading.

svn:r1357

15 years agoMake evthread_use_pthreads() actually return 0 on success.
Nick Mathewson [Fri, 17 Jul 2009 20:22:56 +0000 (20:22 +0000)]
Make evthread_use_pthreads() actually return 0 on success.

svn:r1356

15 years agoDefine a macro to indicate that we have defined one of the optional evthread_use...
Nick Mathewson [Fri, 17 Jul 2009 20:22:48 +0000 (20:22 +0000)]
Define a macro to indicate that we have defined one of the optional evthread_use macros

svn:r1355

15 years agoUpdate event_tv when time jumps backwards, so that we only note each jump once. Fix...
Nick Mathewson [Fri, 17 Jul 2009 18:59:22 +0000 (18:59 +0000)]
Update event_tv when time jumps backwards, so that we only note each jump once. Fix for 1939984

svn:r1353

15 years agoOops. -1 is an integer, not a pointer.
Nick Mathewson [Fri, 17 Jul 2009 18:42:12 +0000 (18:42 +0000)]
Oops. -1 is an integer, not a pointer.

svn:r1352

15 years agoUnit tests for bufferevent_get(fd|_underlying)
Nick Mathewson [Fri, 17 Jul 2009 18:38:46 +0000 (18:38 +0000)]
Unit tests for bufferevent_get(fd|_underlying)

svn:r1351

15 years agoRemove all trailing whitespace from end-of-line.
Nick Mathewson [Fri, 17 Jul 2009 18:38:38 +0000 (18:38 +0000)]
Remove all trailing whitespace from end-of-line.

svn:r1350

15 years agoAdd a test to free_active_base to free a base with an active event.
Nick Mathewson [Fri, 17 Jul 2009 18:38:21 +0000 (18:38 +0000)]
Add a test to free_active_base to free a base with an active event.

svn:r1349

15 years agoAdd a check for event_add failure to evthread_make_base_notifiable()
Nick Mathewson [Fri, 17 Jul 2009 18:38:14 +0000 (18:38 +0000)]
Add a check for event_add failure to evthread_make_base_notifiable()

svn:r1348

15 years agoAlways hold a reference to a bufferevent when calling its callbacks.
Nick Mathewson [Fri, 17 Jul 2009 17:46:17 +0000 (17:46 +0000)]
Always hold a reference to a bufferevent when calling its callbacks.

Rationale: we hold a lock on the bufferevent when its callbacks are
executing, so we need to release the lock afterwards.  But the
callback might free the bufferevent, so unless we're holding a
reference on the bufferevent, the lock might not be there for us to
release.

svn:r1347

15 years agoDo not define _FORTIFY_SOURCE if the platform GCC already defined it for us.
Nick Mathewson [Tue, 14 Jul 2009 19:31:20 +0000 (19:31 +0000)]
Do not define _FORTIFY_SOURCE if the platform GCC already defined it for us.

svn:r1346

15 years agoInclude disabled methods in event_get_supported_methods() output.
Nick Mathewson [Tue, 14 Jul 2009 19:19:45 +0000 (19:19 +0000)]
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

15 years agoStop using C++ style comments.
Nick Mathewson [Tue, 14 Jul 2009 18:50:06 +0000 (18:50 +0000)]
Stop using C++ style comments.

svn:r1343

15 years agoConvert and expand free_active_base/event_base_new tests to avoid dbl-free. Patch...
Nick Mathewson [Tue, 14 Jul 2009 18:49:42 +0000 (18:49 +0000)]
Convert and expand free_active_base/event_base_new tests to avoid dbl-free. Patch from Zack Weinberg

svn:r1342

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