aboutsummaryrefslogtreecommitdiff
path: root/sntp/libevent/ChangeLog
blob: 8bb76cafff4e8053746240405952ade898cf6988 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
Changes in version 2.1.4-beta (?? Dec 2013)

 (As of 735d838b0a537ae04f1e6a2e9cbc5f3f45ebb541)


 Bugfixes (evdns)
   o Checking request nameserver for NULL, before using it. (5c710c0
     Belobrov Andrey)
   o Fix SEGFAULT after evdns_base_resume if no nameservers installed. (14971a8
     Azat Khuzhin)
   o Actually use the log facility for reporting evdns problems. (e1766a1)
   o Fix SEGFAULT after evdns_base_resume if no nameservers installed. (f8d7df8 Azat Khuzhin)

 Bugfixes (compilatin)
   o Fix test compilation with nmake: add the gdi.lib dependency (5ba8ab7)
   o Whoops. It is gdi.lib, not gdi32.lib. (github issue #61) (8ab612e)
   o Don't use return since return type is void and build error occurs using clang (838161d Makoto Kato)
   o Use void casts to suppress some "unchecked return value" warns (7080d55)
   o rpcgen: Generate regress.gen.[c,h] in build rather than src dir (243386c Ross Lagerwall)
   o Fix a compiler warning when checking for arc4random_buf linker breakage. (5cb3865)

 Bugfixes (locks, synchronization)
   o Missed lock acquire/release in event_base_cancel_single_callback_()
     (d3d999a Azat Khuzhin)
   o Fix locking in bufferevent_get_options_(). (dbc9cd4 Maxime Henrion)

 Bugfixes (leaks)
   o Avoid leaking segment mappings when offset is not a page multiple (d409514)

 Testing
   o Add tests for evdns_base_resume(). (1cd9ff5 Azat Khuzhin)
   o Fix dns/leak_resume_send_err test. (7e876df Azat Khuzhin)
   o Add checks for evhttp_connection_get_server() in unit tests. (fbc323b Maxime Henrion)
   o Fix a (failure-only) null dereference in the unit tests (1104d0b)
   o Fix a logic error in test_evbuffer_freeze (7765884)
   o Add missing check to test_evbuffer_file_segment_add_cleanup_cb (eba4506)
   o Fix some crash-on-fail cases in DNS regression tests (87cd6f0)
   o DNS tests: add a missing check (f314900)
   o Finalize tests: add a missing check (82b6956)
   o test_evutil_rtrim: add another missing check. (e193c95)
   o regress_main: logging all if env EVENT_DEBUG_LOGGING_ALL isset (611e28b Azat Khuzhin)
   o regress_http: add tests for evhttp_connection_get_addr() (4dd500c Azat Khuzhin)

 Bugfixes (core)
   o If evsel->del() fails, don't leave the evmap in an inconsistent state
     (9b5a527 Maxime Henrion)
   o Move event_debug_note_teardown_ before mm_free. (69b5c64)
   o Check CLOCK_MONOTONIC_* at runtime if needed. (911abf3)
   o Fix reinit of fds with EV_WRITE but not EV_READ. (ebfd8a8 maksqwe)

 Performance tweaks (core)
   o Avoid redundant syscall to make a nonblocking socket nonblocking
     (42c03da Maxime Henrion)
   o Avoid redundant syscall if making a socket cloexec twice (1f29b18)
   o Avoid redundant invocations of init_extension_functions for IOCP (3b77d62)

 Bugfixes (evhttp)
   o Fix a double close() bug in evhttp when the underlying bufferevent uses
     BEV_OPT_CLOSE_ON_FREE. (31db8a0 Maxime Henrion)
   o Fix an unlikely but possible error case for http connections (f22049e)
   o Avoid racy bufferevent activation (5eb1788 Nate Rosenblum)

 Bugfixes on 2.0 (Windows)
   o Use windows vsnprintf fixup logic on all windows environments (e826f19)
   o libevent/win32_dealloc() : fix sizeof(pointer) vs sizeof(*pointer) (b8f5980 Frank Denis)

 Bugfixes (evutil_secure_rng)
   o When we seed from /proc/sys/kernel/random/uuid, count it as success (e35b540)
   o We should return after arc4random_buf() (1ea1f26 Makoto Kato)
   o Avoid other RNG initialization FS reads when urandom file is specified (9695e9c)
   o Really remove RNG seeds from the stack (f5ced88)
   o Fix another arc4random_buf-related warning (e64a2b0)

 New APIs (core)
   o Added event_base_get_num_events() (0fa107d Mobai Zhang)
   o Add function to fetch underlying ratelimit cfg (4b3d5af Mark Ellzey)
   o Pass and return const for bufferevent_get_token_bucket_cfg (1c77fbb Mark Ellzey)

 New APIs (evhttp)
   o Add evhttp_connection_get_server(). (a7f82a3 Maxime Henrion)
   o add a http default content type option (5a5acd9 Nicolas Martyanoff)
   o http: implement new evhttp_connection_get_addr() api. (0c7f040 Azat Khuzhin)


 Documentation
   o Document that arc4random is not a great cryptographic PRNG. (6e49696)
   o Small doxygen tweaks (6e67b51)
   o Try another doxygen tweak (ccf432b)

 New APIs (evutil_secure_rng)
   o Add evutil_secure_rng_set_urandom_device_file (2bbb5d7)

 Cleanups
   o Remove an unreachable return statement in minheap-internal.h (e639a9e)

 Sample code
   o sample/le-proxy: Fail more gracefully if opening listener fails (44b2491)
   o sample: drop uri_root from base_url in http-server. (6171e1c Azat Khuzhin)











Changes in version 2.1.3-alpha (1 May 2013)

 Libevent 2.1.3-alpha fixes various bugs, adds new unit tests, and cleans
 up the code in a couple of places. It has a new callback in evhttp for
 reporting errors during a request, a new feature for allowing evdns to
 not keep the event_base looping when there are no requests inflight, and
 example code for writing an https client.

 Libevent 2.1.3-alpha also has an important new (experimental) event
 finalization feature to allow safe event teardown in multithreaded
 programs. This ought to fix the longstanding bug with deadlocks in
 multithreaded use of SSL-based bufferevents that some people have been
 experiencing since Libevent 2.0.


 Core (event finalization)
   o Implement event_finalize() and related functions to avoid certain
     deadlocks (8eedeab)
   o Use finalization feature so bufferevents can avoid deadlocks (02fbf68)
   o Always run pending finalizers when event_base_free() is called (e9ebef8)
   o Remove bufferevent_del_generic_timeout_cbs as now unused (4ea4c6a)
   o More documentation for finalization feature (a800b91)
   o Make the event_finalize* functions return an error code (5d11f4f)
   o Mark the finalize stuff as experiemental in case it needs to
     change (23e2e29)

 Evdns
   o evdns: New flag to make evdns not prevent the event loop from
     exiting (6b7fa62 Azat Khuzhin)

 Bugfixes (Core)
   o Make event_remove_timer behave correctly with persistent timers (5623e80)
   o Unit test for event_remove_timer with EV_PERSIST. (96150dd)
   o Double-check next timeout when adding events (9443868 Nate Rosenblum)
   o event_base_update_cache_time should be a no-op if the loop isn't
     running (5e6fa2a)

 Bugfixes (evhttp, crash fix, from 2.0)
   o fix #73 and fix http_connection_fail_test to catch it (b618204 Greg Hazel)

 Bugfixes (compilation and portability, from 2.0)
   o Fix compilation with WIN32_HAVE_CONDITION_VARIABLES enabled (7e45739)
   o Fix missing AC_PROG_SED on older Autoconfs (9ab2b3f Tay Ray Chuan)
   o Backport libevent to vanilla Autoconf 2.59 (as used in RHEL5)
     (74d4c44 Kevin Bowling)
   o Use AC_CONFIG_HEADERS in place of AM_CONFIG_HEADERS for autmake
     1.13 compat (817ea36)
   o Rename configure.in to configure.ac to appease newer autoconfs (0c79787)
   o Avoid using top_srcdir in TESTS: new automakes do not like this (a55514e)

 Bugfixes (resource leaks/lock errors on error, from 2.0)
   o Avoid leaking fds on evconnlistener with no callback set (69db261)
   o Avoid double-close on getsockname error in evutil_ersatz_socketpair
     (0a822a6)
   o Fix a locking error in bufferevent_socket_get_dns_error. (0a5eb2e)

 Documentation Fixes (from 2.0)
   o Fix a mistake in evbuffer_remove() arguments in example http server code
     (c322c20 Gyepi Sam)
   o Fix a typo in a comment in buffer.h. Spotted by Alt_F4 (773b0a5)

 Documentation Fixes
   o minor documentation typos (809586a Patrick Pelletier)
   o Fix cut-and-paste err in whatsnew-2.1 (49905ac)
   o Fix comment to refer to sample/include.am correctly (9e8cdf3 Sebastian
     Hahn)
   o Fix typo : Dispatching instead of Dispaching (0c2bacc Volker Lendecke)
   o fix some hinky indentation in evhttp_make_request (80e220e Patrick
     Pelletier)
   o "buffer" spelling (a452811 Patrick Pelletier)
   o Specify return behavior in header for evbuffer_pullup() in corner case
     (cf8d1cd Dan Petro)
   o Clarify an important point about event_base_foreach_event() (920a5e6)

 Compilation Fixes/Tool Support
   o avoid valgrind false positive by zeroing epoll_event (1258614 Patrick
     Pelletier)
   o Fix harmless clang enum warning (b452a43 Sebastian Hahn)
   o remove all exes on "make clean", not just regress.exe (974bfa0 Patrick
     Pelletier)
   o Make --disable-libevent-regress work again (787fd74)
   o Do not build strlcpy.c when it will have no code. (4914620)

 Portability Fixes
   o When EWOULDBLOCK is not EAGAIN, treat it as equivalent to it (bf7a0ff)
   o Preliminary changes for Minix3. (0dda56a Nicholas Heath)
   o Use AC_CONFIG_HEADERS in place of AM_CONFIG_HEADERS for autmake 1.13
     compat (bf278b)
   o Avoid using $(top_srcdir) in TESTS. (2863c83)
   o build test/test-script.sh on systems with a less-featureful $< (f935e21)
   o Implement EVUTIL_ERR_IS_EAGAIN on windows. (42aaf4d)

 Evhttp changes:
   o Fix ipv6 support for http. When URL contain domain, not IP
     address. (71e709c Azat Khuzhin)
   o uri decode: fix for warning "use of uninitialised value" (64b6ece Azat
     Khuzhin)
   o uri decode: changed the test for the existence of the next character
     (e1903e3 Azat Khuzhin)
   o Move prototype of evhttp_decode_uri_internal() to http-internal.h
     (de8101a Azat Khuzhin)
   o Test: decoding just part of string with evhttp_decode_uri_internal()
     (1367653 Azat Khuzhin)
   o Add new error_cb for actual reporting of HTTP request errors. (7b07719
     Azat Khuzhin)
   o Add test for EVREQ_HTTP_REQUEST_CANCEL into http_cancel_test() (862c217
     Azat Khuzhin)
   o Drop extra header http_struct.h from regress_http.c (54cc800 Azat Khuzhin)

 Testing
   o Add regress test ipv6_for_domain. (9ec88bd Azat Khuzhin)
   o Add an environment variable (EVENT_DEBUG_MODE) to run unit tests in debug
     mode (2fad0f3)
   o Add a test with an active_later event at event_base_free time. (1c3147f)
   o Make all tests pass under EVENT_DEBUG_MODE=1 (b1b054f)
   o Add some verbose notes to bufferevent unit tests (9d893c9)
   o New test for active_later->active transition on event_active (a153874)
   o New tests for event_base_foreach_event() (0b096ef)
   o Unit tests for event_base_gettimeofday_cached() and
     event_base_update_cache_time() (30ea291)
   o A test for event_get_assignment() (f09629e)
   o More unit tests for initializing common timeouts. (d596739)
   o Fix a bug in the new main/event_foreach test (702c9aa)

 Windows:
   o use FormatMessage for winsock errors (0c6ec5d, 2078e9b, 4ccdd53, c9ad3af
     Patrick Pelletier)
   o a program to print out the error strings for winsock errors (7296512
     Patrick Pelletier)
   o Fix a warning introduced in 0c6ec5d8 (eeb700c)
   o Fix another warning introduced in 0c6ec5d8 (ed26561)

 Examples (http)
   o Add sample/https-client.c, an example of stacking evhttp as a client on
     top of bufferevent_ssl. (be46c99 Catalin Patulea)
   o use ${OPENSSL_LIBS} instead of -lssl -lcrypto (bf31fa5 Patrick Pelletier)
   o https-client was putting newlines at 256-byte boundaries (42d7441 Patrick
     Pelletier)
   o better handling of OpenSSL errors (5754d96 Patrick Pelletier)
   o use Debian's default root certificate location (aacd674 Patrick Pelletier)
   o use iSECPartners code to validate hostname in certificate (64d9f16
     Patrick Pelletier)
   o avoid sign mismatch warning in openssl_hostname_validation.c (6021cb5
     Patrick Pelletier)
   o pull in wildcard matching code from cURL (4db9da6 Patrick Pelletier)
   o Another tweak to https-client.c (95acdaa)
   o Remove http_struct.h usage in sample/https-client.c (8a90a85)



Changes in version 2.1.2-alpha (18 Nov 2012)

 Libevent 2.1.2-alpha includes more portable for monotonic timers,
 refactors much of Libevent's internal and external infrastructure,
 closes some longstanding gaps in the interface, makde other
 improvements.  Ths log below tries to organize features by rough area of
 effect.  It omits a few commits which were pure bugfixes on other commits
 listed below.  For more detail, see the git changelogs.  For more
 insight, see the "whatsnew-2.1.txt" document included in the Libevent
 2.1.2-alpha distribution.

 Libevent 2.1.2-alpha also includes all changes made in 2.0.19-stable
 through 2.0.21-stable inclusive.

 Performance (core):
   o Replace pipe-based notification with EVFILT_USER where possible. This
     should make multithreaded programs on OSX and *BSD alert the main thread a
     little faster. (53a07fe)
   o Make th_base_lock nonrecursive. (9cd5acb)

 New/Changed API Functions:
   o New event_get_priority() function to return an event's priority (f90e255)
   o Add a bufferevent_get_priority() function (bd39554)
   o Add an event_base_loopcontinue() to tell Libevent to rescan for more
     events right away (7d6aa5e)
   o Add a new callback to get called on evbuffer_file_segment free
     (e9f8feb yangacer, 64051b9)
   o Expose event_base_foreach_event() as a public API. (84fd6d7 Roman
      Puls, 232055e, ffe1643)
   o Add an event_remove_timer() to remove timer on an event without
     deleting it (e3b2e08)
   o Make bufferevent_set_timeouts(bev, NULL, NULL) have plausible
     semantics (9dee36b)
   o Rename event_enable_lock_debuging() to ..._debugging(). (The old name
     should still work.) (07e132e)
   o Add missing implementation for event_enable_debug_logging (3b3e21d)

 PORTABLE MONOTONIC TIMERS:

   Libevent 2.1.2 includes internal support for monotonic timers on
   (nearly) all supported platforms, including Windows, and OSX.  Libevent
   applications should now be more resilient to jumps forwards or backwards
   in the system clock.  Also, on Linux systems with epoll, we now
   optionally support microsecond-level timeouts (whereas epoll only
   supports millisecond-precision timeouts).

   o Use mach_absolute_time() for monotonic clock support on OSX. (b8fd6f9)
   o Do not track use_monotonic field when is no monotonic clock (cb653a0)
   o EVENT_BASE_FLAG_PRECISE_TIMER indicates we want fine timer precision
     (ddd69d3)
   o On Linux, use CLOCK_MONOTONIC_COARSE by default (55780a7)
   o Implement a GetTickCount-based monotonic timer for Windows (d5e1d5a)
   o Refactor monotonic timer handling into a new type and set of
     functions; add a gettimeofday-based ratcheting implementation (f5e4eb0)
   o Add EVENT_PRECISE_TIMER environment var for selecting precise-but-slow
     timer (a2598ec)
   o Implement fast/precise monotonic clocks on Windows (2c47045)
   o Simple unit tests for monotonic timers (630f077)
   o Improve the monotonic-time unit test: make it check the step size (7428c78)
   o When PRECISE_TIMERS is set with epoll, use timerfd for microsecond
     precision (26c7582)
   o Split out time-related evutil functions into a new evutil_time.c (c419485)
   o Split out time-related prototypes into time-internal.h (71bca50)
   o Add evutil_time.obj to Makefile.nmake (0ba0683)
   o Avoid giving a spurious warning when timerfd support is unavailable
     (1aaf9f0 Dave Hart)
   o Make test_evutil_monotonic a little more tolerant (def3b83)
   o Avoid unused-var warning on systems with clock_gettime but without
     CLOCK_MONOTONIC_COARSE (9be5468)

EVENT_BASE_ONCE LEAKS:
   If a callback added by event_base_once() is never invoked, Libevent no
   longer leaks internal memory.

   o Free dangling event_once objects on event_base_free() (c17dd59)
   o Add a unit test in which an event is created with event_base_once()
     but never fires (4343edf)

TESTING SUPPORT, FIXES AND IMPROVEMENTS:

   Libevent now disables by default its unit tests that would touch the
   network, or that tend to fail on heavily-loaded systems.  To re-enable
   them, invoke the ./test/regress program with the @all alias.

   o Simplify test.sh code significantly. (9b856fd Ross Lagerwall)
   o Make all tests that hit the network disabled by default (f2cea87)
   o Avoid a resource leak on error in http client benchmark (ea92fba)
   o Update to latest tinytest (911b4f0349377) (ef7c4f7)
   o Avoid (unlikely) overflow in bench_httpclient.c (5671033)
   o Shave 700 msec off the persistent_timeout_jump test (21205b8)
   o Check return value of write() in regress.c (c8009d2)
   o Make load-dependent monotonic timer tests off-by-default (2b6fe8b)
   o Add deferred_cb_skew to list of timing-dependent tests (34c8f31)
   o Avoid test -e; older shs don't have one. (f1bd938)
   o Fix renegotiation test to work around openssl 1.0.1 bug (c2f3086)
   o Fix a couple of compile warnings in the unit tests (5a9a014)

MISC:
   o Change evutil_weakrand_() to avoid platform random() (e86af4b Nicholas
     Marriott, 3aa4415)

INFRASTRUCTURE (Active-later events):
   As a simplification and optimization to Libevent's "deferred callback"
   logic (introduced in 2.0 to avoid callback recursion), Libevent now
   treats all of its deferrable callback types using the same logic it uses
   for active events.  Now deferred events no longer cause priority
   inversion, no longer require special code to cancel them, and so on.

   o Refactor the callback part of an event into its own event_callback
     type (cba59e5)
   o Add "active later" event_callbacks to supersede deferred (745a63d)
   o event_base_assert_ok: check value of event_active_count for
     correctness (fec8bae)
   o Replace deferred_cbs with event_callback-based implementation. (ae2b84b)
   o Replace more deferred_cb names with event_callback (a4079aa)
   o Give event_base_process_active a single exit path (581b5be)
   o Restore our priority-inversion-prevention code with deferreds (c0e425a)
   o Refactor event_persist_closure: raise and extract some common logic
     (bec22b4)
   o Remove the unused bits from EVLIST_ALL (9889a3d)

BUILD IMPROVEMENTS:
 Libevent 2.1.2-alpha modernizes Libevent's use of autotools, and makes
 numerous other build system. Parallel builds should be faster, and all
 builds should be quieter.

   o Split long lists in Makefile.am into one-item-per-line (2711cda)
   o Remove unnecessary code in configure.in. (e65914f Ross Lagerwall)
   o attempt to support OpenSSL in Makefile.nmake (eba0eb2 Patrick Pelletier)
   o Use newer syntax for autoconf/automake init (7d60ba8)
   o Enable silent build rules by default. Override with V=1 (7b18e5c)
   o Switch to non-recursive makefiles (7092f3b)
   o Rename subordinate Makefile.ams to include.am (6cdfeeb)
   o Make quiet build even quieter (371a123)
   o New --quiet option for event_rpcgen.py (aa59c1e)
   o Be quiet when making regress.gen.[ch] (607a8ff)
   o Fix handling of no-python case for nonrecursive make (1e3123d)
   o We now require automake 1.9 or later. Modernize! (b7f6e89)
   o Rename configure.in to configure.ac. (b3fea67 Ross Lagerwall)
   o Use correct openssl libs and includes in pkgconfig file (d70af27)
   o Use the same CFLAGS for openssl when building unit tests as with
     libevent (1d9d511)

DOCUMENTATION
   o Note that make_base_notifiable should not be necessary (26ee5f9)
   o Be more clear that LEV_OPT_DEFERRED_ACCEPT has tricky prereqs (371efeb)
   o Add caveat to docs about bufferevent_free() with data in outbuf (6fab9ee)
   o Make it more clear that NOLOCK means "I promise, no multithreading"
    (9444524)
   o Fix a comment in test-fdleak after 077c7e949. (3881d8f Ross Lagerwall)
   o Make the Makefile.nmake warning slightly less dire (e7bf4c8)
   o Fix typo : events instead of evets (05f1aca Azat Khuzhin)
   o Additional comments about OPENSSL_DIR variable, prompted by Dave Hart
     (6bde2ef Patrick Pelletier)

EVHTTP:
   o ignore LWS after field-content in headers (370a2c0 Artem Germanov)
   o Clean up rtrim implementation (aa59d80)
   o Remove trailing tabs in HTTP headers as well. (ac42519)
   o Remove internal ws from multiline http headers correctly (c6ff381)
   o Move evutil_rtrim_lws_ to evutil.c where it belongs (61b93af)
   o add evhttp_request_get_response_code_line (4f4d0c9 Jay R. Wren)
   o Use EVUTIL_SOCKET_ERROR() wrapper to save/restore errno in
     evhttp_connection_fail_ (7afbd60)
   o preserve errno in evhttp_connection_fail_ for inspection by the
     callback (36d0ee5 Patrick Pelletier)

BUGFIXES:
   o Correctly handle running on a system where accept4 doesn't work. (9fbfe9b)
   o Avoid double-free on error in evbuffer_add_file. Found by
     coverity. (6a81b1f)
   o Fix another possible uninitialized read in dns regression tests. Found
     by coverity. (13525c5)
   o Add checks for functions in test-ratelim.c; found by Coverity (aa501e1)
   o Avoid memory leak in test_event_calloc unit test; found by coverity
     (92817a1)
   o Fix a shadowed variable in addfile_test_readcb; found by coverity
     (225344c)
   o Check return value when using LEV_OPT_DEFERRED_ACCEPT. Found by
     coverity (6487f63)
   o Prevent reference leak of bufferevent if getaddrinfo fails. (b757786
     Joachim Bauch)
   o Make event_base_getnpriorities work with old "implicit base" code
     (c46cb9c)
   o Simplify and correct evutil_open_closeonexec_ (0de587f)
   o Fix event_dlist definition when sys/queue not included (81b6209
     Derrick Pallas)



Changes in version 2.1.1-alpha (4 Apr 2012)

 Libevent 2.1.1-alpha includes a number of new features and performance
 improvements.  The log below tries to organize them by rough area of
 effect.  It omits some commits which were pure bugfixes on other commits
 listed below.  For more detail, see the git changelogs.  For more
 insight, see the "whatsnew-2.1.txt" document included in the Libevent
 2.1.1-alpha distribution.

 Performance: Core
   o Replace several TAILQ users with LIST. LIST can be a little faster than
     TAILQ for cases where we don't need queue-like behavior. (f9db33d,
     6494772, d313c29, 974d004)
   o Disabled code to optimize the case where we reinsert an existing
     timeout (e47042f, 09cbc3d)
   o Remove a needless base-notify when rescheduling the first timeout (77a96fd)
   o Save a needless comparison when removing/adjusting timeouts (dd5189b)
   o Possible optimization: split event_queue_insert/remove into
     separate functions. needs testing (efc4dc5)
   o Make event_count maintenance branchless at the expense of an
     extra shift. Needs benchmarking (d1cee3b)
   o In the 2.1 branch, let's try out lazy gettimeofday/clock_gettime
     comparison (2a83ecc)
   o Optimization in event_process_active(): ignore maxcb & endtime
     for highest priority events. (a9866aa Alexander Drozdov)
   o Bypass event_add when using event_base_once() for a 0-sec timeout (35c5c95)
   o Remove the eventqueue list and the ev_next pointers. (604569b 066775e)

 Performance: Evbuffers
   o Roughly 20% speed increase when line-draining a buffer using
     EVBUFFER_EOL_CRLF (5dde0f0 Mina Naguib)
   o Try to squeeze a little more speed out of EVBUFFER_EOL_CRLF (7b9d139)
   o Fix a bug in the improved EOL_CRLF code (d927965)
   o Remove a needless branch in evbuffer_drain() (d19a326)

 Performance: Linux
   o Infrastructure for using faster/fewer syscalls when creating
     sockets (a1c042b)
   o Minimize syscalls during socket creation in listener.c (7e9e289)
   o Use a wrapper function to create the notification
     pipe/socketpair/eventfd (ca76cd9)
   o Use pipes for telling signals to main thread when possible (a35f396)
   o Save syscalls when constructing listener sockets for evhttp (af6c9d8)
   o Save some syscalls when creating evdns sockets (713e570)
   o Save some syscalls when constructing a socket for a bufferevent (33fca62)
   o Prefer epoll_create1 on Linuxen that have it (bac906c)

 Performance: Epoll backend
   o Use current event set rather than current pending change when
     deciding whether to no-op a del (04ba27e Mike Smellie)
   o Replace big chain of if/thens in epoll.c with a table lookup (8c83eb6)
   o Clean up error handling in epoll_apply_one_change() a little (2d55a19)

 Performance: Evport backend
   o evport: use evmap_io to track fdinfo status. Should save time and
     RAM. (4687ce4)
   o evport: Remove a linear search over recent events when
     reactivating them (0f77efe)
   o evport: Use portev_user to remember fdinfo struct (276ec0e)
   o evport: don't scan more events in ed_pending than needed (849a5cf)
   o evport: Remove artificial low limit on max events per getn call (c04d927)
   o Reenable main/many_events_slow_add for evport in 2.1 (e903db3)

 Performance: Windows
   o Use GetSystemTimeAsFileTime to implement gettimeofday on
     win32. It's faster and more accurate than our old
     approach. (b8b8aa5)

 New functions and features: debugging
   o Add event_enable_debug_logging() to control use of debug logs (e30a82f)

 New functions and features: core
   o Add event_config function to limit time/callbacks between calls
     to dispatch (fd4de1e, 9fa56bd, a37a0c0, 3c63edd)
   o New EVLOOP_NO_EXIT_ON_EMPTY option to keep looping even when no
     events are pending (084e68f)
   o Add event_base_get_npriorities() function. (ee3a4ee Alexander Drozdov)
   o Make evbase_priority_init() and evbase_get_npriorities()
     threadsafe (3c55b5e)
   o New event_base_update_cache_time() to set cached_tv to current
     time (212533e Abel Mathew)
   o Add event_self_cbarg() to be used in conjunction with
     event_new(). (ed36e6a Ross Lagerwall, fa931bb, 09a1906, 1338e6c,
     33e43ef)
   o Add a new libevent_global_shutdown() to free all globals before
     exiting. (041ca00 Mark Ellzey, f98c158, 15296d0, 55e991b)
   o Use getifaddrs to detect our interfaces if possible (7085a45)
   o Add event_base_get_running_event() to get the event* whose cb we
     are in (c5732fd, 13dad99)

 New functions and features: building
   o Implement --enable-gcc-hardening configure option (7550267 Sebastian Hahn)

 New functions and features: evbuffers
   o Add evbuffer_add_file_segment() so one fd can be used efficiently
     in more than one evbuffer_add_file at a time (e72afae, c2d9884,
     3f405d2, 0aad014)
   o Fix windows file segment mappings (8254de7)
   o Allow evbuffer_ptr_set to yield a point just after the end of the
     buffer. (e6fe1da)
   o Allow evbuffer_ptr to point to position 0 in an empty evbuffer
     (7aeb2fd Nir Soffer)
   o Set the special "not found" evbuffer_ptr consistently. (e3e97ae Nir Soffer)
   o support adding buffers to other buffers non-destructively
     (9d7368a Joachim Bauch)
   o prevent nested multicast references, reworked locking (26041a8
     Joachim Bauch)
   o New EVBUFFER_EOL_NUL to read NUL-terminated strings from an
     evbuffer (d7a8b36 Andrea Montefusco, 54142c9)
   o Make evbuffer_file_segment_types adaptable (c6bbbf1)
   o Added evbuffer_add_iovec and unit tests. (aaec5ac Mark Ellzey, 27b5398)
   o Add evbuffer_copyout_from to copy data from the middle of a
     buffer (27e2225)

 New functions and features: bufferevents
   o Allow users to set allow_dirty_shutdown (099d27d Catalin Patulea)
   o Tweak allow_dirty_shutdown documentation (a44cd2b)
   o Fix two issues in the allow_dirty_shutdown code. (f3b89de)
   o Add a bufferevent_getcb() to find a bufferevent's current
     callbacks (a650394)
   o bufferevent: Add functions to set/get max_single_read/write
     values. (998c813 Alexander Drozdov)
   o bev_ssl: Be more specific in event callbacks. evhttp in particular gets
     confused without at least one of BEV_EVENT_{READING|WRITING}. (f7eb69a
     Catalin Patulea)

 New functions and features: evconnlisteners
   o Support TCP_DEFER_ACCEPT sockopts for listeners (5880e4a Mark Ellzey,
     a270728)
   o Add another caveat to the TCP_DEFER_ACCEPT documentation (a270728)
   o Allow evconnlistener to be created in disabled state. (9593a33
     Alexander Drozdov)
   o The LEV_OPT_CLOSE_ON_EXEC flag now applies to accepted listener
     sockets too (4970329)

 Evhttp:
   o Add new evhttp_{connection_}set_timeout_tv() functions to set
     finger-grained http timeouts (6350e6c Constantine Verutin)
   o Performance tweak to evhttp_parse_request_line. (aee1a97 Mark Ellzey)
   o Add missing break to evhttp_parse_request_line (0fcc536)
   o Add evhttp callback for bufferevent creation; this lets evhttp
     support SSL. (8d3a850)
   o Remove calls to deprecated bufferevent functions from evhttp.c (4d63758)
   o evhttp: Add evhttp_foreach_bound_socket. (a2c48e3 Samy Al Bahra)

 Build improvements:
   o Add AC_USE_SYSTEM_EXTENSIONS to configure.in. Requires follow on
     patches for correctness and robustness. (1fa7dbe Kevin Bowling)
   o Filter '# define' statements from autoconf and generate
     event-private.h (321b558 Kevin Bowling)
   o Remove internal usage of _GNU_SOURCE (3b26541 Kevin Bowling)
   o Eliminate a couple more manual internal _GNU_SOURCE defines (c51ef93
     Kevin Bowling)
   o Add AC_GNU_SOURCE to the fallback case. (ea8fa4c Kevin Bowling)
   o Use a Configuration Header Template for evconfig-private.h (868f888
     Kevin Bowling)
   o Fix a comment warning and add evconfig-private.h to .gitignore
     (f6d66bc Kevin Bowling)
   o Include evconfig-private.h in internal files for great good. (0915ca0
     Kevin Bowling)
   o Backport libevent to vanilla Autoconf 2.59 (as used in RHEL5)
     (ad03952 Kevin Bowling)
   o Prefer the ./configure evconfig-private.h in MinGW, just in
     case. (f964b72 Kevin Bowling)
   o Shell hack for weird mkdir -p commands (fd7b5a8 Kevin Bowling)
   o Add evconfig-private to remaining files (ded0a09 Kevin Bowling)
   o Allow use of --enable-silent-rules for quieter compilation with
     automake 1.11 (f1f8514 Dave Hart)
   o Use "_WIN32", not WIN32: it's standard and we don't need to fake it
     (9f560b)
   o In configure, test for _WIN32 not WIN32. (85078b1 Peter Rosin)
   o Do not define WIN32 in Makefile.nmake (d41f3ea Peter Rosin)
   o Provide the autoconf m4 macros for the new OpenSSL via pkg-config
     stuff. (674dc3d Harlan Stenn)
   o Use pkg-config (if available) to handle OpenSSL. (1c63860 Harlan Stenn)
   o We need AM_CPPFLAGS when compiling bufferevent_openssl.c (6d2613b
     Harlan Stenn)
   o Fix OSX build: $(OPENSSL_INCS) needs to be after
     $(AM_CPPFLAGS). (46f1769 Zack Weinberg)
   o Make gcc warnings on by default, and --enable-gcc-warnings only add
     -Werror (d46517e Sebastian Hahn)
   o Split up extra-long AC_CHECK_FUNCS/HEADERS lines in configure.in (88a30ad)
   o Move libevent 1.x headers to include/, to put all public headers in
     one place. (bbea8d6)
   o Put #ifdef around some files to support alternate build
     systems. (76d4c92 Ross Lagerwall)
   o Also make win32select.c conditional for IDE users (bf2c5a7)

 Debugging:
   o Add a magic number to debug_locks to better catch lock-coding
     errors. (b4a29c0 Dave Hart)
   o munge the debug_lock signature before freeing it: it might help us
     catch use-after-free (f28084d)
   o Added --enable-event-debugging in configure (bc7b4e4, a9c2c9a Mark Ellzey)
   o Debug addition for printing usec on TIMEOUT debugging. (ac43ce0 Mark Ellzey)
   o Added usec debug in another area for debug (3baab0d Mark Ellzey)
   o added timeout debug logs to include event ptr. (4b7d298 Mark Ellzey)
   o more event dbg updates (6727543 Mark Ellzey)
   o Clarify event_enable_debug_logging a little (6207826)
   o Make --enable-verbose-debug option match its help text (10c3450)
   o Add argument checks to some memory functions in `event.c'. (c8953d1
     Mansour Moufid)

 Testing:
   o More abstraction in test.sh (cd74c4e)
   o Add failing test for evbuffer_search_range. (8e26154 Nir Soffer)
   o Tweaks to return types with end-of-buf ptrs (9ab8ab8)
   o Add an (internal) usleep function for use by unit tests (f25d9d3)
   o Synchronize with upstream tinytest (6c81be7)
   o Make test-changelist faster (7622d26)
   o Reduce the timeout in the main/fork test. (ab14f7c)
   o New evhttp function to adjust initial retry timeout (350a3c4)
   o Make regression tests run over 3x faster. (67a1763)
   o Use test_timeval_diff_eq more consistently (b77b43f)
   o Allow more slop in deferred_cb_skew test; freebsd needs it (b9f7e5f)
   o When including an -internal.h header outside the main tree, do so
     early (95e2455)
   o Add a new test: test-fdleak which tests for fd leaks by creating many
     sockets. (2ef9278 Ross Lagerwall, f7af194, 1c4288f, etc)
   o Add a unit test for event_base_dump_events() (7afe48a, 8d08cce)
   o Test more bufferevent_ratelim features (c24f91a)

 Documentation:
   o Improve evbuffer_ptr documentation (261ba63)
   o added comments to describe refcounting of multicast chains (ba24f61
     Joachim Bauch)
   o Add doxygen for event_base_dump_events (cad5753)

 OSX:
   o Use "unlimited select" on OSX so that we can have more than
     FD_SETSIZE fds (1fb5cc6)

 KQueue:
   o Use SIG_IGN instead of a do-nothing handler for signal events with
     kqueue (148458e Zack Weinberg)

 evprc:
   o event_rpcgen.py now prints status information to stdout and errors to
     stderr. (ffb0ba0 Ross Lagerwall)

 Code improvement and refactoring:
   o Make event_reinit() more robust and maintainable (272033e)
   o Restore fast-path event_reinit() for slower backends (2c4b5de)
   o Check changelist as part of checking representational integrity (39b3f38)
   o Fix a compile warning in event_reinit (e4a56ed Sebastian Hahn)
   o Refactor the functions that run over every event. (c89b4e6)
   o Remove the last vestiges of _EVENT_USE_EVENTLIST (a3cec90)
   o Make event-config.h depend on Makefile.am (2958a5c)

 Build fixes:
   o Don't do clang version detection when disabling some flags (083296b
     Sebastian Hahn)

 C standards conformance:
   o Check for NULL return on win32 mm_calloc, and set ENOMEM. (af7ba69)
   o Convert event-config.h macros to avoid reserved identifiers (68120d9)
   o Generate event-config.h using the correct macros. (f82c57e)
   o Convert include-guard macro convention to avoid reserved identifiers
     (3f8c7cd)
   o Make event_rpcgen.py output conform to identifier conventions (372bff1)
   o Stop referring to an obsolete include guard in bench_http.h (5c0f7e0)
   o Make the generated event-config.h use correct include guards (639383a)
   o Fix all identifiers with names beginning with underscore. (cb9da0b)
   o Make event_rpcgen.py output conform to identifier conventions, more
     (bcefd24)
   o Fix some problems introduced by automated identifier cleanup script
     (c963534)
   o Have all visible internal function names end with an underscore. (8ac3c4c)
   o Apply the naming convention to our EVUTIL_IS* functions (c7848fa)
   o Clean up lingering _identifiers. (946b584)
   o Fix doxygen to use new macro conventions (da455e9)

 Bugfixes:
   o Do not use system EAI/AI values if we are not using the system
     getaddrinfo. (7bcac07)

 Sample Code:
   o Fix up sample/event-test.c to use newer interfaces and make it
     actually work. (19bab4f Ross Lagerwall)
   o On Unix, remove event.fifo left by sample/event-test.c. (c0dacd2 Ross
     Lagerwall)
   o Rename event-test.c to event-read-fifo.c. (a5b370a Ross Lagerwall)
   o event-read-fifo: Use EV_PERSIST appropriately (24dab0b)