From: Stefan Metzmacher Date: Wed, 16 Feb 2022 13:18:20 +0000 (+0100) Subject: s3:conncache: improve debugging for the negative connection cache X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=56b975c4ff461d79a0ca12cf61a3628315655aab;p=thirdparty%2Fsamba.git s3:conncache: improve debugging for the negative connection cache BUG: https://bugzilla.samba.org/show_bug.cgi?id=14981 Signed-off-by: Stefan Metzmacher Reviewed-by: Ralph Boehme Reviewed-by: Guenther Deschner (cherry picked from commit 613ac83fb7666f5b132187d5587053e0d7dcd46d) --- diff --git a/source3/libsmb/conncache.c b/source3/libsmb/conncache.c index 7310b508a3b..353c1e8f930 100644 --- a/source3/libsmb/conncache.c +++ b/source3/libsmb/conncache.c @@ -147,8 +147,9 @@ NTSTATUS check_negative_conn_cache( const char *domain, const char *server) if (gencache_get(key, talloc_tos(), &value, NULL)) result = negative_conn_cache_valuedecode(value); done: - DEBUG(9,("check_negative_conn_cache returning result %d for domain %s " - "server %s\n", NT_STATUS_V(result), domain, server)); + DBG_PREFIX(NT_STATUS_IS_OK(result) ? DBGLVL_DEBUG : DBGLVL_INFO, + ("returning result %s for domain %s " + "server %s\n", nt_errstr(result), domain, server)); TALLOC_FREE(key); TALLOC_FREE(value); return result; @@ -187,7 +188,8 @@ void add_failed_connection_entry(const char *domain, const char *server, if (gencache_set(key, value, time(NULL) + FAILED_CONNECTION_CACHE_TIMEOUT)) DEBUG(9,("add_failed_connection_entry: added domain %s (%s) " - "to failed conn cache\n", domain, server )); + "to failed conn cache %s\n", domain, server, + nt_errstr(result))); else DEBUG(1,("add_failed_connection_entry: failed to add " "domain %s (%s) to failed conn cache\n",