cli: Fix changing global profile

For that we must not set a default event.
This commit is contained in:
Guido Günther
2021-08-09 11:49:30 +02:00
parent 3503fe0293
commit 587cbf3188
+6 -5
View File
@@ -160,14 +160,15 @@ main (int argc, char *argv[0])
return 1;
}
if (!name)
name = g_strdup (DEFAULT_EVENT);
g_timeout_add_seconds (watch, (GSourceFunc)on_watch_expired, NULL);
if (profile && !name)
success = set_profile (profile);
else
else {
if (!name)
name = g_strdup (DEFAULT_EVENT);
g_timeout_add_seconds (watch, (GSourceFunc)on_watch_expired, NULL);
success = trigger_event (name, profile, timeout);
}
lfb_uninit ();
return !success;