Fix bug #5386, don't keep printing the same waiting
authorJeremy Allison <jra@samba.org>
Sat, 12 Apr 2008 00:41:45 +0000 (17:41 -0700)
committerJeremy Allison <jra@samba.org>
Sat, 12 Apr 2008 00:41:45 +0000 (17:41 -0700)
error message.
Jeremy.

source/nmbd/nmbd.c

index ce4173a3ef5a031393ed9b7fe91b42ed4c19285e..df383996fd7f81b8f82995eb17b68e8ba06ba426 100644 (file)
@@ -157,6 +157,7 @@ static void reload_interfaces(time_t t)
 {
        static time_t lastt;
        int n;
+       bool print_waiting_msg = true;
        struct subnet_record *subrec;
 
        if (t && ((t - lastt) < NMBD_INTERFACES_RELOAD)) {
@@ -174,7 +175,6 @@ static void reload_interfaces(time_t t)
           some subnets */
        load_interfaces();
 
-
        /* find any interfaces that need adding */
        for (n=iface_count() - 1; n >= 0; n--) {
                struct interface *iface = get_interface(n);
@@ -235,8 +235,11 @@ static void reload_interfaces(time_t t)
        /* We need to wait if there are no subnets... */
        if (FIRST_SUBNET == NULL) {
 
-               DEBUG(0,("reload_interfaces: "
-                       "No subnets to listen to. Waiting..\n"));
+               if (print_waiting_msg) {
+                       DEBUG(0,("reload_interfaces: "
+                               "No subnets to listen to. Waiting..\n"));
+                       print_waiting_msg = false;
+               }
 
                /*
                 * Whilst we're waiting for an interface, allow SIGTERM to