Blame SOURCES/0035-vdagent_x11_target_to_type-Improve-error-logging.patch

a547b4
From 291e3fe366197c3958d3bb13486bee786a362d48 Mon Sep 17 00:00:00 2001
a547b4
From: Hans de Goede <hdegoede@redhat.com>
a547b4
Date: Thu, 8 Aug 2013 12:01:48 +0200
a547b4
Subject: [PATCH 35/36] vdagent_x11_target_to_type: Improve error logging
a547b4
a547b4
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
a547b4
(cherry picked from commit bad87034bbed85e65e9b8fe479c967a3d0f9c861)
a547b4
---
a547b4
 src/vdagent-x11.c | 3 +++
a547b4
 1 file changed, 3 insertions(+)
a547b4
a547b4
diff --git a/src/vdagent-x11.c b/src/vdagent-x11.c
a547b4
index 3d752c1..e72fd24 100644
a547b4
--- a/src/vdagent-x11.c
a547b4
+++ b/src/vdagent-x11.c
a547b4
@@ -833,6 +833,8 @@ static void vdagent_x11_handle_selection_notify(struct vdagent_x11 *x11,
a547b4
     selection = x11->conversion_req->selection;
a547b4
     type = vdagent_x11_target_to_type(x11, selection,
a547b4
                                       x11->conversion_req->target);
a547b4
+    if (type == VD_AGENT_CLIPBOARD_NONE)
a547b4
+        syslog(LOG_ERR, "internal error conversion_req has bad target");
a547b4
     if (len == 0) { /* No errors so far */
a547b4
         len = vdagent_x11_get_selection(x11, event, selection,
a547b4
                                         x11->conversion_req->target,
a547b4
@@ -1062,6 +1064,7 @@ static void vdagent_x11_handle_selection_request(struct vdagent_x11 *x11)
a547b4
     type = vdagent_x11_target_to_type(x11, selection,
a547b4
                                       event->xselectionrequest.target);
a547b4
     if (type == VD_AGENT_CLIPBOARD_NONE) {
a547b4
+        syslog(LOG_ERR, "guest app requested a non-advertised target");
a547b4
         vdagent_x11_send_selection_notify(x11, None, NULL);
a547b4
         return;
a547b4
     }
a547b4
-- 
a547b4
2.20.1
a547b4