Skip to content

Commit

Permalink
Fix lookup with HOSTALIASES set.
Browse files Browse the repository at this point in the history
ares__read_line returns ARES_EOF when it reaches the end of the
file. This will happen every time when reading to the end of the
HOSTALIASES file. Unfortunately single_domain treats this error as
being fatal.

Signed-off-by: Mike Crowe <mac@mcrowe.com>
  • Loading branch information
mikecrowe authored and bagder committed Sep 29, 2010
1 parent 293cd31 commit fa0dd47
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ares_search.c
Expand Up @@ -287,7 +287,7 @@ static int single_domain(ares_channel channel, const char *name, char **s)
}
free(line);
fclose(fp);
if (status != ARES_SUCCESS)
if (status != ARES_SUCCESS && status != ARES_EOF)
return status;
}
else
Expand Down

0 comments on commit fa0dd47

Please sign in to comment.