g_log() accelerated by 'captive_debug_messages_disabled' slave global flag.
[captive.git] / src / libcaptive / client / init.c
index f7344eb..a2459e4 100644 (file)
@@ -74,14 +74,7 @@ static TOP_LEVEL_IRP TopLevelIrp;    /* TODO:thread */
 void *_local_unwind2_addr;
 
 
-/* Acceleration hack for ntoskrnl/dbg/print.c/DbgPrint() */
-gboolean captive_get_debug_messages(void)
-{
-       g_return_val_if_fail(captive_options!=NULL,TRUE);
-
-       return captive_options->debug_messages;
-}
-
+gboolean captive_debug_messages_disabled=FALSE;
 
 static gboolean captive_w32_init(void)
 {
@@ -257,6 +250,10 @@ void captive_log_init(const struct captive_options *captive_options)
 {
        g_return_if_fail(captive_options!=NULL);
 
+       /* FIXME: Fix sharing of different 'debug_messages' for various sandboxes. */
+       captive_debug_messages_disabled=!captive_options->debug_messages;
+
+       /* FIXME: Fix sharing of different 'debug_messages' for various sandboxes. */
        if (!captive_options->debug_messages) {
                /* FIXME: Save handler_id and destroy it in captive_vfs_close(). */
                g_log_set_handler(