about summary refs log tree commit diff
path: root/hesiod/hesiod.c
diff options
context:
space:
mode:
Diffstat (limited to 'hesiod/hesiod.c')
-rw-r--r--hesiod/hesiod.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/hesiod/hesiod.c b/hesiod/hesiod.c
index 3a01fd076b..0d68319b48 100644
--- a/hesiod/hesiod.c
+++ b/hesiod/hesiod.c
@@ -134,7 +134,7 @@ hesiod_init(void **context) {
 		__set_errno(ENOEXEC);
 		goto cleanup;
 	}
-	
+
 #if 0
 	if (res_ninit(ctx->res) < 0)
 		goto cleanup;
@@ -248,8 +248,8 @@ hesiod_resolve(void *context, const char *name, const char *type) {
 		free(bindname);
 		return (retvec);
 	}
-	
-	if (errno != ENOENT)
+
+	if (errno != ENOENT && errno != ECONNREFUSED)
 		return (NULL);
 
 	retvec = get_txt_records(ctx, C_HS, bindname);
@@ -290,7 +290,7 @@ parse_config_file(struct hesiod_p *ctx, const char *filename) {
 	 */
 	if (!(fp = fopen(filename, "r")))
 		return (-1);
-	
+
 	while (fgets(buf, sizeof(buf), fp) != NULL) {
 		cp = buf;
 		if (*cp == '#' || *cp == '\n' || *cp == '\r')
@@ -301,7 +301,7 @@ parse_config_file(struct hesiod_p *ctx, const char *filename) {
 		while(*cp != ' ' && *cp != '\t' && *cp != '=')
 			cp++;
 		*cp++ = '\0';
-		
+
 		while(*cp == ' ' || *cp == '\t' || *cp == '=')
 			cp++;
 		data = cp;
@@ -325,7 +325,7 @@ parse_config_file(struct hesiod_p *ctx, const char *filename) {
 	}
 	fclose(fp);
 	return (0);
-	
+
  cleanup:
 	fclose(fp);
 	if (ctx->RHS)
@@ -494,7 +494,7 @@ __hesiod_res_set(void *context, struct __res_state *res,
 
 static int
 init(struct hesiod_p *ctx) {
-	
+
 	if (!ctx->res && !__hesiod_res_get(ctx))
 		return (-1);