Skip to contentSkip to conversation

Fix crash when connecting to VNC through websocket

PATCH Superseded Jorge Acereda Maciá 3 participants 3 messages Feb 24, 2015

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix crash when connecting to VNC through websocket

Please, forget my previous patch, worked somehow with Chrome but failed with Safari (with a good reason, the sent headers were incorrect). This one should be correct and simpler.

---
 ui/vnc-ws.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
ui/vnc-ws.c +1 -2
index e304baf..d75950d 100644
@@ -207,8 +207,7 @@ static void vncws_send_handshake_response(VncState *vs, const char* key)
     }
 
     response = g_strdup_printf(WS_HANDSHAKE, accept);
-    vnc_write(vs, response, strlen(response));
-    vnc_flush(vs);
+    vnc_client_write_buf(vs, (const uint8_t *)response, strlen(response));
 
     g_free(accept);
     g_free(response);
Signature · 1 line
1.9.3 (Apple Git-50)
#1 lore raw

The subject should read V2 as this is a resubmit. Use git format-patch --subject-prefix="PATCH v2".

Quoted 2 lines · Jorge Acereda Maciá

Please, forget my previous patch, worked somehow with Chrome but failed with Safari (with a good reason, the sent headers were incorrect). This one should be correct and simpler.

You should also start a fresh with your commit message content. Don't mention discarded versions of the patch or changes in your patch content. Just say what the patch does. Your v1 commit message looks good and coulld probably be reused as-is.

Quoted 3 lines

---

But you put you patch change log here, below the "---". This allows reviewers to see your change information, but git will discard the changlog on application of the final accepted version.

Regards,
Peter

Quoted 22 lines
 ui/vnc-ws.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
ui/vnc-ws.c +1 -3
index e304baf..d75950d 100644
@@ -207,8 +207,7 @@ static void vncws_send_handshake_response(VncState *vs, const char* key)
     }
 
     response = g_strdup_printf(WS_HANDSHAKE, accept);
-    vnc_write(vs, response, strlen(response));
-    vnc_flush(vs);
+    vnc_client_write_buf(vs, (const uint8_t *)response, strlen(response));
 
     g_free(accept);
     g_free(response);
--

1.9.3 (Apple Git-50)

#2 lore raw
Quoted 2 lines · Peter Crosthwaite

The subject should read V2 as this is a resubmit. Use git format-patch --subject-prefix="PATCH v2".

Or shorter,

git format-patch -v2

Also, remember that 'git send-email' will take any options understood by 'git format-patch'.

Signature · 2 lines
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org