Attention is currently required from: msuraev.
Patch set 8:Code-Review -1
3 comments:
Patchset:
the code added in https://gerrit.osmocom.org/c/libosmocore/+/28992 should move to this function, as indicated below
File src/socket.c:
Patch Set #8, Line 208: * buf_len >= 2: (hostA|hostB|...|...)
(this doc is wrong)
if you use an implementation like this here, we don't need to add osmo_sockaddr_strs_to_str() at all and save a lot of dynamic allocations:
struct osmo_strbuf sb = { ... };
if (i != 1)
OSMO_STRBUF_PRINTF(sb, "(");
for (...) {
struct osmo_sockaddr_str ss;
if (i)
OSMO_STRBUF_PRINTF(sb, "|");
osmo_sockaddr_str_from_str2(&ss, hosts[i]);
OSMO_STRBUF_PRINTF(sb, OSMO_SOCKADDR_STR_FMT, OSMO_SOCKADDR_STR_FMT_ARGS(&ss));
}
if (i != 1)
OSMO_STRBUF_PRINTF(sb, ")");
return sb.chars_needed;
To view, visit change 28993. To unsubscribe, or for help writing mail filters, visit settings.