summaryrefslogtreecommitdiffstats
path: root/src/daemon
diff options
context:
space:
mode:
Diffstat (limited to 'src/daemon')
-rw-r--r--src/daemon/settings.c4
-rw-r--r--src/daemon/settings_private.h6
2 files changed, 7 insertions, 3 deletions
diff --git a/src/daemon/settings.c b/src/daemon/settings.c
index b5c9c0c..c537510 100644
--- a/src/daemon/settings.c
+++ b/src/daemon/settings.c
@@ -34,7 +34,7 @@ void settings_init(void)
{
unset_flag(flag_daemonize);
settings.port = 6996;
- set_flag(flag_verbose);
+ settings.verboselevel = USURP_VERBOSITY;
settings.progname = program_invocation_short_name;
settings.im_user = "user";
settings.im_password = "password";
@@ -48,7 +48,7 @@ int setting_detach(void)
int setting_verbose(void)
{
- return test_flag(flag_verbose);
+ return settings.verboselevel;
}
unsigned short int setting_port(void)
diff --git a/src/daemon/settings_private.h b/src/daemon/settings_private.h
index 388509a..3d713b3 100644
--- a/src/daemon/settings_private.h
+++ b/src/daemon/settings_private.h
@@ -22,12 +22,16 @@
#ifndef USURPATION_SETTINGS_PRIVATE_H
#define USURPATION_SETTINGS_PRIVATE_H
+#ifndef USURP_VERBOSITY
+ #define USURP_VERBOSITY ERR
+#endif
+
static const unsigned int flag_daemonize = 1 << 0; /* 1st bit */
-static const unsigned int flag_verbose = 1 << 1;
static struct settings {
unsigned int flags;
unsigned short int port;
+ enum verbosity verboselevel;
char *progname;
char *im_user;
char *im_password;