diff options
Diffstat (limited to 'src/action.c')
| -rw-r--r-- | src/action.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/action.c b/src/action.c index 81995e6..0ae0c0a 100644 --- a/src/action.c +++ b/src/action.c @@ -9,6 +9,7 @@ void action_perform(action_t *action, block_t *block, config_t *config) { block_t *target = block; + bool warned = false; for (size_t i = 0; i < action->length; i++) { const char *key = action->parts[i].key; @@ -29,19 +30,20 @@ void action_perform(action_t *action, block_t *block, config_t *config) } } } + warned = false; break; } case ACTION_SET_PAIR: { assert(target != NULL); - - if (target->scheme->change_fn == NULL) { + if (!warned && target->scheme->change_fn == NULL) { log_warn("Block '%s' does not support changing values", target->label); + warned = true; continue; } // Skip "set-" - block_change(target, key + 4, value); + target->scheme->change_fn(target, config, key + 4, value); break; } |
