
6 Jun
2024
6 Jun
'24
6:21 p.m.
On 6/6/24 18:02, Ilias Apalodimas wrote:
[...]
if (!ipaddr) {
printf("DNS: host not found\n");
host_ipaddr.addr = 0;
return;
}
if (var)
env_set(var, ipstr);
Do we need this? Won't this set <dns_name> == ipaddr?
No, the syntax of the dns command is: 'dns hostname [env_var]' so one can pretty much give any variable name to receive the IP address.
If we do not need it repurpose the void *arg and get rid of the global 'done'
I could probably use a struct to get rid of the globals. Let me see what I can do.
Yea just pass a struct with char* and a bool * and you should be fine
Done in v4.
Thanks,
--
Jerome