]> git.proxmox.com Git - qemu.git/commitdiff
vnc/spice: fix "never" and "now" expire_time
authorMarc-André Lureau <marcandre.lureau@redhat.com>
Thu, 6 Jan 2011 10:43:17 +0000 (11:43 +0100)
committerGerd Hoffmann <kraxel@redhat.com>
Mon, 24 Jan 2011 14:13:54 +0000 (15:13 +0100)
monitor.c

index 4c92d38d9efa0bef32cdd2c8560a8ab13182b2d8..6aa1bb99ef489d8e02c96ce7fcb03abbb667c1cc 100644 (file)
--- 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);