[gtk-vnc] src: remove overly verbose debug logging



commit 84babdf3b3fca2e6af8f9f0fd4692e87ca124050
Author: Daniel P. Berrangé <dan berrange com>
Date:   Wed Mar 31 21:48:33 2021 +0100

    src: remove overly verbose debug logging
    
    This avoids printing debug messages on every mouse event
    
    Signed-off-by: Daniel P. Berrangé <berrange redhat com>

 src/vncconnection.c |  7 +++++--
 src/vncdisplay.c    | 13 ++++++-------
 2 files changed, 11 insertions(+), 9 deletions(-)
---
diff --git a/src/vncconnection.c b/src/vncconnection.c
index 2d79a92..d771f8c 100644
--- a/src/vncconnection.c
+++ b/src/vncconnection.c
@@ -781,9 +781,11 @@ static int vnc_connection_read_wire(VncConnection *conn, void *data, size_t len)
                                NULL, &error);
         if (ret < 0) {
             if (error) {
-                VNC_DEBUG("Read error %s", error->message);
-                if (error->code == G_IO_ERROR_WOULD_BLOCK)
+                if (error->code == G_IO_ERROR_WOULD_BLOCK) {
                     blocking = TRUE;
+                } else {
+                    VNC_DEBUG("Read error %s", error->message);
+                }
                 g_error_free(error);
             } else {
                 VNC_DEBUG("Read error unknown");
@@ -3201,6 +3203,7 @@ static void vnc_connection_alpha_cursor(VncConnection *conn, guint16 x, guint16
             g_object_unref(fb);
             return;
         }
+        VNC_DEBUG("Alpha cursor type=%d", encoding);
         switch (encoding) {
         case VNC_CONNECTION_ENCODING_RAW:
             if (!vnc_connection_validate_boundary(conn, fb,
diff --git a/src/vncdisplay.c b/src/vncdisplay.c
index a3ee206..7915c15 100644
--- a/src/vncdisplay.c
+++ b/src/vncdisplay.c
@@ -452,13 +452,6 @@ get_render_region_info(GtkWidget *widget,
         *scalex = 1;
         *scaley = 1;
     }
-
-    VNC_DEBUG("win %dx%d fb %dx%d render %dx%d @ %d,%d scale %f,%f",
-              *winwidth, *winheight,
-              *fbwidth, *fbheight,
-              *width, *height,
-              *offsetx, *offsety,
-              *scalex, *scaley);
 }
 
 static gboolean draw_event(GtkWidget *widget, cairo_t *cr)
@@ -477,6 +470,12 @@ static gboolean draw_event(GtkWidget *widget, cairo_t *cr)
                            &scalex, &scaley,
                            &fbwidth, &fbheight,
                            &winwidth, &winheight);
+    VNC_DEBUG("win %dx%d fb %dx%d render %dx%d @ %d,%d scale %f,%f",
+              winwidth, winheight,
+              fbwidth, fbheight,
+              width, height,
+              offsetx, offsety,
+              scalex, scaley);
 
     if (priv->fb) {
         setup_surface_cache(obj, cr, fbwidth, fbheight);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]