History log of /lighttpd1.4/src/sock_addr.c (Results 1 – 17 of 17)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: lighttpd-1.4.69, lighttpd-1.4.68, lighttpd-1.4.67, lighttpd-1.4.66, lighttpd-1.4.65
# f2610d23 03-May-2022 Glenn Strauss <[email protected]>

[multiple] use buffer_append_char()


Revision tags: lighttpd-1.4.64, lighttpd-1.4.63, lighttpd-1.4.62, lighttpd-1.4.61, lighttpd-1.4.60
# f7018e3d 17-Aug-2021 Glenn Strauss <[email protected]>

[core] sock_addr_set_port()


# af3df29a 09-Jun-2021 Glenn Strauss <[email protected]>

[multiple] reduce redundant NULL buffer checks

This commit is a large set of code changes and results in removal of
hundreds, perhaps thousands, of CPU instructions, a portion of which
are on hot co

[multiple] reduce redundant NULL buffer checks

This commit is a large set of code changes and results in removal of
hundreds, perhaps thousands, of CPU instructions, a portion of which
are on hot code paths.

Most (buffer *) used by lighttpd are not NULL, especially since buffers
were inlined into numerous larger structs such as request_st and chunk.

In the small number of instances where that is not the case, a NULL
check is often performed earlier in a function where that buffer is
later used with a buffer_* func. In the handful of cases that remained,
a NULL check was added, e.g. with r->http_host and r->conf.server_tag.

- check for empty strings at config time and set value to NULL if blank
string will be ignored at runtime; at runtime, simple pointer check
for NULL can be used to check for a value that has been set and is not
blank ("")
- use buffer_is_blank() instead of buffer_string_is_empty(),
and use buffer_is_unset() instead of buffer_is_empty(),
where buffer is known not to be NULL so that NULL check can be skipped
- use buffer_clen() instead of buffer_string_length() when buffer is
known not to be NULL (to avoid NULL check at runtime)
- use buffer_truncate() instead of buffer_string_set_length() to
truncate string, and use buffer_extend() to extend

Examples where buffer known not to be NULL:
- cpv->v.b from config_plugin_values_init is not NULL if T_CONFIG_BOOL
(though we might set it to NULL if buffer_is_blank(cpv->v.b))
- address of buffer is arg (&foo)
(compiler optimizer detects this in most, but not all, cases)
- buffer is checked for NULL earlier in func
- buffer is accessed in same scope without a NULL check (e.g. b->ptr)

internal behavior change:
callers must not pass a NULL buffer to some funcs.
- buffer_init_buffer() requires non-null args
- buffer_copy_buffer() requires non-null args
- buffer_append_string_buffer() requires non-null args
- buffer_string_space() requires non-null arg

show more ...


# db853f9c 27-May-2021 Glenn Strauss <[email protected]>

[core] sock_addr_from_buffer_hints_numeric unused

comment out sock_addr_from_buffer_hints_numeric(); currently unused


# dc01487e 25-Mar-2021 Glenn Strauss <[email protected]>

[multiple] use buffer_append_* aggregates

reduces the number of round-trips into some frequently-called routines


Revision tags: lighttpd-1.4.59, lighttpd-1.4.58
# 89a3987c 22-Dec-2020 Glenn Strauss <[email protected]>

[core] prefer IPv6+IPv4 func vs IPv4-specific func


Revision tags: lighttpd-1.4.57
# 76faed91 16-Dec-2020 Glenn Strauss <[email protected]>

[multiple] replace fall through comment with attr

replace /* fall through */ comment with __attribute_fallthrough__ macro

Note: not adding attribute to code with external origins:
xxhash.h (algo_

[multiple] replace fall through comment with attr

replace /* fall through */ comment with __attribute_fallthrough__ macro

Note: not adding attribute to code with external origins:
xxhash.h (algo_xxhash.h)
ls-hpack/lshpack.c
so to avoid warnings, may need to compile with -Wno-implicit-fallthrough

show more ...


Revision tags: lighttpd-1.4.56, lighttpd-1.4.56-rc7, lighttpd-1.4.56-rc6, lighttpd-1.4.56-rc5, lighttpd-1.4.56-rc4, lighttpd-1.4.56-rc3, lighttpd-1.4.56-rc2, lighttpd-1.4.56-rc1
# c18f442a 20-May-2020 Glenn Strauss <[email protected]>

[multiple] add summaries to top of some modules


Revision tags: lighttpd-1.4.55
# 9914bb29 18-Jan-2020 Glenn Strauss <[email protected]>

[core] C99 restrict on some base funcs

buffer.[ch], chunk.[ch], request.[ch], sock_addr.[ch]


# 2c180902 26-Dec-2019 Glenn Strauss <[email protected]>

[core] remove include base.h where unused


# 0ff60d82 08-Dec-2019 Glenn Strauss <[email protected]>

[multiple] rename r to rc rv rd wr to be different

variable rename


# 010c2894 25-Nov-2019 Glenn Strauss <[email protected]>

[multiple] prefer (connection *) to (srv *)

convert all log_error_write() to log_error() and pass (log_error_st *)

use con->errh in preference to srv->errh (even though currently same)

avoid passi

[multiple] prefer (connection *) to (srv *)

convert all log_error_write() to log_error() and pass (log_error_st *)

use con->errh in preference to srv->errh (even though currently same)

avoid passing (server *) when previously used only for logging (errh)

show more ...


# 851728c6 28-Sep-2019 Glenn Strauss <[email protected]>

[core] avoid freeaddrinfo() on NULL ptr (fixes #2984)

getaddrinfo() should return non-empty result list (res)
or else should return EAI_NONAME or some other error

(musl C library does not check for

[core] avoid freeaddrinfo() on NULL ptr (fixes #2984)

getaddrinfo() should return non-empty result list (res)
or else should return EAI_NONAME or some other error

(musl C library does not check for NULL argument to freeaddrinfo())

x-ref:
"Segmentation fault in mod_extforward with libmusl"
https://redmine.lighttpd.net/issues/2984

show more ...


# 186ce8a2 25-Jun-2019 Glenn Strauss <[email protected]>

[core] allocate unix socket paths with SUN_LEN()+1 (fixes #2962)

(thx lighthouse2)

x-ref:
"SUN_LEN in sock_addr.c (1.4.53, 1.4.54)"
https://redmine.lighttpd.net/issues/2962


Revision tags: lighttpd-1.4.54, lighttpd-1.4.53, lighttpd-1.4.52, lighttpd-1.4.51
# 0257c822 26-Sep-2018 Glenn Strauss <[email protected]>

[core] quiet coverity false positive


Revision tags: lighttpd-1.4.50, lighttpd-1.4.49, lighttpd-1.4.48
# da6b2dc1 04-Nov-2017 Glenn Strauss <[email protected]>

[core] quiet coverity false positive


# 1367f606 29-Oct-2017 Glenn Strauss <[email protected]>

[core] isolate sock_addr manipulation