[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 4/8] vnc/spice: fix "never" and "now" expire_time
From: |
Gerd Hoffmann |
Subject: |
[Qemu-devel] [PATCH 4/8] vnc/spice: fix "never" and "now" expire_time |
Date: |
Thu, 27 Jan 2011 11:12:26 +0100 |
From: Marc-André Lureau <address@hidden>
---
monitor.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/monitor.c b/monitor.c
index 384d87b..aefbe92 100644
--- a/monitor.c
+++ b/monitor.c
@@ -1136,9 +1136,9 @@ static int expire_password(Monitor *mon, const QDict
*qdict, QObject **ret_data)
time_t when;
int rc;
- if (strcmp(whenstr, "now")) {
+ if (strcmp(whenstr, "now") == 0) {
when = 0;
- } else if (strcmp(whenstr, "never")) {
+ } else if (strcmp(whenstr, "never") == 0) {
when = TIME_MAX;
} else if (whenstr[0] == '+') {
when = time(NULL) + strtoull(whenstr+1, NULL, 10);
--
1.7.1
- [Qemu-devel] [PATCH 3/8] spice: MAINTAINERS update, (continued)
- [Qemu-devel] [PATCH 3/8] spice: MAINTAINERS update, Gerd Hoffmann, 2011/01/24
- [Qemu-devel] [PATCH 1/8] add migration state change notifiers, Gerd Hoffmann, 2011/01/24
- [Qemu-devel] [PATCH 5/8] spice/qxl: zap spice 0.4 migration compatibility bits, Gerd Hoffmann, 2011/01/24
- [Qemu-devel] [PATCH 4/8] vnc/spice: fix "never" and "now" expire_time, Gerd Hoffmann, 2011/01/24
- [Qemu-devel] [PATCH 2/8] spice/vnc: client migration., Gerd Hoffmann, 2011/01/24
- [Qemu-devel] [PATCH 6/8] qxl: locking fix, Gerd Hoffmann, 2011/01/24
- [Qemu-devel] [PATCH 7/8] configure: Fix spice probe, Gerd Hoffmann, 2011/01/24
- [Qemu-devel] [PATCH 8/8] spice: add chardev (v5), Gerd Hoffmann, 2011/01/24
- [Qemu-devel] [PULL 0/8] spice patch queue, Gerd Hoffmann, 2011/01/27
- [Qemu-devel] [PATCH 4/8] vnc/spice: fix "never" and "now" expire_time,
Gerd Hoffmann <=
- [Qemu-devel] [PATCH 3/8] spice: MAINTAINERS update, Gerd Hoffmann, 2011/01/27
- [Qemu-devel] [PATCH 2/8] spice/vnc: client migration., Gerd Hoffmann, 2011/01/27
- [Qemu-devel] [PATCH 1/8] add migration state change notifiers, Gerd Hoffmann, 2011/01/27
- [Qemu-devel] [PATCH 6/8] qxl: locking fixes, Gerd Hoffmann, 2011/01/27
- [Qemu-devel] [PATCH 7/8] configure: Fix spice probe, Gerd Hoffmann, 2011/01/27
- [Qemu-devel] [PATCH 8/8] spice: add chardev (v5), Gerd Hoffmann, 2011/01/27
- [Qemu-devel] [PATCH 5/8] spice/qxl: zap spice 0.4 migration compatibility bits, Gerd Hoffmann, 2011/01/27