]> granicus.if.org Git - libevent/log
libevent
15 years agoKeep openssl errors associated with the right bufferevent object.
Nick Mathewson [Fri, 30 Oct 2009 21:08:29 +0000 (21:08 +0000)]
Keep openssl errors associated with the right bufferevent object.

OpenSSL has a per-thread error stack, and really doesn't like you
leaving errors on the stack.  Rather than discard the errors or force
the user to handle them, this patch pulls them off the openssl stack
and puts them on a stack associated with the bufferevent_openssl.  If
the user leaves them on the stack then, it won't affect any other
connections.

This bug was found by Roman Puls.  Thanks!

svn:r1481

15 years agoRefactor evconnlistener to allow multiple implementations; add an (incomplete, not...
Nick Mathewson [Thu, 29 Oct 2009 19:25:33 +0000 (19:25 +0000)]
Refactor evconnlistener to allow multiple implementations; add an (incomplete, not-yet-integrated) IOCP implementation.

svn:r1480

15 years agoExtract XP-only functions when initializing the IOCP port
Nick Mathewson [Thu, 29 Oct 2009 18:30:43 +0000 (18:30 +0000)]
Extract XP-only functions when initializing the IOCP port

svn:r1479

15 years agoreformat weird indentation in dns tests
Nick Mathewson [Thu, 29 Oct 2009 17:11:12 +0000 (17:11 +0000)]
reformat weird indentation in dns tests

svn:r1478

15 years agoUnit test for reverse ipv6 lookup
Nick Mathewson [Thu, 29 Oct 2009 17:10:36 +0000 (17:10 +0000)]
Unit test for reverse ipv6 lookup

svn:r1477

15 years agoMore documentation and unit tests for event_tagging.
Nick Mathewson [Thu, 29 Oct 2009 16:35:20 +0000 (16:35 +0000)]
More documentation and unit tests for event_tagging.

svn:r1476

15 years agoActually use the logic in select.c designed to make the out_sets threadsafe.
Nick Mathewson [Thu, 29 Oct 2009 16:35:15 +0000 (16:35 +0000)]
Actually use the logic in select.c designed to make the out_sets threadsafe.

svn:r1475

15 years agoUnit test for strlcpy
Nick Mathewson [Thu, 29 Oct 2009 16:35:09 +0000 (16:35 +0000)]
Unit test for strlcpy

svn:r1474

15 years agoFix from Chris Davis: get error-logging to be happy on win32.
Nick Mathewson [Tue, 27 Oct 2009 18:25:19 +0000 (18:25 +0000)]
Fix from Chris Davis: get error-logging to be happy on win32.

svn:r1473

15 years agoAvoid calling exit() during event_base_new*()
Nick Mathewson [Tue, 27 Oct 2009 06:47:25 +0000 (06:47 +0000)]
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

15 years agoDo not call the locking variant of event_add or event_active in some cases when we...
Nick Mathewson [Tue, 27 Oct 2009 05:16:32 +0000 (05:16 +0000)]
Do not call the locking variant of event_add or event_active in some cases when we know we have the lock.

svn:r1471

15 years agoRefactor event_assing even more to avoid unnecessary calls
Nick Mathewson [Tue, 27 Oct 2009 05:16:23 +0000 (05:16 +0000)]
Refactor event_assing even more to avoid unnecessary calls

svn:r1470

15 years agoGive event_assign a return value, and make it less inclined to exit().
Nick Mathewson [Tue, 27 Oct 2009 04:25:45 +0000 (04:25 +0000)]
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

15 years agoDo not add a newline to the end of log statements.
Nick Mathewson [Tue, 27 Oct 2009 04:04:07 +0000 (04:04 +0000)]
Do not add a newline to the end of log statements.

svn:r1468

15 years agoRefactor kq_init error handling.
Nick Mathewson [Tue, 27 Oct 2009 04:03:58 +0000 (04:03 +0000)]
Refactor kq_init error handling.

svn:r1467

15 years agoNew test flag to suppress logging for one test.
Nick Mathewson [Tue, 27 Oct 2009 04:03:50 +0000 (04:03 +0000)]
New test flag to suppress logging for one test.

svn:r1466

15 years agoNote assert-related change in changelog
Nick Mathewson [Mon, 26 Oct 2009 20:07:06 +0000 (20:07 +0000)]
Note assert-related change in changelog

svn:r1465

15 years agoUse EVUTIL_ASSERT() consistently instead of assert.
Nick Mathewson [Mon, 26 Oct 2009 20:00:43 +0000 (20:00 +0000)]
Use EVUTIL_ASSERT() consistently instead of assert.

svn:r1464

15 years agoAdd an EVUTIL_ASSERT() to replace our calls to assert().
Nick Mathewson [Mon, 26 Oct 2009 20:00:08 +0000 (20:00 +0000)]
Add an EVUTIL_ASSERT() to replace our calls to assert().

The big difference here is that EVUTIL_ASSERT() passes its message on
via event_errx() before aborting, so that the application has a prayer
of noticing and recording it.

svn:r1463

15 years agoAPI to replace all calls to exit() with a user-supplied fatal-error handler.
Nick Mathewson [Mon, 26 Oct 2009 19:59:51 +0000 (19:59 +0000)]
API to replace all calls to exit() with a user-supplied fatal-error handler.

Also, add unit tests for logging.

svn:r1462

15 years agoTweaks to IOCP interface.
Nick Mathewson [Fri, 23 Oct 2009 22:38:35 +0000 (22:38 +0000)]
Tweaks to IOCP interface.

svn:r1461

15 years agoFix my fix for the bufferevent_connect_fail() test.
Nick Mathewson [Fri, 23 Oct 2009 22:07:05 +0000 (22:07 +0000)]
Fix my fix for the bufferevent_connect_fail() test.

svn:r1460

15 years agoExpose a narrow window to the IOCP code.
Nick Mathewson [Fri, 23 Oct 2009 22:00:29 +0000 (22:00 +0000)]
Expose a narrow window to the IOCP code.

svn:r1459

15 years agoImprove the behavior of le-proxy in a few cases.
Nick Mathewson [Fri, 23 Oct 2009 17:40:00 +0000 (17:40 +0000)]
Improve the behavior of le-proxy in a few cases.

svn:r1458

15 years agoMake the bufferevent_connect_fail test faster on OSX.
Nick Mathewson [Wed, 21 Oct 2009 19:21:05 +0000 (19:21 +0000)]
Make the bufferevent_connect_fail test faster on OSX.

It seems that connecting to a listener that is bound but not accepting
or listening doesn't give a 'connection refused' error on OSX, but
rather makes the connect() time out after 75 seconds.  I couldn't find
any way to make the timout shorter.  Fortunately, closing the listener
after a second or so makes the desired error occur after another
second or so.

svn:r1457

15 years agoTreat the bitwise OR of two enum values as an int.
Nick Mathewson [Wed, 21 Oct 2009 18:48:22 +0000 (18:48 +0000)]
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

15 years agoTest failing case of bufferevent_connect().
Nick Mathewson [Wed, 21 Oct 2009 07:00:19 +0000 (07:00 +0000)]
Test failing case of bufferevent_connect().

Code by Chris Davis.

svn:r1455

15 years agoFix win32 connect() event handling.
Nick Mathewson [Wed, 21 Oct 2009 07:00:14 +0000 (07:00 +0000)]
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

15 years agoOSX compilation issues
Nick Mathewson [Wed, 21 Oct 2009 06:03:00 +0000 (06:03 +0000)]
OSX compilation issues

svn:r1453

15 years agoRemove an EVBASE_RELEASE_LOCK that I missed.
Nick Mathewson [Wed, 21 Oct 2009 05:36:27 +0000 (05:36 +0000)]
Remove an EVBASE_RELEASE_LOCK that I missed.

svn:r1452

15 years agoFix win32 compilation.
Nick Mathewson [Wed, 21 Oct 2009 04:45:59 +0000 (04:45 +0000)]
Fix win32 compilation.

svn:r1451

15 years agoAdd locking to event_base_loop.
Nick Mathewson [Wed, 21 Oct 2009 03:54:00 +0000 (03:54 +0000)]
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

15 years agoFix windows compilation warnings.
Nick Mathewson [Wed, 21 Oct 2009 02:14:16 +0000 (02:14 +0000)]
Fix windows compilation warnings.

svn:r1449

15 years agoFix compilation for listener.h for C++ - missing extern "C". Patch from Ferenc Szalai.
Niels Provos [Mon, 19 Oct 2009 16:20:12 +0000 (16:20 +0000)]
Fix compilation for listener.h for C++ - missing extern "C".  Patch from Ferenc Szalai.

svn:r1448

15 years agoAdd a note that we should change previous_to_last to last_with_space
Nick Mathewson [Fri, 16 Oct 2009 13:20:16 +0000 (13:20 +0000)]
Add a note that we should change previous_to_last to last_with_space

svn:r1447

15 years agoCorrect the signatures for the evmap_io_* functions to use evutil_socket_t.
Nick Mathewson [Fri, 16 Oct 2009 13:20:09 +0000 (13:20 +0000)]
Correct the signatures for the evmap_io_* functions to use evutil_socket_t.

svn:r1446

15 years agoSpelling fixes in comments and strings.
Nick Mathewson [Fri, 16 Oct 2009 13:19:57 +0000 (13:19 +0000)]
Spelling fixes in comments and strings.

svn:r1445

15 years agoWhen a bufferevent_connect() call fails, give the client an error callback.
Nick Mathewson [Wed, 14 Oct 2009 00:46:47 +0000 (00:46 +0000)]
When a bufferevent_connect() call fails, give the client an error callback.

Patch from Christopher Davis.

svn:r1444

15 years agoFix some crash bugs when initializing evdns
Nick Mathewson [Wed, 14 Oct 2009 00:46:40 +0000 (00:46 +0000)]
Fix some crash bugs when initializing evdns

svn:r1443

15 years agoDeclare struct timezone in util.h so that borken mingw versions do not complain
Nick Mathewson [Mon, 12 Oct 2009 21:06:30 +0000 (21:06 +0000)]
Declare struct timezone in util.h so that borken mingw versions do not complain

svn:r1441

15 years agoAdd changelog for last commit
Nick Mathewson [Fri, 2 Oct 2009 03:07:29 +0000 (03:07 +0000)]
Add changelog for last commit

svn:r1440

15 years agoDo not notify the main thread more than needed.
Nick Mathewson [Fri, 2 Oct 2009 03:03:58 +0000 (03:03 +0000)]
Do not notify the main thread more than needed.

Basically, we suppress the notification when an event is added or deleted
and:
  - The event has no fd, or there is no change in whether we are
    reading/writing on the event's fd.
  - The event has no timeout, or adding the event did not make the earliest
    timeout become earlier.

This should be a big efficiency win in applications with multiple threads and
lots of timeouts.

svn:r1439

15 years agoApply Ka-Hing Cheung's event_base_got_[break|exit] patch, with locking and whitespace...
Nick Mathewson [Thu, 1 Oct 2009 15:29:08 +0000 (15:29 +0000)]
Apply Ka-Hing Cheung's event_base_got_[break|exit] patch, with locking and whitespace fixes.

svn:r1438

15 years agoDo not drop data from evbuffer when out of memory; reported by Jacek Masiulaniec
Niels Provos [Thu, 24 Sep 2009 22:18:19 +0000 (22:18 +0000)]
Do not drop data from evbuffer when out of memory; reported by Jacek Masiulaniec

svn:r1436

15 years agoForward-port: fix android compilation
Nick Mathewson [Wed, 23 Sep 2009 23:51:26 +0000 (23:51 +0000)]
Forward-port: fix android compilation

svn:r1435

15 years agoFix the assert I added to epoll.c: spotted by Dmitry Novikov
Nick Mathewson [Wed, 16 Sep 2009 17:17:57 +0000 (17:17 +0000)]
Fix the assert I added to epoll.c: spotted by Dmitry Novikov

svn:r1432

15 years agoTreat events with fd == -1 as addable.
Nick Mathewson [Fri, 11 Sep 2009 21:02:19 +0000 (21:02 +0000)]
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

15 years agoMake epoll use less RAM.
Nick Mathewson [Fri, 11 Sep 2009 18:47:35 +0000 (18:47 +0000)]
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

15 years agoAdd a trivial race-fix from Chromium: do not try to re-detect whether we have a monot...
Nick Mathewson [Fri, 11 Sep 2009 18:21:57 +0000 (18:21 +0000)]
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

15 years agoTreat a negative number of bytes to read as the kernel saying "I don't know."
Nick Mathewson [Fri, 11 Sep 2009 18:21:37 +0000 (18:21 +0000)]
Treat a negative number of bytes to read as the kernel saying "I don't know."

svn:r1426

15 years agoOn connect, call only one of BEV_EVENT_CONNECTED or writecb.
Nick Mathewson [Wed, 19 Aug 2009 20:55:25 +0000 (20:55 +0000)]
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

15 years agoFix build warnings and add changelog entry for evhttp patches.
Nick Mathewson [Sun, 16 Aug 2009 19:22:15 +0000 (19:22 +0000)]
Fix build warnings and add changelog entry for evhttp patches.

svn:r1424

15 years agoDefine evhttp_del_accept_socket
Nick Mathewson [Sun, 16 Aug 2009 19:22:10 +0000 (19:22 +0000)]
Define evhttp_del_accept_socket

[Patch from David Reiss]

svn:r1423

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