vnc-ws.c (2c94822167672597d870dbeed9ffc95ea2bf93d3) vnc-ws.c (a75d6f07613af7ec5b016b31b117436e32ce7a5f)
1/*
2 * QEMU VNC display driver: Websockets support
3 *
4 * Copyright (C) 2010 Joel Martin
5 * Copyright (C) 2012 Tim Hardeck
6 *
7 * This is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by

--- 23 unchanged lines hidden (view full) ---

32 Error *err = NULL;
33
34 if (qio_task_propagate_error(task, &err)) {
35 VNC_DEBUG("Handshake failed %s\n", error_get_pretty(err));
36 vnc_client_error(vs);
37 error_free(err);
38 } else {
39 VNC_DEBUG("TLS handshake complete, starting websocket handshake\n");
1/*
2 * QEMU VNC display driver: Websockets support
3 *
4 * Copyright (C) 2010 Joel Martin
5 * Copyright (C) 2012 Tim Hardeck
6 *
7 * This is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by

--- 23 unchanged lines hidden (view full) ---

32 Error *err = NULL;
33
34 if (qio_task_propagate_error(task, &err)) {
35 VNC_DEBUG("Handshake failed %s\n", error_get_pretty(err));
36 vnc_client_error(vs);
37 error_free(err);
38 } else {
39 VNC_DEBUG("TLS handshake complete, starting websocket handshake\n");
40 if (vs->ioc_tag) {
41 g_source_remove(vs->ioc_tag);
42 }
40 vs->ioc_tag = qio_channel_add_watch(
41 QIO_CHANNEL(vs->ioc), G_IO_IN, vncws_handshake_io, vs, NULL);
42 }
43}
44
45
46gboolean vncws_tls_handshake_io(QIOChannel *ioc G_GNUC_UNUSED,
47 GIOCondition condition G_GNUC_UNUSED,

--- 44 unchanged lines hidden (view full) ---

92
93 if (qio_task_propagate_error(task, &err)) {
94 VNC_DEBUG("Websock handshake failed %s\n", error_get_pretty(err));
95 vnc_client_error(vs);
96 error_free(err);
97 } else {
98 VNC_DEBUG("Websock handshake complete, starting VNC protocol\n");
99 vnc_start_protocol(vs);
43 vs->ioc_tag = qio_channel_add_watch(
44 QIO_CHANNEL(vs->ioc), G_IO_IN, vncws_handshake_io, vs, NULL);
45 }
46}
47
48
49gboolean vncws_tls_handshake_io(QIOChannel *ioc G_GNUC_UNUSED,
50 GIOCondition condition G_GNUC_UNUSED,

--- 44 unchanged lines hidden (view full) ---

95
96 if (qio_task_propagate_error(task, &err)) {
97 VNC_DEBUG("Websock handshake failed %s\n", error_get_pretty(err));
98 vnc_client_error(vs);
99 error_free(err);
100 } else {
101 VNC_DEBUG("Websock handshake complete, starting VNC protocol\n");
102 vnc_start_protocol(vs);
103 if (vs->ioc_tag) {
104 g_source_remove(vs->ioc_tag);
105 }
100 vs->ioc_tag = qio_channel_add_watch(
101 vs->ioc, G_IO_IN, vnc_client_io, vs, NULL);
102 }
103}
104
105
106gboolean vncws_handshake_io(QIOChannel *ioc G_GNUC_UNUSED,
107 GIOCondition condition G_GNUC_UNUSED,

--- 24 unchanged lines hidden ---
106 vs->ioc_tag = qio_channel_add_watch(
107 vs->ioc, G_IO_IN, vnc_client_io, vs, NULL);
108 }
109}
110
111
112gboolean vncws_handshake_io(QIOChannel *ioc G_GNUC_UNUSED,
113 GIOCondition condition G_GNUC_UNUSED,

--- 24 unchanged lines hidden ---