Revision d1f29646 hmp.c
b/hmp.c | ||
---|---|---|
306 | 306 |
qapi_free_VncInfo(info); |
307 | 307 |
} |
308 | 308 |
|
309 |
void hmp_info_spice(Monitor *mon) |
|
310 |
{ |
|
311 |
SpiceChannelList *chan; |
|
312 |
SpiceInfo *info; |
|
313 |
|
|
314 |
info = qmp_query_spice(NULL); |
|
315 |
|
|
316 |
if (!info->enabled) { |
|
317 |
monitor_printf(mon, "Server: disabled\n"); |
|
318 |
goto out; |
|
319 |
} |
|
320 |
|
|
321 |
monitor_printf(mon, "Server:\n"); |
|
322 |
if (info->has_port) { |
|
323 |
monitor_printf(mon, " address: %s:%" PRId64 "\n", |
|
324 |
info->host, info->port); |
|
325 |
} |
|
326 |
if (info->has_tls_port) { |
|
327 |
monitor_printf(mon, " address: %s:%" PRId64 " [tls]\n", |
|
328 |
info->host, info->tls_port); |
|
329 |
} |
|
330 |
monitor_printf(mon, " auth: %s\n", info->auth); |
|
331 |
monitor_printf(mon, " compiled: %s\n", info->compiled_version); |
|
332 |
|
|
333 |
if (!info->has_channels || info->channels == NULL) { |
|
334 |
monitor_printf(mon, "Channels: none\n"); |
|
335 |
} else { |
|
336 |
for (chan = info->channels; chan; chan = chan->next) { |
|
337 |
monitor_printf(mon, "Channel:\n"); |
|
338 |
monitor_printf(mon, " address: %s:%s%s\n", |
|
339 |
chan->value->host, chan->value->port, |
|
340 |
chan->value->tls ? " [tls]" : ""); |
|
341 |
monitor_printf(mon, " session: %" PRId64 "\n", |
|
342 |
chan->value->connection_id); |
|
343 |
monitor_printf(mon, " channel: %" PRId64 ":%" PRId64 "\n", |
|
344 |
chan->value->channel_type, chan->value->channel_id); |
|
345 |
} |
|
346 |
} |
|
347 |
|
|
348 |
out: |
|
349 |
qapi_free_SpiceInfo(info); |
|
350 |
} |
|
351 |
|
|
309 | 352 |
void hmp_quit(Monitor *mon, const QDict *qdict) |
310 | 353 |
{ |
311 | 354 |
monitor_suspend(mon); |
Also available in: Unified diff