Fix broken mode and security string comparison
[connman] / src / log.c
index 3d8a4e9..3a87b93 100644 (file)
--- a/src/log.c
+++ b/src/log.c
@@ -90,6 +90,14 @@ void connman_debug(const char *format, ...)
        va_end(ap);
 }
 
+void __connman_toggle_debug(void)
+{
+       if (debug_enabled == TRUE)
+               debug_enabled = FALSE;
+       else
+               debug_enabled = TRUE;
+}
+
 int __connman_log_init(gboolean detach, gboolean debug)
 {
        int option = LOG_NDELAY | LOG_PID;
@@ -112,3 +120,8 @@ void __connman_log_cleanup(void)
 
        closelog();
 }
+
+gboolean __connman_debug_enabled(void)
+{
+       return debug_enabled;
+}