Attention is currently required from: neels.
5 comments:
File src/core/socket.c:
Patch Set #1, Line 1968: return -EBADF;
i understand, but for the snprintf() like function signature, if at all possible you should always r […]
Ack
Patch Set #1, Line 1993: v6 = !!s
assigning a value to is_v6 in an 'else' clause and using is_v6 below. […]
I only care about checking if the address is ipv6 in the case where we only have 1 IP, because in that case I need to put "[]" around it to separate it from the port number. If there's more than 1, no need, because everything is already enclosed in "()".
So by doing it here I avoid doing a lookup in a string unless it's strictly needed.
Patch Set #1, Line 2005: OSMO_STRBUF_PRINTF(sb, "<need-more-bufs!>");
(could print this above instead of adding the need_more_bufs local var, just my opinion) […]
I could write an entire novel explaining the error there, but have that token printed and looking at the code already quickly explains what's going on.
I want to print it here because at least is provides as many addresses as it can fit.
Patch Set #1, Line 2019: bool is_v6 = false;
(can this code dup be collapsed with the above, maybe with a static func?)
It could, I'd need to pass the sb as a param and so on, and I'm not sure if the macros can use an sb pointer....
Patch Set #1, Line 2052: int osmo_sock_get_name_buf(char *str, size_t str_len, int fd)
my first thought is "yes, sounds good". […]
I prefer keeping the multiaddr prefix instead of a "2", we already use it in several places. This way code knowing only to be handling single address protocols can keep using it.
To view, visit change 35180. To unsubscribe, or for help writing mail filters, visit settings.