mirror of
https://github.com/emqx/neuron.git
synced 2026-10-28 22:59:34 +08:00
fix(add_gtags):license tag count
This commit is contained in:
@@ -1276,7 +1276,6 @@ int add_gtags(neu_adapter_t *adapter, neu_req_add_gtag_t *cmd,
|
||||
cmd->groups[group_index].group,
|
||||
&cmd->groups[group_index].tags[tag_index],
|
||||
cmd->groups[group_index].interval);
|
||||
|
||||
if (add_tag_result != 0) {
|
||||
for (int added_group_index = 0; added_group_index < group_index;
|
||||
added_group_index++) {
|
||||
@@ -1298,6 +1297,12 @@ int add_gtags(neu_adapter_t *adapter, neu_req_add_gtag_t *cmd,
|
||||
cmd->groups[group_index].group,
|
||||
cmd->groups[group_index].tags[added_tag_index].name);
|
||||
}
|
||||
for (int groups_count = 0; groups_count < cmd->n_group;
|
||||
groups_count++) {
|
||||
neu_adapter_driver_try_del_tag(
|
||||
(neu_adapter_driver_t *) adapter,
|
||||
cmd->groups[groups_count].n_tag);
|
||||
}
|
||||
resp->index = 0;
|
||||
resp->error = add_tag_result;
|
||||
return add_tag_result;
|
||||
|
||||
+1
-1
@@ -287,7 +287,6 @@ int neu_http_response(nng_aio *aio, neu_err_code_e code, char *content)
|
||||
case NEU_ERR_LICENSE_EXPIRED:
|
||||
case NEU_ERR_LICENSE_DISABLED:
|
||||
case NEU_ERR_LICENSE_MAX_NODES:
|
||||
case NEU_ERR_LICENSE_MAX_TAGS:
|
||||
case NEU_ERR_LICENSE_TOKEN_NOT_MATCH:
|
||||
case NEU_ERR_GROUP_ALREADY_SUBSCRIBED:
|
||||
case NEU_ERR_PLUGIN_TAG_TYPE_MISMATCH:
|
||||
@@ -355,6 +354,7 @@ int neu_http_response(nng_aio *aio, neu_err_code_e code, char *content)
|
||||
case NEU_ERR_TAG_PRECISION_INVALID:
|
||||
case NEU_ERR_TAG_NAME_TOO_LONG:
|
||||
case NEU_ERR_TAG_ADDRESS_TOO_LONG:
|
||||
case NEU_ERR_LICENSE_MAX_TAGS:
|
||||
case NEU_ERR_LICENSE_BAD_CLOCK:
|
||||
case NEU_ERR_LICENSE_MODULE_INVALID:
|
||||
status = NNG_HTTP_STATUS_BAD_REQUEST;
|
||||
|
||||
Reference in New Issue
Block a user