mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
vnc/spice: fix "never" and "now" expire_time
This commit is contained in:
committed by
Gerd Hoffmann
parent
7ee3bf0398
commit
8d86e2bfe3
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user