summaryrefslogtreecommitdiff
path: root/p11-kit/conf.c
diff options
context:
space:
mode:
authorStef Walter <stefw@collabora.co.uk>2011-04-05 17:19:09 +0200
committerStef Walter <stefw@collabora.co.uk>2011-04-05 17:19:09 +0200
commit6078d6d73bc2eb1dbf2283b37d9507297fefba9d (patch)
tree0619b243b630de03f9d6e6b00ed663d98bbd5b9b /p11-kit/conf.c
parentaada8e3d41c3be7cdc7e0994c7dff7c307fbbe7f (diff)
downloadp11-kit-6078d6d73bc2eb1dbf2283b37d9507297fefba9d.tar.gz
Add support for debug tracing.
Use P11_KIT_DEBUG=xxx environment variable to enable tracing. Must have been built without --disable-debug option. P11_KIT_DEBUG can (at this point) be one of these values: all help conf lib
Diffstat (limited to 'p11-kit/conf.c')
-rw-r--r--p11-kit/conf.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/p11-kit/conf.c b/p11-kit/conf.c
index de42745..7523f98 100644
--- a/p11-kit/conf.c
+++ b/p11-kit/conf.c
@@ -38,6 +38,8 @@
#include "config.h"
#include "conf.h"
+#define DEBUG_FLAG DEBUG_CONF
+#include "debug.h"
#include <sys/param.h>
#include <sys/stat.h>
@@ -182,6 +184,8 @@ conf_parse_file (const char* filename, int flags,
assert (filename);
+ debug ("reading config file: %s", filename);
+
/* Adds an extra newline to end of file */
config = read_config_file (filename, flags, error_func);
if (!config)
@@ -226,6 +230,9 @@ conf_parse_file (const char* filename, int flags,
errno = ENOMEM;
break;
}
+
+ debug ("config value: %s = %s", name, value);
+
if (!hash_set (ht, name, value)) {
free (name);
free (value);