2024-10-11 10:10:45 +02:00
|
|
|
Index: vhostmd-1.2/vhostmd/metric.c
|
2024-08-02 14:10:03 +02:00
|
|
|
===================================================================
|
2024-10-11 10:10:45 +02:00
|
|
|
--- vhostmd-1.2.orig/vhostmd/metric.c
|
|
|
|
+++ vhostmd-1.2/vhostmd/metric.c
|
2024-08-02 14:10:03 +02:00
|
|
|
@@ -280,6 +280,12 @@ int metric_value_get(metric *m)
|
|
|
|
goto out;
|
|
|
|
|
|
|
|
fread(m->value, 1, len-1, fp);
|
|
|
|
+
|
|
|
|
+ if (m->type != M_XML) {
|
|
|
|
+ size_t end = strlen(m->value) - 1;
|
|
|
|
+ if (m->value[end] == '\n')
|
|
|
|
+ m->value[end] = '\0';
|
|
|
|
+ }
|
|
|
|
|
|
|
|
out:
|
|
|
|
ret = pclose(fp);
|