On Mon, 2 Apr 2007 20:19:00 +0400, Alexey Nezhdanov wrote
> Debug is enabled always except when debug_enabled set to FALSE _and_
> debug function missing. that is obviously incorrect - it should be _or_.
>
> --
> diff -ur old/debug.c new/debug.c
> --- old/debug.c 2007-01-19 07:28:24.000000000 +0300
> +++ new/debug.c 2007-04-02 20:17:22.592846000 +0400
> @@ -53,7 +53,7 @@
>
> ops = gaim_debug_get_ui_ops();
>
> - if (!debug_enabled && ((ops == NULL) || (ops->print == NULL))
> ) + if (!debug_enabled || ((ops == NULL) || (ops->print ==
> NULL))) return;
>
> arg_s = g_strdup_vprintf(format, args);
I believe that is actually correct. The check is just a quick short-circuit
to avoid the call to g_strdup_vprintf() if it's not needed.
We have two distinct methods for printing debug information
1. The console (stdout)
2. The graphical debug window
In pseudo-code this 'if' statement would be written as
if (!console_output && !debug_window_output)
return;
Does that make sense?
-Mark
|