smbd: Early return from dos_mode_debug_print
[obnox/samba/samba-obnox.git] / source3 / smbd / dosmode.c
index b2476ce262eec86952bca1ac05e0ad3cd4f04ac5..0f3eef04492c5a94e71bab952ddea7be337670b0 100644 (file)
@@ -35,6 +35,10 @@ static void dos_mode_debug_print(const char *func, uint32_t mode)
 {
        fstring modestr;
 
+       if (DEBUGLEVEL < DBGLVL_INFO) {
+               return;
+       }
+
        modestr[0] = '\0';
 
        if (mode & FILE_ATTRIBUTE_HIDDEN) {
@@ -62,7 +66,8 @@ static void dos_mode_debug_print(const char *func, uint32_t mode)
                fstrcat(modestr, "[compressed]");
        }
 
-       DBG_INFO("%s returning %s\n", func, modestr);
+       DBG_INFO("%s returning (0x%x): \"%s\"\n", func, (unsigned)mode,
+                modestr);
 }
 
 static uint32_t filter_mode_by_protocol(uint32_t mode)