1
0
mirror of https://github.com/samba-team/samba.git synced 2025-07-30 19:42:05 +03:00

debug: Only call Debug1 once in dbghdrclass

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
This commit is contained in:
Volker Lendecke
2014-07-29 15:31:48 +00:00
committed by Michael Adam
parent 44c77e8032
commit 1929b1fa20

View File

@ -1036,14 +1036,17 @@ bool dbghdrclass(int level, int cls, const char *location, const char *func)
classname_table[cls]);
}
/* Print it all out at once to prevent split syslog output. */
if( state.settings.debug_prefix_timestamp ) {
(void)Debug1("%s] ", header_str);
} else {
(void)Debug1("%s] %s(%s)\n",
header_str, location, func );
strlcat(header_str, "] ", sizeof(header_str));
if (!state.settings.debug_prefix_timestamp) {
size_t hs_len = strlen(header_str);
snprintf(header_str + hs_len,
sizeof(header_str) - hs_len,
"%s(%s)\n", location, func);
}
(void)Debug1("%s", header_str);
errno = old_errno;
return( true );
}