mirror of
https://github.com/emqx/neuron.git
synced 2026-10-28 22:59:34 +08:00
Fix mqtt plugin add tags command error handling
This commit is contained in:
@@ -167,10 +167,15 @@ char *command_add_tags(neu_plugin_t *plugin, neu_json_mqtt_t *mqtt,
|
||||
}
|
||||
}
|
||||
|
||||
int rv = 0;
|
||||
if (config != NULL) {
|
||||
neu_system_update_group_config(plugin, req->node_id, new_config);
|
||||
rv = neu_system_update_group_config(plugin, req->node_id, new_config);
|
||||
} else {
|
||||
neu_system_add_group_config(plugin, req->node_id, new_config);
|
||||
rv = neu_system_add_group_config(plugin, req->node_id, new_config);
|
||||
}
|
||||
|
||||
if (0 != rv) {
|
||||
code = rv;
|
||||
}
|
||||
|
||||
error.error = code;
|
||||
|
||||
Reference in New Issue
Block a user