From 99de0cf6ff085476191d6f3e63327c5068a233f8 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Thu, 5 Jan 2023 16:06:40 +0100 Subject: [PATCH] smbd: Modernize DBG statements in smbXsrv_open_global_store() Signed-off-by: Volker Lendecke Reviewed-by: Stefan Metzmacher --- source3/smbd/smbXsrv_open.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/source3/smbd/smbXsrv_open.c b/source3/smbd/smbXsrv_open.c index 77cac638ff1..6aa44ec4fcc 100644 --- a/source3/smbd/smbXsrv_open.c +++ b/source3/smbd/smbXsrv_open.c @@ -429,28 +429,26 @@ static NTSTATUS smbXsrv_open_global_store(struct smbXsrv_open_global0 *global) ndr_err = ndr_push_struct_blob(&blob, talloc_tos(), &global_blob, (ndr_push_flags_fn_t)ndr_push_smbXsrv_open_globalB); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { - status = ndr_map_error2ntstatus(ndr_err); - DEBUG(1,("smbXsrv_open_global_store: key '%s' ndr_push - %s\n", - tdb_data_dbg(key), - nt_errstr(status))); + DBG_WARNING("key '%s' ndr_push - %s\n", + tdb_data_dbg(key), + ndr_map_error2string(ndr_err)); TALLOC_FREE(global->db_rec); - return status; + return ndr_map_error2ntstatus(ndr_err); } val = make_tdb_data(blob.data, blob.length); status = dbwrap_record_store(global->db_rec, val, TDB_REPLACE); TALLOC_FREE(blob.data); if (!NT_STATUS_IS_OK(status)) { - DEBUG(1,("smbXsrv_open_global_store: key '%s' store - %s\n", - tdb_data_dbg(key), - nt_errstr(status))); + DBG_WARNING("key '%s' store - %s\n", + tdb_data_dbg(key), + nt_errstr(status)); TALLOC_FREE(global->db_rec); return status; } if (CHECK_DEBUGLVL(10)) { - DEBUG(10,("smbXsrv_open_global_store: key '%s' stored\n", - tdb_data_dbg(key))); + DBG_DEBUG("key '%s' stored\n", tdb_data_dbg(key)); NDR_PRINT_DEBUG(smbXsrv_open_globalB, &global_blob); }