]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
pullup:
authorAndreas Gustafsson <source@isc.org>
Tue, 11 Jul 2000 00:56:03 +0000 (00:56 +0000)
committerAndreas Gustafsson <source@isc.org>
Tue, 11 Jul 2000 00:56:03 +0000 (00:56 +0000)
 311.   [bug]           lwres_conf_parse failed when the first line of
                        resolv.conf was empty or a comment.

lib/lwres/lwconfig.c

index 8cbd1ba23ff903a0f2ec08acd3e679a69aa21517..cb109bd0f5ea0e2a05f50489a07f8278da724f79 100644 (file)
@@ -15,7 +15,7 @@
  * SOFTWARE.
  */
 
-/* $Id: lwconfig.c,v 1.15.2.3 2000/07/10 23:20:12 gson Exp $ */
+/* $Id: lwconfig.c,v 1.15.2.4 2000/07/11 00:56:03 gson Exp $ */
 
 /***
  *** Module for parsing resolv.conf files.
@@ -286,7 +286,7 @@ lwres_conf_parsenameserver(lwres_context_t *ctx,  FILE *fp) {
        confdata = &ctx->confdata;
 
        if (confdata->nsnext == LWRES_CONFMAXNAMESERVERS)
-               return (LWRES_R_FAILURE);
+               return (LWRES_R_SUCCESS);
 
        res = getword(fp, word, sizeof(word));
        if (strlen(word) == 0)
@@ -422,7 +422,7 @@ lwres_create_addr(const char *buffer, lwres_addr_t *addr) {
                addr->length = NS_IN6ADDRSZ;
                len = 16;
        } else {
-               return (LWRES_R_FAILURE); /* Unrecongnised format. */
+               return (LWRES_R_FAILURE); /* Unrecognised format. */
        }
 
        memcpy((void *)addr->address, addrbuff, len);
@@ -560,7 +560,7 @@ lwres_conf_parse(lwres_context_t *ctx, const char *filename) {
                        rval = lwres_conf_parsesortlist(ctx, fp);
                else if (strcmp(word, "option") == 0)
                        rval = lwres_conf_parseoption(ctx, fp);
-               else if (strlen(word) > 0) {
+               else {
                        /* unrecognised word. Ignore entire line */
                        rval = LWRES_R_SUCCESS;
                        stopchar = eatline(fp);