summaryrefslogtreecommitdiffstats
path: root/src/tests/fail_over-tests.c
diff options
context:
space:
mode:
authorPavel Březina <pbrezina@redhat.com>2011-08-03 09:15:52 +0200
committerStephen Gallagher <sgallagh@redhat.com>2011-08-25 15:46:11 -0400
commit89caf5edcc99f5731e89bd51e6ffaad3ec11c304 (patch)
treed7b5638ccf515fac99454d18d7685d2329450e02 /src/tests/fail_over-tests.c
parentfe60346714a73ac3987f786731389320633dd245 (diff)
downloadsssd_unused-89caf5edcc99f5731e89bd51e6ffaad3ec11c304.tar.gz
sssd_unused-89caf5edcc99f5731e89bd51e6ffaad3ec11c304.tar.xz
sssd_unused-89caf5edcc99f5731e89bd51e6ffaad3ec11c304.zip
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);
Diffstat (limited to 'src/tests/fail_over-tests.c')
-rw-r--r--src/tests/fail_over-tests.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/tests/fail_over-tests.c b/src/tests/fail_over-tests.c
index 439e5cf2..64ed1978 100644
--- a/src/tests/fail_over-tests.c
+++ b/src/tests/fail_over-tests.c
@@ -292,6 +292,9 @@ main(int argc, const char *argv[])
POPT_TABLEEND
};
+ /* 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) {
switch(opt) {
@@ -307,7 +310,8 @@ main(int argc, const char *argv[])
}
}
poptFreeContext(pc);
- debug_level = debug_convert_old_level(debug);
+
+ CONVERT_AND_SET_DEBUG_LEVEL(debug_level);
tests_set_cwd();