[PATCH linux vdagent] Don't abort if XRRSetCrtcConfig fails

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

 



In certain configurations (Fedora 20 or RHEL7 guests on a RHEL6 host), this call
fails, which cause the vdagent to abort. This patch prevents the crash, though
arbitrary resizing is obviously still non-functional in this situation.
---
 src/vdagent-x11-randr.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/vdagent-x11-randr.c b/src/vdagent-x11-randr.c
index 5223f88..63a626a 100644
--- a/src/vdagent-x11-randr.c
+++ b/src/vdagent-x11-randr.c
@@ -364,11 +364,11 @@ static int xrandr_add_and_set(struct vdagent_x11 *x11, int output, int x, int y,
     x11->randr.monitor_sizes[output].width = width;
     x11->randr.monitor_sizes[output].height = height;
     outputs[0] = xid;
+    vdagent_x11_set_error_handler(x11, error_handler);
     s = XRRSetCrtcConfig(x11->display, x11->randr.res, x11->randr.res->crtcs[output],
                          CurrentTime, x, y, mode->id, RR_Rotate_0, outputs,
                          1);
-
-    if (s != RRSetConfigSuccess) {
+    if (vdagent_x11_restore_error_handler(x11) || (s != RRSetConfigSuccess)) {
         syslog(LOG_ERR, "failed to XRRSetCrtcConfig");
         x11->set_crtc_config_not_functional = 1;
         return 0;
-- 
1.8.3.1

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]