aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2009-12-07 21:37:01 +0100
committerAnthony Liguori <aliguori@us.ibm.com>2009-12-07 16:34:33 -0600
commit2895e075c6dba0e66c72af781b1eed2bff0c3777 (patch)
tree42ee6360b27bf13ffed4666c2d44b021e1880437
parent94171e119cb6f7bab2578896643b0daff1d9b184 (diff)
monitor: Fix double-prompt after "change vnc passwd BLA"
Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
-rw-r--r--monitor.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/monitor.c b/monitor.c
index bdf4b720af..2db2a9851c 100644
--- a/monitor.c
+++ b/monitor.c
@@ -815,12 +815,17 @@ static void do_change_block(Monitor *mon, const char *device,
monitor_read_bdrv_key_start(mon, bs, NULL, NULL);
}
-static void change_vnc_password_cb(Monitor *mon, const char *password,
- void *opaque)
+static void change_vnc_password(Monitor *mon, const char *password)
{
if (vnc_display_password(NULL, password) < 0)
monitor_printf(mon, "could not set VNC server password\n");
+}
+
+static void change_vnc_password_cb(Monitor *mon, const char *password,
+ void *opaque)
+{
+ change_vnc_password(mon, password);
monitor_read_command(mon, 1);
}
@@ -832,7 +837,7 @@ static void do_change_vnc(Monitor *mon, const char *target, const char *arg)
char password[9];
strncpy(password, arg, sizeof(password));
password[sizeof(password) - 1] = '\0';
- change_vnc_password_cb(mon, password, NULL);
+ change_vnc_password(mon, password);
} else {
monitor_read_password(mon, change_vnc_password_cb, NULL);
}