From: Jeremy Allison Date: Sat, 12 Apr 2008 00:41:49 +0000 (-0700) Subject: Fix bug #5386, don't keep printing the same waiting X-Git-Tag: samba-3.3.0pre1~2737 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=12e6818df1c77810a59a2896f8c44c91fc24e7ae;p=thirdparty%2Fsamba.git Fix bug #5386, don't keep printing the same waiting error message. Jeremy. --- diff --git a/source/nmbd/nmbd.c b/source/nmbd/nmbd.c index 9797a7adb67..03494453179 100644 --- a/source/nmbd/nmbd.c +++ b/source/nmbd/nmbd.c @@ -170,6 +170,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)) { @@ -188,7 +189,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--) { char str[INET6_ADDRSTRLEN]; @@ -280,8 +280,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