From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Marc-André Lureau" <marcandre.lureau@redhat.com>,
"Gerd Hoffmann" <kraxel@redhat.com>
Subject: [Qemu-devel] [PATCH 4/6] vnc/spice: fix "never" and "now" expire_time
Date: Mon, 10 Jan 2011 14:31:49 +0100 [thread overview]
Message-ID: <1294666311-23457-5-git-send-email-kraxel@redhat.com> (raw)
In-Reply-To: <1294666311-23457-1-git-send-email-kraxel@redhat.com>
From: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
monitor.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/monitor.c b/monitor.c
index f258000..038d532 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
next prev parent reply other threads:[~2011-01-10 13:32 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-10 13:31 [Qemu-devel] [PULL 0/6] spice patch queue Gerd Hoffmann
2011-01-10 13:31 ` [Qemu-devel] [PATCH 1/6] add migration state change notifiers Gerd Hoffmann
2011-01-10 13:31 ` [Qemu-devel] [PATCH 2/6] spice: client migration Gerd Hoffmann
2011-01-10 15:49 ` Daniel P. Berrange
2011-01-10 15:57 ` Alon Levy
2011-01-10 16:08 ` Gerd Hoffmann
2011-01-10 16:18 ` Daniel P. Berrange
2011-01-10 16:37 ` Gerd Hoffmann
2011-01-10 19:26 ` Alon Levy
2011-01-10 19:39 ` Daniel P. Berrange
2011-01-11 8:15 ` Gerd Hoffmann
2011-01-10 13:31 ` [Qemu-devel] [PATCH 3/6] spice: MAINTAINERS update Gerd Hoffmann
2011-01-10 13:31 ` Gerd Hoffmann [this message]
2011-01-10 13:31 ` [Qemu-devel] [PATCH 5/6] spice/qxl: zap spice 0.4 migration compatibility bits Gerd Hoffmann
2011-01-10 13:31 ` [Qemu-devel] [PATCH 6/6] spice: add chardev (v4) Gerd Hoffmann
-- strict thread matches above, loose matches on Subject: below --
2011-01-11 12:08 [Qemu-devel] [PULL v2 0/6] spice patch queue Gerd Hoffmann
2011-01-11 12:08 ` [Qemu-devel] [PATCH 4/6] vnc/spice: fix "never" and "now" expire_time Gerd Hoffmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1294666311-23457-5-git-send-email-kraxel@redhat.com \
--to=kraxel@redhat.com \
--cc=marcandre.lureau@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).