2
0
Fork 0
Commit Graph

125 Commits

Author SHA1 Message Date
Stefan Bühler 4a4fd8fd11 [core] include and use hedley (v15) header
hedley is a single header to handle compiler-specific features:
https://nemequ.github.io/hedley/

Prefer headly macros over glib for now.

Change-Id: I3c67ebee0d43e27fde6402d47788e1045144e864
2021-08-05 12:29:46 +02:00
Stefan Bühler bc6b256c34 [core] use readdir instead of readdir_r
readdir_r is deprecated in glibc due to serious memory handling issues
in the API: one cannot pass the size of the allocated dirent.

glibc authors claims readdir is thread-safe in modern implementations,
and expect POSIX to require it in a future version.

No way to check whether readdir is thread-safe though :(

("thread-safe" in this context means different directory streams, which
is good enough.)

Also remove li_dirent_buf_size.

Change-Id: Ia5eae3327e97dc4b0751fb2604ea21c0ce09a5f9
2017-07-29 15:25:55 +02:00
Stefan Bühler 6a0e57ec8f [parsers] fix unused variable warnings
Change-Id: Ifc0210235ada102e2dbcba23e1179e87b973510f
2016-08-27 11:32:23 +02:00
Stefan Bühler f527a16138 [debug] provide more unique event names for waitqueues
Change-Id: Iddf9e10b3902fbfe4fa7e97b7a172018d0d70b54
2015-08-09 10:12:21 +02:00
Stefan Bühler f6def17999 [common] format IPv6 addresses with port as [addr]:port (added the square brackets)
Change-Id: Ic5246c6cf9e1762b8e8ea4c020983289c4e071c6
2015-08-06 21:49:06 +02:00
Stefan Bühler 811e13cfcd [common] fix out-of-bounds read in li_sockaddr_to_string
Change-Id: I8984b6b170a43eb8c0f648c31957c5ae441cf93f
2015-08-06 00:05:09 +02:00
Stefan Bühler 6b22f2f104 [mod_debug] debug events
Change-Id: Ib776e950902a36f13ed766a78a92f6971310e87d
2015-01-25 13:27:59 +01:00
Stefan Bühler 66bd6b22a2 track event "names" for debugging
Change-Id: Ib8f2b589a6087de2355906a87bd2cd0c84bafcba
2015-01-17 15:16:29 +01:00
Stefan Bühler d58d98a62d [value] move value functions that depend on angel / main implementations into separate file, included in the other implementations
this fixes building with --no-undefined. also link with libm in cmake.
2014-05-22 14:58:26 +02:00
Stefan Bühler b6ee9241ad [angel_fake] use li_sockaddr_from_string in li_angel_fake_listen 2014-04-15 13:05:52 +02:00
Stefan Bühler 63f4b78353 fix some socket address handlings - limit unix socket path names to struct size 2014-04-15 12:06:11 +02:00
Stefan Bühler 21e18176f2 fix wrong operator to check for set bit in events 2014-04-15 11:24:51 +02:00
Stefan Bühler acd2967534 assert many previously unchecked return values, handle some explicitly, remove FD_CLOEXEC in worker - mustn't fork 2014-04-15 11:11:51 +02:00
Stefan Bühler 176d6099aa [liValue] fix missing break in switch statement 2014-04-15 10:33:48 +02:00
Stefan Bühler e5e37b8369 [idlist] fix bad shift operations 2014-04-14 17:51:47 +02:00
Stefan Bühler 419d60dd83 [profile] add missing utils.h include 2014-04-11 12:30:42 +02:00
Stefan Bühler 17a5168793 [core] convert all assert() to LI_FORCE_ASSERT(), and support writing backtraces on fatal errors with libunwind 2014-04-11 11:40:24 +02:00
Stefan Bühler e2992d7b6b [ip-parser] allow [ipv6]/net:port and [ipv6/net]:port for IPv6 address + network + port 2014-04-10 12:40:08 +02:00
Stefan Bühler 01788a7250 [common] remove hash value type (use key/value lists instead) 2014-04-10 12:40:08 +02:00
Stefan Bühler db58828e0b [common] refactor liValue to share most of the code
* removing unused "range" value type in angel
2014-02-06 14:01:20 +01:00
Stefan Bühler d529150a9b [autotools] remove generated ragel parsers from dist 2014-02-04 13:22:01 +01:00
Stefan Bühler b783bd5aaa [misc] use less C99 features 2013-08-23 13:39:09 +02:00
Stefan Bühler ccd512ca57 [waf] remove waf for now, doesn't work anymore 2013-08-18 18:42:15 +02:00
Stefan Bühler 9aafe5aa2a [fetch] use signed integers for liFetchDatabase refcount 2013-07-20 11:49:49 +02:00
Stefan Bühler d5bb6003dc include lighttpd/settings.h instead of base.h in common source 2013-06-25 16:38:17 +02:00
Stefan Bühler 85fc9dbb6d [mod_gnutls,fetch api] associate sni certs with dh params, fix fetch bug 2013-06-09 18:10:23 +02:00
Stefan Bühler 05e058aa9c fix bugs and warnings reported by clang
* fix memset sizeof() bugs
 * fix unaligned memory access
 * fix warnings for casts with alignment change
 * crypt_r needs _GNU_SOURCE
2013-06-08 20:11:23 +02:00
Stefan Bühler 2bcb880dc8 [core] implement generic "fetch" api 2013-06-04 01:12:35 +02:00
Stefan Bühler 11b4bdd8c5 replace unneeded ev_/EV_ references 2013-05-25 14:37:09 +02:00
Stefan Bühler 709296d796 fix bugs and warnings from compiler warnings (memset parameter order, shadow, ...) 2013-05-25 12:59:14 +02:00
Stefan Bühler a937bd437a fix missing li prefixes 2013-05-23 17:56:24 +02:00
Stefan Bühler cfd8955008 [common] implement libev wrapper
* need a way to mark a watcher as "don't keep the loop alive"
2013-05-23 17:56:23 +02:00
Stefan Bühler ff69160c34 [core] Use streams 2013-05-23 12:01:04 +02:00
Stefan Bühler 092a1b0141 fix bugs found with clang-3.3 -fsanitize=address,undefined 2013-05-17 12:35:25 +02:00
Stefan Bühler 178e7c898f [profiler] use g_static_mutex to trigger mutext memory allocation before registering profiler alloc handlers 2012-12-06 15:34:51 +01:00
Stefan Bühler 8d709f8574 [ipv6 parser] Fix type-punned memory access 2012-03-13 00:19:56 +01:00
Stefan Bühler 3972451633 [ip-parser] fix ipv4 netmask for /0, added some unit tests 2012-01-18 10:35:35 +01:00
Stefan Bühler 9bf335c121 [jobqueue] add li_job_stop 2011-12-19 16:42:18 +01:00
Stefan Bühler f7730910ad [utils] handle NULL loop in li_ev_io_* event changing 2011-12-19 16:41:31 +01:00
Thomas Porzelt 2d52ff9170 [mempool] support profiler for mmap allocations. use g_malloc/free instead malloc/free 2011-11-26 16:07:38 +01:00
Thomas Porzelt aeb88422a0 [profiler] export li_profiler_enabled and li_profiler_hashtable_insert/remove. add heap base/break/size to dump output 2011-11-26 15:56:45 +01:00
Stefan Bühler ba3d50ba79 [mempool]: use g_free instead of free in ALLOC mode 2011-11-17 21:26:53 +01:00
Stefan Bühler bd5c2f4ebe move profiler code to common lib 2011-11-17 21:25:45 +01:00
Stefan Bühler 92ca097ed4 [jobqueue] as jobs in the queue could be removed in a callback we can\'t copy the queue to a private one, g_queue_unlink needs the real one 2011-08-09 20:17:13 +02:00
Stefan Bühler 4f377b792c [utils] fix calculation for sockaddr_un struct size 2011-05-02 12:30:39 +02:00
Stefan Bühler 8973c35562 [utils] Fix url decoding for non ascii values (signed char negatives) 2011-03-22 13:34:10 +01:00
Stefan Bühler 366d00328c Fix bug in delayed connection handling, 2nd try 2010-12-27 16:21:13 +01:00
Stefan Bühler 318b7bf041 Fix bug in delayed connection handling 2010-12-27 16:06:34 +01:00
Stefan Bühler 7a67ba94d7 [autotools]: make sure pkg-config m4 is available in autoconf, check for ragel in ./configure 2010-12-07 23:23:10 +01:00
Stefan Bühler 9568d7a41a [autotools] add memcached.c 2010-10-14 13:27:24 +02:00