From 0b2cfd2c7c6211ff5902e48720c34067f238ce90 Mon Sep 17 00:00:00 2001 From: Jonathan Beck Date: Sat, 25 Oct 2008 16:11:27 +0200 Subject: Handle debugging through utilitary functions --- src/userpref.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/userpref.c') diff --git a/src/userpref.c b/src/userpref.c index 57946f7..db54679 100644 --- a/src/userpref.c +++ b/src/userpref.c @@ -24,6 +24,7 @@ #include #include #include "userpref.h" +#include "utils.h" #include #include @@ -35,7 +36,6 @@ #define LIBIPHONE_ROOT_CERTIF "RootCertificate.pem" #define LIBIPHONE_HOST_CERTIF "HostCertificate.pem" -extern int debug; /** Creates a freedesktop compatible configuration directory for libiphone. */ @@ -77,8 +77,7 @@ char *get_host_id() g_key_file_free(key_file); g_free(config_file); - if (debug) - printf("get_host_id(): Using %s as HostID\n", host_id); + log_debug_msg("get_host_id(): Using %s as HostID\n", host_id); return host_id; } @@ -246,8 +245,7 @@ int init_config_file(char *host_id, gnutls_datum_t * root_key, gnutls_datum_t * key_file = g_key_file_new(); /* Store in config file */ - if (debug) - printf("init_config_file(): setting hostID to %s\n", host_id); + log_debug_msg("init_config_file(): setting hostID to %s\n", host_id); g_key_file_set_value(key_file, "Global", "HostID", host_id); /* Write config file on disk */ -- cgit v1.1-32-gdbae