Hi Davide,
Strictly speaking the examples/ change should be in its own patch. See HACKING.
> @@ -911,9 +923,10 @@ static void dhcp_client_rx_message(const void *data, size_t len, void *userdata)
> ia.s_addr = client->lease->address;
>
> /* For unit testing we don't want this to be a fatal error */
> - if (!l_acd_start(client->acd, inet_ntoa(ia))) {
> + if (!inet_ntop(AF_INET, &ia, buf, INET_ADDRSTRLEN) ||
> + !l_acd_start(client->acd, buf)) {
> CLIENT_DEBUG("Failed to start ACD on %s, continuing",
> - inet_ntoa(ia));
> + IP_STR(ia.s_addr));
Not sure introducing IP_STR macro just for this is worth it, but ok...
Looks like indentation problem here too. Maybe you want to put the inet_ntop
business outside of l_strdup_printf call to make things more readable?
RispondiInoltra |