klgd_lock_plugins(self->plugins_lock);
eff->change = FFPL_TO_ERASE;
+ eff->trigger = FFPL_TRIG_NOW;
klgd_unlock_plugins_sched(self->plugins_lock);
return 0;
if (ffpl_needs_replacing(&eff->active, &eff->latest)) {
eff->replace = true;
eff->change = FFPL_TO_UPLOAD;
+ eff->trigger = FFPL_TRIG_NOW;
} else {
eff->replace = false;
eff->change = FFPL_TO_UPDATE;
eff->trigger = FFPL_TRIG_NONE;
break;
case FFPL_TRIG_STOP:
+ case FFPL_TRIG_NOW:
eff->trigger = FFPL_TRIG_NONE;
break;
default:
switch (eff->trigger) {
default:
continue;
+ case FFPL_TRIG_NOW:
+ current_t = now;
+ break;
case FFPL_TRIG_START:
current_t = eff->start_at;
eff->change = FFPL_TO_START;
/* What to do at the next timing trip point */
enum ffpl_trigger {
FFPL_TRIG_NONE, /* No timing event scheduled for and effect */
+ FFPL_TRIG_NOW, /* State change has been set elsewhere and is to be processed immediately */
FFPL_TRIG_START, /* Effect is to be started */
FFPL_TRIG_STOP /* Effect is to be stopped */
};