summaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
authorStelios Fragkakis <52996999+stelfrag@users.noreply.github.com>2023-11-06 08:53:28 +0200
committerGitHub <noreply@github.com>2023-11-06 08:53:28 +0200
commit537bab0f18d77c8ea21daf7a960ebc294179233a (patch)
tree49cd4f3a72c67c73674f36451d7b37125c2925a2 /web
parentdcc08557ff2eb3f2595bb2296df63985d4622083 (diff)
Keep precompiled statements for alarm log queries to improve performance (#16321)
* Keep precompiled statements for alarm log queries to improve performance * Check bind result
Diffstat (limited to 'web')
-rw-r--r--web/api/web_api_v1.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/web/api/web_api_v1.c b/web/api/web_api_v1.c
index 458b29751f..60fee6684b 100644
--- a/web/api/web_api_v1.c
+++ b/web/api/web_api_v1.c
@@ -444,7 +444,7 @@ inline int web_client_api_request_v1_alarm_count(RRDHOST *host, struct web_clien
}
inline int web_client_api_request_v1_alarm_log(RRDHOST *host, struct web_client *w, char *url) {
- uint32_t after = 0;
+ time_t after = 0;
char *chart = NULL;
while(url) {
@@ -455,7 +455,7 @@ inline int web_client_api_request_v1_alarm_log(RRDHOST *host, struct web_client
if(!name || !*name) continue;
if(!value || !*value) continue;
- if (!strcmp(name, "after")) after = (uint32_t)strtoul(value, NULL, 0);
+ if (!strcmp(name, "after")) after = (time_t) strtoul(value, NULL, 0);
else if (!strcmp(name, "chart")) chart = value;
}