aboutsummaryrefslogtreecommitdiff
path: root/monitor.c
diff options
context:
space:
mode:
Diffstat (limited to 'monitor.c')
-rw-r--r--monitor.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/monitor.c b/monitor.c
index 6aa1bb99ef..acbe0e6b30 100644
--- a/monitor.c
+++ b/monitor.c
@@ -1018,6 +1018,14 @@ static int do_quit(Monitor *mon, const QDict *qdict, QObject **ret_data)
static int change_vnc_password(const char *password)
{
+ if (!password || !password[0]) {
+ if (vnc_display_disable_login(NULL)) {
+ qerror_report(QERR_SET_PASSWD_FAILED);
+ return -1;
+ }
+ return 0;
+ }
+
if (vnc_display_password(NULL, password) < 0) {
qerror_report(QERR_SET_PASSWD_FAILED);
return -1;
@@ -1117,6 +1125,8 @@ static int set_password(Monitor *mon, const QDict *qdict, QObject **ret_data)
qerror_report(QERR_INVALID_PARAMETER, "connected");
return -1;
}
+ /* Note that setting an empty password will not disable login through
+ * this interface. */
rc = vnc_display_password(NULL, password);
if (rc != 0) {
qerror_report(QERR_SET_PASSWD_FAILED);
@@ -2536,8 +2546,9 @@ static void do_wav_capture(Monitor *mon, const QDict *qdict)
nchannels = has_channels ? nchannels : 2;
if (wav_start_capture (s, path, freq, bits, nchannels)) {
- monitor_printf(mon, "Faied to add wave capture\n");
+ monitor_printf(mon, "Failed to add wave capture\n");
qemu_free (s);
+ return;
}
QLIST_INSERT_HEAD (&capture_head, s, entries);
}
@@ -4189,7 +4200,7 @@ static const mon_cmd_t *monitor_parse_command(Monitor *mon,
break;
case 'o':
{
- ssize_t val;
+ int64_t val;
char *end;
while (qemu_isspace(*p)) {