Blame SOURCES/0036-vdagent-x11-Turn-some-error-messages-into-debugging-.patch

b156de
From 81c96df492e8f8b01640634fcd79234f63f5228e Mon Sep 17 00:00:00 2001
b156de
From: Hans de Goede <hdegoede@redhat.com>
b156de
Date: Tue, 13 Aug 2013 12:19:54 +0200
b156de
Subject: [PATCH 36/36] vdagent-x11: Turn some error messages into debugging
b156de
 messages (rhbz#918310)
b156de
b156de
Some bad clients, ie autocutsel, don't stick to the icccm spec, causing us to
b156de
flood the logs with error messages, turn these into debug messages instead,
b156de
so that they are only shown when debuggging / verbose logging is turned on.
b156de
b156de
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
b156de
(cherry picked from commit d39230cee236bc6b8b150c7687d49a46f519bd2b)
b156de
---
b156de
 src/vdagent-x11.c | 11 ++++++-----
b156de
 1 file changed, 6 insertions(+), 5 deletions(-)
b156de
b156de
diff --git a/src/vdagent-x11.c b/src/vdagent-x11.c
b156de
index e72fd24..c925b43 100644
b156de
--- a/src/vdagent-x11.c
b156de
+++ b/src/vdagent-x11.c
b156de
@@ -761,8 +761,8 @@ static uint32_t vdagent_x11_target_to_type(struct vdagent_x11 *x11,
b156de
         }
b156de
     }
b156de
 
b156de
-    SELPRINTF("unexpected selection type %s",
b156de
-              vdagent_x11_get_atom_name(x11, target));
b156de
+    VSELPRINTF("unexpected selection type %s",
b156de
+               vdagent_x11_get_atom_name(x11, target));
b156de
     return VD_AGENT_CLIPBOARD_NONE;
b156de
 }
b156de
 
b156de
@@ -834,7 +834,8 @@ static void vdagent_x11_handle_selection_notify(struct vdagent_x11 *x11,
b156de
     type = vdagent_x11_target_to_type(x11, selection,
b156de
                                       x11->conversion_req->target);
b156de
     if (type == VD_AGENT_CLIPBOARD_NONE)
b156de
-        syslog(LOG_ERR, "internal error conversion_req has bad target");
b156de
+        SELPRINTF("internal error conversion_req has bad target %s",
b156de
+                  vdagent_x11_get_atom_name(x11, x11->conversion_req->target));
b156de
     if (len == 0) { /* No errors so far */
b156de
         len = vdagent_x11_get_selection(x11, event, selection,
b156de
                                         x11->conversion_req->target,
b156de
@@ -1064,7 +1065,7 @@ static void vdagent_x11_handle_selection_request(struct vdagent_x11 *x11)
b156de
     type = vdagent_x11_target_to_type(x11, selection,
b156de
                                       event->xselectionrequest.target);
b156de
     if (type == VD_AGENT_CLIPBOARD_NONE) {
b156de
-        syslog(LOG_ERR, "guest app requested a non-advertised target");
b156de
+        VSELPRINTF("guest app requested a non-advertised target");
b156de
         vdagent_x11_send_selection_notify(x11, None, NULL);
b156de
         return;
b156de
     }
b156de
@@ -1310,7 +1311,7 @@ void vdagent_x11_clipboard_release(struct vdagent_x11 *x11, uint8_t selection)
b156de
     }
b156de
 
b156de
     if (x11->clipboard_owner[selection] != owner_client) {
b156de
-        SELPRINTF("received release while not owning client clipboard");
b156de
+        VSELPRINTF("received release while not owning client clipboard");
b156de
         return;
b156de
     }
b156de
 
b156de
-- 
b156de
2.20.1
b156de