int __connman_log_init(gboolean detach, gboolean debug);
void __connman_log_cleanup(void);
+void __connman_toggle_debug(void);
gboolean __connman_debug_enabled(void);
#include <connman/plugin.h>
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;
g_main_loop_quit(main_loop);
}
+static void sig_debug(int sig)
+{
+ __connman_toggle_debug();
+}
+
static void disconnect_callback(DBusConnection *conn, void *user_data)
{
DBG("D-Bus disconnect");
sigaction(SIGINT, &sa, NULL);
sigaction(SIGTERM, &sa, NULL);
+ sa.sa_handler = sig_debug;
+ sigaction(SIGUSR2, &sa, NULL);
+
g_main_loop_run(main_loop);
__connman_element_stop();