if (!gns_resolve_name(af, name, &u) == 0)
{
status = NSS_STATUS_NOTFOUND;
+ goto finish;
}
}
+ else
+ {
+ status = NSS_STATUS_UNAVAIL;
+ goto finish;
+ }
if (u.count == 0) {
*errnop = ETIMEDOUT;
*h_errnop = HOST_NOT_FOUND;
+ status = NSS_STATUS_NOTFOUND;
goto finish;
}
line[strlen(line)-1] = '\0';
if (af == AF_INET)
{
- if (inet_pton(af, line, &(u->data.ipv4[u->count++])))
+ if (inet_pton(af, line, &(u->data.ipv4[u->count])))
+ {
+ u->count++;
u->data_len += sizeof(ipv4_address_t);
+ }
else
{
fclose (p);
}
else if ((af == AF_INET6))
{
- if (inet_pton(af, line, &(u->data.ipv6[u->count++])))
+ if (inet_pton(af, line, &(u->data.ipv6[u->count])))
+ {
+ u->count++;
u->data_len += sizeof(ipv6_address_t);
+ }
else
{
fclose (p);