Re: [gtk-vnc-devel] Broken with vino?



Em Dom, 2008-02-17 às 22:59 -0300, Jonh Wendell escreveu:
> Hi, folks.
> 
> I'm experiencing a weird behavior between vinagre and vino:
> 
> - In the first connect, the connection is closed after authentication (I
> get initial server framebuffer update). The second connection works
> fine.
> 
> By 'first connection' I mean: Start the server on the server-side; and
> connect from the client. Second connection: Try to reconnect without
> restart the server.
> If I restart the server, then the cycle begins again: the first client
> is disconnected.
> 
> I thought it was an error on the server side, but connecting with
> vncviewer is fine, even on the first attempt.
> 
> I also disabled TLS (auth 18) in gtk-vnc, but I got the same error.
> 
> Very weird... Any thoughts?

Ok, I figured out what's going on. All of this is because we are not
sending the set_pixel_format message to the server, in the
initialization.

This was the only difference between us and vncviewer, had to use
wireshark (tcpdump like) to find this.

So, all we have to do is to send that message to the server, and
everything is fine.

I don't know what is the exactly right time to do this, so, I just put
it inside set_encodings(), i.e., we're sending pixel_format along with
set_encodings. This sounds a bit ugly, but works for me.

Any suggestions? Or may I commit?

Thanks,
-- 
Jonh Wendell
www.bani.com.br


diff -r 28eab97c0d35 src/gvnc.c
--- a/src/gvnc.c	Mon Feb 18 10:31:58 2008 -0300
+++ b/src/gvnc.c	Mon Feb 18 11:02:36 2008 -0300
@@ -827,6 +827,10 @@ gboolean gvnc_set_encodings(struct gvnc 
 {
 	uint8_t pad[1] = {0};
 	int i;
+
+	/* Always send the pixel_format along with set_encodings */
+	if (!gvnc_set_pixel_format (gvnc, &(gvnc->fmt)))
+		return FALSE;
 
 	gvnc->has_ext_key_event = FALSE;
 	gvnc_write_u8(gvnc, 2);


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