ui/vnc: replace VNC_DEBUG with trace-events
Replace #ifdef printf() with run-time trace events. Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Marc-André Lureau committed
Apr 7, 2026 at 19:14 UTC
d5503319da72adbfe1e869f3efb5d78569f05f62
7 files changed
+73
-78
ui/trace-events
+28
-1
@@ -83,7 +83,7 @@ vnc_job_discard_rect(void *state, void *job, int x, int y, int w, int h) "VNC jo
83
vnc_job_clamp_rect(void *state, void *job, int x, int y, int w, int h) "VNC job clamp rect state=%p job=%p offset=%d,%d size=%dx%d"
84
vnc_job_clamped_rect(void *state, void *job, int x, int y, int w, int h) "VNC job clamp rect state=%p job=%p offset=%d,%d size=%dx%d"
85
vnc_job_nrects(void *state, void *job, int nrects) "VNC job state=%p job=%p nrects=%d"
86
-vnc_auth_init(void *display, int websock, int auth, int subauth) "VNC auth init state=%p websock=%d auth=%d subauth=%d"
86
+vnc_auth_init(void *display, int websock, int auth, int subauth, const char *name) "VNC auth init state=%p websock=%d auth=%d subauth=%d name=%s"
87
vnc_auth_start(void *state, int method) "VNC client auth start state=%p method=%d"
88
vnc_auth_pass(void *state, int method) "VNC client auth passed state=%p method=%d"
89
vnc_auth_fail(void *state, int method, const char *message, const char *reason) "VNC client auth failed state=%p method=%d message=%s reason=%s"
@@ -97,6 +97,33 @@ vnc_auth_sasl_step(void *state, const void *clientdata, size_t clientlen, const
97
vnc_auth_sasl_ssf(void *state, int ssf) "VNC client auth SASL SSF state=%p size=%d"
98
vnc_auth_sasl_username(void *state, const char *name) "VNC client auth SASL user state=%p name=%s"
99
vnc_auth_sasl_acl(void *state, int allow) "VNC client auth SASL ACL state=%p allow=%d"
100
+vnc_set_share_mode(void *state, void *ioc, int old_mode, int new_mode) "VNC set share mode state=%p ioc=%p old=%d new=%d"
101
+vnc_client_protocol_error(void *state) "VNC client protocol error state=%p"
102
+vnc_client_write_wire(void *state, const void *data, size_t datalen, ssize_t ret) "VNC client write wire state=%p data=%p len=%zu ret=%zd"
103
+vnc_client_write_plain(void *state, const void *buffer, size_t capacity, size_t offset, int wait_ssf) "VNC client write plain state=%p buffer=%p capacity=%zu offset=%zu wait_ssf=%d"
104
+vnc_client_read_wire(void *state, const void *data, size_t datalen, ssize_t ret) "VNC client read wire state=%p data=%p len=%zu ret=%zd"
105
+vnc_client_read_plain(void *state, const void *buffer, size_t capacity, size_t offset) "VNC client read plain state=%p buffer=%p capacity=%zu offset=%zu"
106
+vnc_client_unknown_encoding(void *state, int index, int encoding) "VNC client unknown encoding state=%p index=%d encoding=0x%x"
107
+vnc_client_invalid_audio_format(void *state, int fmt) "VNC client invalid audio format state=%p fmt=%d"
108
+vnc_client_invalid_audio_channels(void *state, int channels) "VNC client invalid audio channel count state=%p channels=%d"
109
+vnc_client_invalid_audio_freq(void *state, unsigned int freq) "VNC client invalid audio frequency state=%p freq=%u"
110
+vnc_client_invalid_audio_msg(void *state, int msg) "VNC client invalid audio message state=%p msg=%d"
111
+vnc_client_unknown_qemu_msg(void *state, int msg) "VNC client unknown QEMU msg state=%p msg=%d"
112
+vnc_client_unknown_msg(void *state, int msg) "VNC client unknown msg state=%p msg=%d"
113
+vnc_client_protocol_version(void *state, int major, int minor) "VNC client protocol version state=%p version=%d.%d"
114
+vnc_client_protocol_version_malformed(void *state, const char *version) "VNC client malformed protocol version state=%p version=%s"
115
+vnc_client_protocol_version_unsupported(void *state) "VNC client unsupported protocol version state=%p"
116
+vnc_client_auth_method(void *state, int auth) "VNC client auth method state=%p auth=%d"
117
+vnc_client_setup(void *state, void *ioc, int websocket, int auth, int subauth) "VNC client setup state=%p ioc=%p websocket=%d auth=%d subauth=%d"
118
+vnc_ws_tls_handshake_fail(void *state, const char *msg) "VNC WS TLS handshake failed state=%p msg=%s"
119
+vnc_ws_tls_handshake_complete(void *state) "VNC WS TLS handshake complete state=%p"
120
+vnc_ws_tls_setup_fail(void *state, const char *msg) "VNC WS TLS setup failed state=%p msg=%s"
121
+vnc_ws_handshake_fail(void *state, const char *msg) "VNC WS handshake failed state=%p msg=%s"
122
+vnc_ws_handshake_complete(void *state) "VNC WS handshake complete state=%p"
123
+vnc_sasl_write_pending(void *state, const void *buffer, size_t capacity, size_t offset, const void *encoded, int encoded_len, int encoded_offset) "VNC SASL write pending state=%p buffer=%p capacity=%zu offset=%zu encoded=%p encoded_len=%d encoded_offset=%d"
124
+vnc_sasl_read_decoded(void *state, const void *encoded, size_t encoded_len, const void *decoded, unsigned int decoded_len) "VNC SASL read decoded state=%p encoded=%p encoded_len=%zu decoded=%p decoded_len=%u"
125
+vnc_zlib_init(void *state, const void *opaque) "VNC zlib init state=%p opaque=%p"
126
+vnc_tight_zlib_init(void *state, int stream_id, const void *opaque) "VNC tight zlib init state=%p stream=%d opaque=%p"
127
128
129
# input.c
ui/vnc-auth-sasl.c
+5
-8
@@ -73,10 +73,10 @@ size_t vnc_client_write_sasl(VncState *vs)
73
{
74
size_t ret;
75
76
- VNC_DEBUG("Write SASL: Pending output %p size %zd offset %zd "
77
- "Encoded: %p size %d offset %d\n",
78
- vs->output.buffer, vs->output.capacity, vs->output.offset,
79
- vs->sasl.encoded, vs->sasl.encodedLength, vs->sasl.encodedOffset);
76
+ trace_vnc_sasl_write_pending(vs, vs->output.buffer, vs->output.capacity,
77
+ vs->output.offset, vs->sasl.encoded,
78
+ vs->sasl.encodedLength,
79
+ vs->sasl.encodedOffset);
80
81
if (!vs->sasl.encoded) {
82
int err;
@@ -157,8 +157,7 @@ size_t vnc_client_read_sasl(VncState *vs)
157
158
if (err != SASL_OK)
159
return vnc_client_io_error(vs, -1, NULL);
160
- VNC_DEBUG("Read SASL Encoded %p size %ld Decoded %p size %d\n",
161
- encoded, ret, decoded, decodedLen);
160
+ trace_vnc_sasl_read_decoded(vs, encoded, ret, decoded, decodedLen);
161
buffer_reserve(&vs->input, decodedLen);
162
buffer_append(&vs->input, decoded, decodedLen);
163
return decodedLen;
@@ -717,5 +716,3 @@ void start_auth_sasl(VncState *vs)
716
error_free(local_err);
717
vnc_client_error(vs);
718
}
720
-
721
-
ui/vnc-enc-tight.c
+2
-2
@@ -46,6 +46,7 @@
46
#include "vnc.h"
47
#include "vnc-enc-tight.h"
48
#include "vnc-palette.h"
49
+#include "trace.h"
50
51
/* Compression level stuff. The following array contains various
52
encoder parameters for each of 10 compression levels (0..9).
@@ -795,8 +796,7 @@ static int tight_init_stream(VncState *vs, VncTight *tight, int stream_id,
796
if (zstream->opaque == NULL) {
797
int err;
798
798
- VNC_DEBUG("VNC: TIGHT: initializing zlib stream %d\n", stream_id);
799
- VNC_DEBUG("VNC: TIGHT: opaque = %p | vs = %p\n", zstream->opaque, vs);
799
+ trace_vnc_tight_zlib_init(vs, stream_id, zstream->opaque);
800
zstream->zalloc = vnc_zlib_zalloc;
801
zstream->zfree = vnc_zlib_zfree;
802
ui/vnc-enc-zlib.c
+2
-2
@@ -26,6 +26,7 @@
26
27
#include "qemu/osdep.h"
28
#include "vnc.h"
29
+#include "trace.h"
30
31
#define ZALLOC_ALIGNMENT 16
32
@@ -71,8 +72,7 @@ static int vnc_zlib_stop(VncState *vs, VncWorker *worker)
72
if (zstream->opaque != vs) {
73
int err;
74
74
- VNC_DEBUG("VNC: initializing zlib stream\n");
75
- VNC_DEBUG("VNC: opaque = %p | vs = %p\n", zstream->opaque, vs);
75
+ trace_vnc_zlib_init(vs, zstream->opaque);
76
zstream->zalloc = vnc_zlib_zalloc;
77
zstream->zfree = vnc_zlib_zfree;
78
ui/vnc-ws.c
+5
-5
@@ -32,11 +32,11 @@ static void vncws_tls_handshake_done(QIOTask *task,
32
Error *err = NULL;
33
34
if (qio_task_propagate_error(task, &err)) {
35
- VNC_DEBUG("Handshake failed %s\n", error_get_pretty(err));
35
+ trace_vnc_ws_tls_handshake_fail(vs, 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");
39
+ trace_vnc_ws_tls_handshake_complete(vs);
40
if (vs->ioc_tag) {
41
g_source_remove(vs->ioc_tag);
42
}
@@ -67,7 +67,7 @@ gboolean vncws_tls_handshake_io(QIOChannel *ioc G_GNUC_UNUSED,
67
vs->vd->tlsauthzid,
68
&err);
69
if (!tls) {
70
- VNC_DEBUG("Failed to setup TLS %s\n", error_get_pretty(err));
70
+ trace_vnc_ws_tls_setup_fail(vs, error_get_pretty(err));
71
error_free(err);
72
vnc_client_error(vs);
73
return TRUE;
@@ -97,11 +97,11 @@ static void vncws_handshake_done(QIOTask *task,
97
Error *err = NULL;
98
99
if (qio_task_propagate_error(task, &err)) {
100
- VNC_DEBUG("Websock handshake failed %s\n", error_get_pretty(err));
100
+ trace_vnc_ws_handshake_fail(vs, error_get_pretty(err));
101
vnc_client_error(vs);
102
error_free(err);
103
} else {
104
- VNC_DEBUG("Websock handshake complete, starting VNC protocol\n");
104
+ trace_vnc_ws_handshake_complete(vs);
105
vnc_start_protocol(vs);
106
if (vs->ioc_tag) {
107
g_source_remove(vs->ioc_tag);
ui/vnc.c
+31
-52
@@ -75,17 +75,7 @@ static void vnc_disconnect_finish(VncState *vs);
75
76
static void vnc_set_share_mode(VncState *vs, VncShareMode mode)
77
{
78
-#ifdef _VNC_DEBUG
79
- static const char *mn[] = {
80
- [0] = "undefined",
81
- [VNC_SHARE_MODE_CONNECTING] = "connecting",
82
- [VNC_SHARE_MODE_SHARED] = "shared",
83
- [VNC_SHARE_MODE_EXCLUSIVE] = "exclusive",
84
- [VNC_SHARE_MODE_DISCONNECTED] = "disconnected",
85
- };
86
- fprintf(stderr, "%s/%p: %s -> %s\n", __func__,
87
- vs->ioc, mn[vs->share_mode], mn[mode]);
88
-#endif
78
+ trace_vnc_set_share_mode(vs, vs->ioc, vs->share_mode, mode);
79
80
switch (vs->share_mode) {
81
case VNC_SHARE_MODE_CONNECTING:
@@ -185,8 +175,9 @@ static void vnc_init_basic_info_from_remote_addr(QIOChannelSocket *ioc,
175
qapi_free_SocketAddress(addr);
176
}
177
188
-static const char *vnc_auth_name(VncDisplay *vd) {
189
- switch (vd->auth) {
178
+static const char *vnc_auth_name(int auth, int subauth)
179
+{
180
+ switch (auth) {
181
case VNC_AUTH_INVALID:
182
return "invalid";
183
case VNC_AUTH_NONE:
@@ -204,7 +195,7 @@ static const char *vnc_auth_name(VncDisplay *vd) {
195
case VNC_AUTH_TLS:
196
return "tls";
197
case VNC_AUTH_VENCRYPT:
207
- switch (vd->subauth) {
198
+ switch (subauth) {
199
case VNC_AUTH_VENCRYPT_PLAIN:
200
return "vencrypt+plain";
201
case VNC_AUTH_VENCRYPT_TLSNONE:
@@ -244,7 +235,7 @@ static VncServerInfo *vnc_server_info_get(VncDisplay *vd)
235
info = g_malloc0(sizeof(*info));
236
vnc_init_basic_info_from_server_addr(qio_net_listener_sioc(vd->listener, 0),
237
qapi_VncServerInfo_base(info), &err);
247
- info->auth = g_strdup(vnc_auth_name(vd));
238
+ info->auth = g_strdup(vnc_auth_name(vd->auth, vd->subauth));
239
if (err) {
240
qapi_free_VncServerInfo(info);
241
info = NULL;
@@ -421,7 +412,7 @@ VncInfo *qmp_query_vnc(Error **errp)
412
413
info->has_family = true;
414
424
- info->auth = g_strdup(vnc_auth_name(vd));
415
+ info->auth = g_strdup(vnc_auth_name(vd->auth, vd->subauth));
416
}
417
418
qapi_free_SocketAddress(addr);
@@ -1383,7 +1374,7 @@ size_t vnc_client_io_error(VncState *vs, ssize_t ret, Error *err)
1374
1375
void vnc_client_error(VncState *vs)
1376
{
1386
- VNC_DEBUG("Closing down client sock: protocol error\n");
1377
+ trace_vnc_client_protocol_error(vs);
1378
vnc_disconnect_start(vs);
1379
}
1380
@@ -1408,7 +1399,7 @@ size_t vnc_client_write_buf(VncState *vs, const uint8_t *data, size_t datalen)
1399
Error *err = NULL;
1400
ssize_t ret;
1401
ret = qio_channel_write(vs->ioc, (const char *)data, datalen, &err);
1411
- VNC_DEBUG("Wrote wire %p %zd -> %ld\n", data, datalen, ret);
1402
+ trace_vnc_client_write_wire(vs, data, datalen, ret);
1403
return vnc_client_io_error(vs, ret, err);
1404
}
1405
@@ -1429,9 +1420,9 @@ static size_t vnc_client_write_plain(VncState *vs)
1420
size_t ret;
1421
1422
#ifdef CONFIG_VNC_SASL
1432
- VNC_DEBUG("Write Plain: Pending output %p size %zd offset %zd. Wait SSF %d\n",
1433
- vs->output.buffer, vs->output.capacity, vs->output.offset,
1434
- vs->sasl.waitWriteSSF);
1423
+ trace_vnc_client_write_plain(vs, vs->output.buffer,
1424
+ vs->output.capacity, vs->output.offset,
1425
+ vs->sasl.waitWriteSSF);
1426
1427
if (vs->sasl.conn &&
1428
vs->sasl.runSSF &&
@@ -1532,7 +1523,7 @@ size_t vnc_client_read_buf(VncState *vs, uint8_t *data, size_t datalen)
1523
ssize_t ret;
1524
Error *err = NULL;
1525
ret = qio_channel_read(vs->ioc, (char *)data, datalen, &err);
1535
- VNC_DEBUG("Read wire %p %zd -> %ld\n", data, datalen, ret);
1526
+ trace_vnc_client_read_wire(vs, data, datalen, ret);
1527
return vnc_client_io_error(vs, ret, err);
1528
}
1529
@@ -1549,8 +1540,8 @@ size_t vnc_client_read_buf(VncState *vs, uint8_t *data, size_t datalen)
1540
static size_t vnc_client_read_plain(VncState *vs)
1541
{
1542
size_t ret;
1552
- VNC_DEBUG("Read plain %p size %zd offset %zd\n",
1553
- vs->input.buffer, vs->input.capacity, vs->input.offset);
1543
+ trace_vnc_client_read_plain(vs, vs->input.buffer,
1544
+ vs->input.capacity, vs->input.offset);
1545
buffer_reserve(&vs->input, 4096);
1546
ret = vnc_client_read_buf(vs, buffer_end(&vs->input), 4096);
1547
if (!ret)
@@ -2213,7 +2204,7 @@ static void set_encodings(VncState *vs, int32_t *encodings, size_t n_encodings)
2204
}
2205
break;
2206
default:
2216
- VNC_DEBUG("Unknown encoding: %d (0x%.8x): %d\n", i, enc, enc);
2207
+ trace_vnc_client_unknown_encoding(vs, i, enc);
2208
break;
2209
}
2210
}
@@ -2581,14 +2572,13 @@ static int protocol_client_msg(VncState *vs, uint8_t *data, size_t len)
2572
case 4: vs->as.fmt = AUDIO_FORMAT_U32; break;
2573
case 5: vs->as.fmt = AUDIO_FORMAT_S32; break;
2574
default:
2584
- VNC_DEBUG("Invalid audio format %d\n", read_u8(data, 4));
2575
+ trace_vnc_client_invalid_audio_format(vs, read_u8(data, 4));
2576
vnc_client_error(vs);
2577
break;
2578
}
2579
vs->as.nchannels = read_u8(data, 5);
2580
if (vs->as.nchannels != 1 && vs->as.nchannels != 2) {
2590
- VNC_DEBUG("Invalid audio channel count %d\n",
2591
- read_u8(data, 5));
2581
+ trace_vnc_client_invalid_audio_channels(vs, read_u8(data, 5));
2582
vnc_client_error(vs);
2583
break;
2584
}
@@ -2598,7 +2588,7 @@ static int protocol_client_msg(VncState *vs, uint8_t *data, size_t len)
2588
* protects calculations involving 'vs->as.freq' later.
2589
*/
2590
if (freq > 48000) {
2601
- VNC_DEBUG("Invalid audio frequency %u > 48000", freq);
2591
+ trace_vnc_client_invalid_audio_freq(vs, freq);
2592
vnc_client_error(vs);
2593
break;
2594
}
@@ -2607,14 +2597,14 @@ static int protocol_client_msg(VncState *vs, uint8_t *data, size_t len)
2597
vs, vs->ioc, vs->as.fmt, vs->as.nchannels, vs->as.freq);
2598
break;
2599
default:
2610
- VNC_DEBUG("Invalid audio message %d\n", read_u8(data, 2));
2600
+ trace_vnc_client_invalid_audio_msg(vs, read_u8(data, 2));
2601
vnc_client_error(vs);
2602
break;
2603
}
2604
break;
2605
2606
default:
2617
- VNC_DEBUG("Msg: %d\n", read_u16(data, 0));
2607
+ trace_vnc_client_unknown_qemu_msg(vs, read_u16(data, 0));
2608
vnc_client_error(vs);
2609
break;
2610
}
@@ -2649,7 +2639,7 @@ static int protocol_client_msg(VncState *vs, uint8_t *data, size_t len)
2639
break;
2640
}
2641
default:
2652
- VNC_DEBUG("Msg: %d\n", data[0]);
2642
+ trace_vnc_client_unknown_msg(vs, data[0]);
2643
vnc_client_error(vs);
2644
break;
2645
}
@@ -2929,18 +2919,18 @@ static int protocol_version(VncState *vs, uint8_t *version, size_t len)
2919
local[12] = 0;
2920
2921
if (sscanf(local, "RFB %03d.%03d\n", &vs->major, &vs->minor) != 2) {
2932
- VNC_DEBUG("Malformed protocol version %s\n", local);
2922
+ trace_vnc_client_protocol_version_malformed(vs, local);
2923
vnc_client_error(vs);
2924
return 0;
2925
}
2936
- VNC_DEBUG("Client request protocol version %d.%d\n", vs->major, vs->minor);
2926
+ trace_vnc_client_protocol_version(vs, vs->major, vs->minor);
2927
if (vs->major != 3 ||
2928
(vs->minor != 3 &&
2929
vs->minor != 4 &&
2930
vs->minor != 5 &&
2931
vs->minor != 7 &&
2932
vs->minor != 8)) {
2943
- VNC_DEBUG("Unsupported client version\n");
2933
+ trace_vnc_client_protocol_version_unsupported(vs);
2934
vnc_write_u32(vs, VNC_AUTH_INVALID);
2935
vnc_flush(vs);
2936
vnc_client_error(vs);
@@ -2960,7 +2950,7 @@ static int protocol_version(VncState *vs, uint8_t *version, size_t len)
2950
trace_vnc_auth_pass(vs, vs->auth);
2951
start_client_init(vs);
2952
} else if (vs->auth == VNC_AUTH_VNC) {
2963
- VNC_DEBUG("Tell client VNC auth\n");
2953
+ trace_vnc_client_auth_method(vs, vs->auth);
2954
vnc_write_u32(vs, vs->auth);
2955
vnc_flush(vs);
2956
start_auth_vnc(vs);
@@ -3319,10 +3309,7 @@ static void vnc_connect(VncDisplay *vd, QIOChannelSocket *sioc,
3309
vs->subauth = vd->subauth;
3310
}
3311
}
3322
- VNC_DEBUG("Client sioc=%p ws=%d auth=%d subauth=%d\n",
3323
- sioc, websocket, vs->auth, vs->subauth);
3324
-
3325
- VNC_DEBUG("New client on socket %p\n", vs->sioc);
3312
+ trace_vnc_client_setup(vs, sioc, websocket, vs->auth, vs->subauth);
3313
qemu_console_listener_set_refresh(&vd->dcl, VNC_REFRESH_INTERVAL_BASE);
3314
qio_channel_set_blocking(vs->ioc, false, &error_abort);
3315
g_clear_handle_id(&vs->ioc_tag, g_source_remove);
@@ -3727,13 +3714,10 @@ vnc_display_setup_auth(int *auth,
3714
*/
3715
if (websocket || !tlscreds) {
3716
if (password) {
3730
- VNC_DEBUG("Initializing VNC server with password auth\n");
3717
*auth = VNC_AUTH_VNC;
3718
} else if (sasl) {
3733
- VNC_DEBUG("Initializing VNC server with SASL auth\n");
3719
*auth = VNC_AUTH_SASL;
3720
} else {
3736
- VNC_DEBUG("Initializing VNC server with no auth\n");
3721
*auth = VNC_AUTH_NONE;
3722
}
3723
*subauth = VNC_AUTH_INVALID;
@@ -3752,27 +3736,20 @@ vnc_display_setup_auth(int *auth,
3736
*auth = VNC_AUTH_VENCRYPT;
3737
if (password) {
3738
if (is_x509) {
3755
- VNC_DEBUG("Initializing VNC server with x509 password auth\n");
3739
*subauth = VNC_AUTH_VENCRYPT_X509VNC;
3740
} else {
3758
- VNC_DEBUG("Initializing VNC server with TLS password auth\n");
3741
*subauth = VNC_AUTH_VENCRYPT_TLSVNC;
3742
}
3761
-
3743
} else if (sasl) {
3744
if (is_x509) {
3764
- VNC_DEBUG("Initializing VNC server with x509 SASL auth\n");
3745
*subauth = VNC_AUTH_VENCRYPT_X509SASL;
3746
} else {
3767
- VNC_DEBUG("Initializing VNC server with TLS SASL auth\n");
3747
*subauth = VNC_AUTH_VENCRYPT_TLSSASL;
3748
}
3749
} else {
3750
if (is_x509) {
3772
- VNC_DEBUG("Initializing VNC server with x509 no auth\n");
3751
*subauth = VNC_AUTH_VENCRYPT_X509NONE;
3752
} else {
3775
- VNC_DEBUG("Initializing VNC server with TLS no auth\n");
3753
*subauth = VNC_AUTH_VENCRYPT_TLSNONE;
3754
}
3755
}
@@ -4221,14 +4198,16 @@ static bool vnc_display_open(VncDisplay *vd, Error **errp)
4198
sasl, false, errp) < 0) {
4199
return false;
4200
}
4224
- trace_vnc_auth_init(vd, 0, vd->auth, vd->subauth);
4201
+ trace_vnc_auth_init(vd, 0, vd->auth, vd->subauth,
4202
+ vnc_auth_name(vd->auth, vd->subauth));
4203
4204
if (vnc_display_setup_auth(&vd->ws_auth, &vd->ws_subauth,
4205
vd->tlscreds, password,
4206
sasl, true, errp) < 0) {
4207
return false;
4208
}
4231
- trace_vnc_auth_init(vd, 1, vd->ws_auth, vd->ws_subauth);
4209
+ trace_vnc_auth_init(vd, 1, vd->ws_auth, vd->ws_subauth,
4210
+ vnc_auth_name(vd->ws_auth, vd->ws_subauth));
4211
4212
#ifdef CONFIG_VNC_SASL
4213
if (sasl && !vnc_sasl_server_init(errp)) {
ui/vnc.h
-8
@@ -46,14 +46,6 @@
46
#include "vnc-enc-zrle.h"
47
#include "ui/kbd-state.h"
48
49
-// #define _VNC_DEBUG 1
50
-
51
-#ifdef _VNC_DEBUG
52
-#define VNC_DEBUG(fmt, ...) do { fprintf(stderr, fmt, ## __VA_ARGS__); } while (0)
53
-#else
54
-#define VNC_DEBUG(fmt, ...) do { } while (0)
55
-#endif
56
-
49
/*****************************************************************************
50
*
51
* Core data structures