icy17
fc48803db4
Fix potential Null pointer dereference in regress_zlib.c ( #1597 )
...
Co-authored-by: Azat Khuzhin <a3at.mail@gmail.com>
2024-04-15 10:02:27 +03:00
Andy Pan
e66df92cfc
Accept SOCK_NONBLOCK/SOCK_CLOEXEC in type argument of socketpair ( #1567 )
...
Setting `SOCK_NONBLOCK` and `SOCK_CLOEXEC` in the `type` argument of `socketpair()` is widely supported across UNIX-like OS: Linux, *BSD, Solaris, etc., as is the `socket()`. This will conserve several extra system calls, we should use it where available.
### References
- [socketpair(2) on Linux](https://man7.org/linux/man-pages/man2/socketpair.2.html#HISTORY )
- [socketpair(2) on FreeBSD](https://man.freebsd.org/cgi/man.cgi?query=socketpair&sektion=2#DESCRIPTION )
- [socketpair(2) on DragonFly](https://man.dragonflybsd.org/?command=socketpair§ion=2 )
- [socketpair(2) on NetBSD](https://man.netbsd.org/socketpair.2#DESCRIPTION )
- [socketpair(2) on OpenBSD](https://man.openbsd.org/socketpair.2 )
- [socketpair(3C) on Solaris](https://docs.oracle.com/cd/E88353_01/html/E37843/socketpair-3c.html )
Changelog:
- Set SOCK_NONBLOCK and SOCK_CLOEXEC in the type argument of socketpair
- Avoid EPROTOTYPE on macOS and OpenBSD
- Eliminate the warnings about unused variables
- Add some comments
2024-03-07 09:19:11 +01:00
Sam James
4c38de8cb3
Fix -Walloc-size ( #1526 )
...
Co-authored-by: Azat Khuzhin <azat@libevent.org>
2023-11-26 21:52:32 +01:00
Azat Khuzhin
2c62062e12
Fix signedness differ for iov_base (solaris)
2016-12-06 12:54:33 +03:00
Nick Mathewson
4947c1852f
Heap-allocate zlib data structure in regress_zlib tests
2014-03-12 14:29:15 -04:00
Nick Mathewson
2e6a985003
Merge remote-tracking branch 'github/20_win64_compilation' into 21_win64_compilation
...
Conflicts:
event.c
http.c
sample/event-read-fifo.c
test/regress_bufferevent.c
2012-11-01 18:12:07 -04:00
Nick Mathewson
94866c2763
Compile without warnings on mingw64
...
This is mostly a matter of catching cases where we were still
assuming that evutil_socket_t could be used as an int.
2012-11-01 17:56:06 -04:00
Nick Mathewson
539466e568
Merge remote-tracking branch 'origin/patches-2.0'
...
Conflicts:
Makefile.am
WIN32-Code/event2/event-config.h
configure.in
2012-02-10 17:33:50 -05:00
Nick Mathewson
e49e289129
Update copyright notices to 2012
2012-02-10 17:29:53 -05:00
Nick Mathewson
0cb70e3333
Merge remote-tracking branch 'origin/patches-2.0'
2011-10-26 10:17:21 -04:00
Nick Mathewson
3c824bd334
Update copyright dates to 2011.
2011-10-24 13:18:09 -04:00
Nick Mathewson
9f560bfa11
Use "_WIN32", not WIN32: it's standard and we don't need to fake it
...
This patch was automatically generated with perl.
Based on a patch by Peter Rosin.
2011-05-25 20:03:15 -04:00
Sebastian Hahn
5786b91e2e
Fix a compile warning with zlib 1.2.4 and 1.2.5
...
I took this fix from Tor (commit 1a52e39c22d5, author Nick Mathewson,
Copyright (c) 2007-2011, The Tor Project, Inc.) and adapted it slightly
for libevent.
2011-05-06 10:58:06 -04:00
Sebastian Hahn
3819b62cea
Add a forgotten return value check in the unit tests
...
Spotted by clang's static analyzer
2011-04-23 02:04:58 +02:00
Nick Mathewson
7bcace2d54
Fix some irix compilation warnings spotted by Kevin Bowling
2010-11-22 21:02:34 -05:00
Nick Mathewson
e5c214a423
Fix -Wsigned-compare warnings in test/*
2010-10-14 13:16:41 -04:00
Nick Mathewson
743f866539
Honor NDEBUG; build without warnings with NDEBUG; make NDEBUG always-off in unit test code
2010-08-23 11:49:06 -04:00
Nick Mathewson
ec347b9225
Move event-config.h to include/event2
...
This change means that all required include files are in event2, and
all files not in event2/* are optional.
2010-08-06 20:21:27 -04:00
Sebastian Sjöberg
899c1dcc98
Replace EVUTIL_CLOSESOCKET macro with a function
...
The EVUTIL_CLOSESOCKET() macro required you to include unistd.h in your
source for POSIX. We might as well turn it into a function: an extra
function call is going to be cheap in comparison with the system call.
We retain the EVUTIL_CLOSESOCKET() macro as an alias for the new
evutil_closesocket() function.
(commit message from email by Nick and Sebastian)
2010-04-14 15:42:57 -04:00
Nick Mathewson
274a7bd9a1
Fix some memory leaks in the unit tests
...
These don't matter except inasmuch as they give real memory leaks
a place to hide.
Found with valgrind
2010-03-13 00:56:07 -05:00
Nick Mathewson
17efc1cdfa
Update all our copyright notices to say "2010"
2010-03-04 01:38:48 -05:00
Nick Mathewson
e5bbd40ad7
Clean up formatting: use tabs, not 8-spaces, to indent.
2010-02-18 17:44:09 -05:00
Nick Mathewson
784b8773a4
We do not work any more without an event-config.h; stop pretending that it is meaningful to check for HAVE_CONFIG_H
...
svn:r1516
2009-11-06 21:46:57 +00:00
Nick Mathewson
d866f05585
Patch from Zack Weinberg: normalize perror() tt functions and add tt_fail/tt_abort_printf
...
svn:r1340
2009-07-13 20:03:00 +00:00
Nick Mathewson
0b22ca1929
Use ev_ssize_t in place of ssize_t *everywhere*.
...
svn:r1309
2009-05-22 19:11:48 +00:00
Nick Mathewson
23243b8a98
Replace reserve/commit with new iovec-based interface. Add a new evbuffer_peek.
...
svn:r1296
2009-05-19 21:39:35 +00:00
Nick Mathewson
df0617f289
Use signal.h, not sys/signal.h.
...
This is patch 2673214 from mmadia. It is correct, since we unconditionally
include signal.h in many other places, and only sometimes include sys/signal.h.
It is necessary to compile on Haiku, I'm told.
svn:r1228
2009-04-23 00:21:23 +00:00
Nick Mathewson
a8f6d961eb
Actually stop using EVBUFFER_LENGTH/DATA, and move them to buffer_compat.h
...
svn:r1183
2009-04-17 06:56:09 +00:00
Nick Mathewson
68d0139f19
Refactor the zlib and pthreads tests to appear in the regular tinytest tree structure.
...
svn:r1141
2009-04-07 04:49:25 +00:00
Nick Mathewson
ea4b8724c0
checkpoint work on big bufferevent refactoring
...
svn:r1095
2009-02-02 19:22:13 +00:00
Nick Mathewson
b85b710cf5
Update copyright statements to reflect the facts that:
...
a) this is 2009
b) niels and nick have been comaintainers for a while
c) saying "all rights reserved" when you then go on to explicitly
disclaim some rights is sheer cargo-cultism.
svn:r1065
2009-01-27 22:34:36 +00:00
Nick Mathewson
8889a77039
Replace all use of config.h with event-config.h.
...
svn:r1064
2009-01-27 22:30:46 +00:00
Nick Mathewson
8acb80b4f9
r15551@tombo: nickm | 2008-05-08 14:49:20 -0400
...
Use _get_ convention for new accessor functions. (These are all new ones as of 2.0, I believe).
svn:r799
2008-05-08 22:51:39 +00:00
Nick Mathewson
4e8a339ef7
r19602@catbus: nickm | 2008-05-05 11:45:18 -0400
...
Make most of the tests use the new headers.
svn:r776
2008-05-05 15:46:00 +00:00
Niels Provos
f04497e493
introduce evbuffer_reserve_space() and evbuffer_commit_space() to make processing in filters more efficient
...
svn:r757
2008-05-03 03:05:28 +00:00
Niels Provos
becc89b778
introduce evbuffer_contiguous_space() and use it in the zlib filter test
...
svn:r756
2008-05-03 02:37:18 +00:00
Niels Provos
d76cca7273
fix missing printf format argument
...
svn:r752
2008-04-30 04:36:26 +00:00
Niels Provos
ccb70f1bc7
provide example bufferevent filters doing compression and decompression as additional regression test
...
svn:r751
2008-04-30 04:31:10 +00:00