From 86152436eb06a76e495425c1aa862833576fbc71 Mon Sep 17 00:00:00 2001 From: Peter Lieven Date: Fri, 5 Sep 2014 22:07:41 +0200 Subject: [PATCH 1/2] ui/vnc: set TCP_NODELAY we currently have the Nagle algorithm enabled for all outgoing VNC updates. This may delay sensitive updates as mouse movements or typing in the console. As we currently prepare all data in a buffer and then send as much as we can disabling the Nagle algorithm should not cause big trouble. Well established VNC servers like TightVNC set TCP_NODELAY as well. A regular framebuffer update request generates exactly one framebuffer update which should be pushed out as fast as possible. Signed-off-by: Peter Lieven Signed-off-by: Gerd Hoffmann --- ui/vnc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ui/vnc.c b/ui/vnc.c index f8d9b7db95..0fe6eff1b8 100644 --- a/ui/vnc.c +++ b/ui/vnc.c @@ -2914,6 +2914,7 @@ static void vnc_listen_read(void *opaque, bool websocket) } if (csock != -1) { + socket_set_nodelay(csock); vnc_connect(vs, csock, false, websocket); } } From 9d64fab42274fb50a39bab184f79d0239596ba4a Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Wed, 17 Sep 2014 09:33:15 +0200 Subject: [PATCH 2/2] vnc-tls: Clean up dead store in vnc_set_x509_credential() Signed-off-by: Markus Armbruster Signed-off-by: Gerd Hoffmann --- ui/vnc-tls.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/ui/vnc-tls.c b/ui/vnc-tls.c index 63923265fd..0f59f9b28e 100644 --- a/ui/vnc-tls.c +++ b/ui/vnc-tls.c @@ -444,8 +444,6 @@ static int vnc_set_x509_credential(VncDisplay *vd, struct stat sb; g_free(*cred); - *cred = NULL; - *cred = g_malloc(strlen(certdir) + strlen(filename) + 2); strcpy(*cred, certdir);