- for (int i = 0; i < ci->children_num; i++) {
- if (ci->children[i].children == NULL)
- dispatch_value_plugin(name, ci->children + i);
- else {
+ for (int i = 0, ret = 0; i < ci->children_num; i++) {
+ if (ci->children[i].children == NULL) {
+ ret = dispatch_value_plugin(name, ci->children + i);
+ if (ret != 0) {
+ ERROR("dispatch for plugin %s returned non-zero code : %i", name, ret);
+ return ret;
+ }
+ } else {