MGMT_fixes change functions (#6242)
thiagoftsm committed
Jun 7, 2019 at 11:57 UTC
083378203c405665092f358e5f356f2afbb2ca15
1 file changed
+6
-6
web/api/health/health_cmdapi.c
+6
-6
@@ -87,7 +87,7 @@ int web_client_api_request_v1_mgmt_health(RRDHOST *host, struct web_client *w, c
87
debug(D_WEB_CLIENT, "%llu: API v1 health query param '%s' with value '%s'", w->id, key, value);
88
89
// name and value are now the parameters
90
- if (!strncmp(key, "cmd",lkey)) {
90
+ if (!strcmp(key, "cmd")) {
91
if (!strcmp(value, HEALTH_CMDAPI_CMD_SILENCEALL)) {
92
silencers->all_alarms = 1;
93
silencers->stype = STYPE_SILENCE_NOTIFICATIONS;
@@ -124,19 +124,19 @@ int web_client_api_request_v1_mgmt_health(RRDHOST *host, struct web_client *w, c
124
}
125
}
126
127
- if (hash == hash_alarm && !strncasecmp(key, HEALTH_ALARM_KEY,lkey)) {
127
+ if (hash == hash_alarm && !strcasecmp(key, HEALTH_ALARM_KEY)) {
128
silencer->alarms = strdupz(value);
129
silencer->alarms_pattern = simple_pattern_create(silencer->alarms, NULL, SIMPLE_PATTERN_EXACT);
130
- } else if (hash == hash_chart && !strncasecmp(key, HEALTH_CHART_KEY,lkey)) {
130
+ } else if (hash == hash_chart && !strcasecmp(key, HEALTH_CHART_KEY)) {
131
silencer->charts = strdupz(value);
132
silencer->charts_pattern = simple_pattern_create(silencer->charts, NULL, SIMPLE_PATTERN_EXACT);
133
- } else if (hash == hash_context && !strncasecmp(key, HEALTH_CONTEXT_KEY,lkey)) {
133
+ } else if (hash == hash_context && !strcasecmp(key, HEALTH_CONTEXT_KEY)) {
134
silencer->contexts = strdupz(value);
135
silencer->contexts_pattern = simple_pattern_create(silencer->contexts, NULL, SIMPLE_PATTERN_EXACT);
136
- } else if (hash == hash_host && !strncasecmp(key, HEALTH_HOST_KEY,lkey)) {
136
+ } else if (hash == hash_host && !strcasecmp(key, HEALTH_HOST_KEY)) {
137
silencer->hosts = strdupz(value);
138
silencer->hosts_pattern = simple_pattern_create(silencer->hosts, NULL, SIMPLE_PATTERN_EXACT);
139
- } else if (hash == hash_families && !strncasecmp(key, HEALTH_FAMILIES_KEY,lkey)) {
139
+ } else if (hash == hash_families && !strcasecmp(key, HEALTH_FAMILIES_KEY)) {
140
silencer->families = strdupz(value);
141
silencer->families_pattern = simple_pattern_create(silencer->families, NULL, SIMPLE_PATTERN_EXACT);
142
} else {