improve case where service.switch exists but is missing a service
authorEric Allman <eric@ucbvax.Berkeley.EDU>
Sun, 11 Jun 1995 02:30:02 +0000 (18:30 -0800)
committerEric Allman <eric@ucbvax.Berkeley.EDU>
Sun, 11 Jun 1995 02:30:02 +0000 (18:30 -0800)
SCCS-vsn: usr.sbin/sendmail/src/conf.c 8.190

usr/src/usr.sbin/sendmail/src/conf.c

index 47fd5af..453a943 100644 (file)
@@ -7,7 +7,7 @@
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)conf.c     8.189 (Berkeley) %G%";
+static char sccsid[] = "@(#)conf.c     8.190 (Berkeley) %G%";
 #endif /* not lint */
 
 # include "sendmail.h"
@@ -729,10 +729,12 @@ switch_map_find(service, maptype, mapreturn)
                                if (p != NULL)
                                        *p++ = '\0';
                        } while (p != NULL);
-                       break;
+                       fclose(fp);
+                       return svcno;
                }
+
+               /* service was not found -- use compiled in default */
                fclose(fp);
-               return svcno;
        }
 #endif