[PATCH] smbd: Avoid duplicate debug header lines

Volker Lendecke Volker.Lendecke at SerNet.DE
Fri Jan 10 05:14:01 MST 2014


Hi!

Please review & push!

Thanks,

Volker

-- 
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de, mailto:kontakt at sernet.de
-------------- next part --------------
From 7a55a0f7ebf37b1d91c1901feea700cf23267d5b Mon Sep 17 00:00:00 2001
From: Volker Lendecke <vl at samba.org>
Date: Fri, 10 Jan 2014 13:02:59 +0100
Subject: [PATCH] smbd: Avoid duplicate debug header lines

This is what gets created in log.smbd: DEBUGLVL generates an empty
header line, CHECK_DEBUGLVL avoids this.

[2014/01/10 12:58:24.971658, 10, pid=2329, effective(1001, 1001), real(0, 0)] ../source3/smbd/smbXsrv_open.c:696(smbXsrv_open_global_store)
[2014/01/10 12:58:24.971690, 10, pid=2329, effective(1001, 1001), real(0, 0)] ../source3/smbd/smbXsrv_open.c:698(smbXsrv_open_global_store)

Signed-off-by: Volker Lendecke <vl at samba.org>
---
 source3/smbd/smbXsrv_open.c |   14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/source3/smbd/smbXsrv_open.c b/source3/smbd/smbXsrv_open.c
index 3f2451d..c3837be 100644
--- a/source3/smbd/smbXsrv_open.c
+++ b/source3/smbd/smbXsrv_open.c
@@ -601,7 +601,7 @@ static void smbXsrv_open_global_verify_record(struct db_record *db_rec,
 	}
 
 	DEBUG(10,("smbXsrv_open_global_verify_record\n"));
-	if (DEBUGLVL(10)) {
+	if (CHECK_DEBUGLVL(10)) {
 		NDR_PRINT_DEBUG(smbXsrv_open_globalB, &global_blob);
 	}
 
@@ -627,7 +627,7 @@ static void smbXsrv_open_global_verify_record(struct db_record *db_rec,
 			 "key '%s' server_id %s does not exist.\n",
 			 hex_encode_talloc(frame, key.dptr, key.dsize),
 			 server_id_str(frame, &global->server_id)));
-		if (DEBUGLVL(2)) {
+		if (CHECK_DEBUGLVL(2)) {
 			NDR_PRINT_DEBUG(smbXsrv_open_globalB, &global_blob);
 		}
 		TALLOC_FREE(frame);
@@ -693,7 +693,7 @@ static NTSTATUS smbXsrv_open_global_store(struct smbXsrv_open_global0 *global)
 		return status;
 	}
 
-	if (DEBUGLVL(10)) {
+	if (CHECK_DEBUGLVL(10)) {
 		DEBUG(10,("smbXsrv_open_global_store: key '%s' stored\n",
 			 hex_encode_talloc(global->db_rec, key.dptr, key.dsize)));
 		NDR_PRINT_DEBUG(smbXsrv_open_globalB, &global_blob);
@@ -861,7 +861,7 @@ NTSTATUS smbXsrv_open_create(struct smbXsrv_connection *conn,
 		return status;
 	}
 
-	if (DEBUGLVL(10)) {
+	if (CHECK_DEBUGLVL(10)) {
 		struct smbXsrv_openB open_blob;
 
 		ZERO_STRUCT(open_blob);
@@ -932,7 +932,7 @@ NTSTATUS smbXsrv_open_update(struct smbXsrv_open *op)
 		return status;
 	}
 
-	if (DEBUGLVL(10)) {
+	if (CHECK_DEBUGLVL(10)) {
 		struct smbXsrv_openB open_blob;
 
 		ZERO_STRUCT(open_blob);
@@ -1010,7 +1010,7 @@ NTSTATUS smbXsrv_open_close(struct smbXsrv_open *op, NTTIME now)
 			error = status;
 		}
 
-		if (NT_STATUS_IS_OK(status) && DEBUGLVL(10)) {
+		if (NT_STATUS_IS_OK(status) && CHECK_DEBUGLVL(10)) {
 			struct smbXsrv_openB open_blob;
 
 			ZERO_STRUCT(open_blob);
@@ -1277,7 +1277,7 @@ NTSTATUS smb2srv_open_recreate(struct smbXsrv_connection *conn,
 		return status;
 	}
 
-	if (DEBUGLVL(10)) {
+	if (CHECK_DEBUGLVL(10)) {
 		struct smbXsrv_openB open_blob;
 
 		ZERO_STRUCT(open_blob);
-- 
1.7.9.5



More information about the samba-technical mailing list