vpn-statistic: fix removal of rw rrd-data
authorAlexander Marx <alexander.marx@ipfire.org>
Sat, 11 Apr 2015 05:12:32 +0000 (07:12 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Sat, 11 Apr 2015 06:33:19 +0000 (08:33 +0200)
Due to a missing slash the rrd data of a deleted rrd-connection was not
deleted

src/misc-progs/openvpnctrl.c

index bba84ca..20967e4 100644 (file)
@@ -605,7 +605,7 @@ int deleterrd(char *name) {
 
                // Handle RW connections
                if (strcmp(conn->type, "host") == 0) {
-                       snprintf(rrd_dir, STRING_SIZE - 1, "/var/log/rrd/collectd/localhost/openvpn-%s", name);
+                       snprintf(rrd_dir, STRING_SIZE - 1, "/var/log/rrd/collectd/localhost/openvpn-%s/", name);
 
                // Handle N2N connections
                } else if (strcmp(conn->type, "net") == 0) {