Permalink
Browse files

Fix lookup with HOSTALIASES set.

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 23, 2010
1 parent 293cd31 commit fa0dd472cd647f94d8d1937b44ec87f4964c0b08
Showing with 1 addition and 1 deletion.
  1. +1 −1 ares_search.c
View
@@ -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

0 comments on commit fa0dd47

Please sign in to comment.