From 89caf5edcc99f5731e89bd51e6ffaad3ec11c304 Mon Sep 17 00:00:00 2001 From: Pavel Březina Date: Wed, 3 Aug 2011 09:15:52 +0200 Subject: New DEBUG facility - SSSDBG_UNRESOLVED changed from -1 to 0 Removed: SSS_UNRESOLVED_DEBUG_LEVEL (completely replaced with SSSDBG_UNRESOLVED) Added new macro: CONVERT_AND_SET_DEBUG_LEVEL(new_value) Changes unresolved debug level value (SSSDBG_UNRESOLVED) from -1 to 0 so DEBUG macro could be reduced by one condition. Anyway, it has a minor effect, every time you want to load debug_level from command line parameters, you have to use following pattern: /* Set debug level to invalid value so we can deside if -d 0 was used. */ debug_level = SSSDBG_INVALID; pc = poptGetContext(argv[0], argc, argv, long_options, 0); while((opt = poptGetNextOpt(pc)) != -1) { ... } CONVERT_AND_SET_DEBUG_LEVEL(debug_level); --- src/util/server.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/util/server.c') diff --git a/src/util/server.c b/src/util/server.c index 38b1bacae..42fd93609 100644 --- a/src/util/server.c +++ b/src/util/server.c @@ -459,7 +459,7 @@ int server_setup(const char *name, int flags, return ret; } - if (debug_level == SSS_UNRESOLVED_DEBUG_LEVEL) { + if (debug_level == SSSDBG_UNRESOLVED) { /* set debug level if any in conf_entry */ ret = confdb_get_int(ctx->confdb_ctx, ctx, conf_entry, CONFDB_SERVICE_DEBUG_LEVEL, -- cgit