From 73f0cb5278e714740d0de75e6b0d0bf4c815491a Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Thu, 9 Aug 2012 19:40:45 +1000 Subject: lib/ldb: Do not vasprintf() the tevent debug messages that will not be shown This malloc() and free() actually shows up quite high on a call profile of provision of the AD DC. This allows the debug handler to decide if the argument list should be printed. Andrew Bartlett --- lib/ldb/include/ldb_module.h | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/ldb/include/ldb_module.h') diff --git a/lib/ldb/include/ldb_module.h b/lib/ldb/include/ldb_module.h index 389e8cef71..6e14f4c3e8 100644 --- a/lib/ldb/include/ldb_module.h +++ b/lib/ldb/include/ldb_module.h @@ -83,6 +83,7 @@ void ldb_debug_set(struct ldb_context *ldb, enum ldb_debug_level level, const char *fmt, ...) PRINTF_ATTRIBUTE(3, 4); void ldb_debug_add(struct ldb_context *ldb, const char *fmt, ...) PRINTF_ATTRIBUTE(2, 3); void ldb_debug_end(struct ldb_context *ldb, enum ldb_debug_level level); +void ldb_vdebug(struct ldb_context *ldb, enum ldb_debug_level level, const char *fmt, va_list ap) PRINTF_ATTRIBUTE(3, 0); #define ldb_error(ldb, ecode, reason) ldb_error_at(ldb, ecode, reason, __FILE__, __LINE__) #define ldb_module_error(module, ecode, reason) ldb_error_at(ldb_module_get_ctx(module), ecode, reason, __FILE__, __LINE__) -- cgit