aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorPim van den Berg2014-09-25 22:29:24 +0200
committerPim van den Berg2014-09-25 22:30:16 +0200
commit78e4d112f3573d5ae660ea33d54b7288320febac (patch)
tree27c4e91f53c6e40b6863503ac2c9654eb23ab86a
parentmove " on <HOSTNAME>" suffix in graph title to JSON (diff)
downloadapt-panopticon_cgp-78e4d112f3573d5ae660ea33d54b7288320febac.zip
apt-panopticon_cgp-78e4d112f3573d5ae660ea33d54b7288320febac.tar.gz
apt-panopticon_cgp-78e4d112f3573d5ae660ea33d54b7288320febac.tar.bz2
apt-panopticon_cgp-78e4d112f3573d5ae660ea33d54b7288320febac.tar.xz
type/base: escape space character in rrdcached FLUSH command
Closes #105
-rw-r--r--type/Base.class.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/type/Base.class.php b/type/Base.class.php
index 7ee547e..1452d43 100644
--- a/type/Base.class.php
+++ b/type/Base.class.php
@@ -405,7 +405,7 @@ class Type_Base {
405 } 405 }
406 elseif ($this->flush_type == 'rrdcached') { 406 elseif ($this->flush_type == 'rrdcached') {
407 foreach ($identifier as $val) { 407 foreach ($identifier as $val) {
408 $cmd = sprintf("FLUSH %s.rrd\n", $val); 408 $cmd = sprintf("FLUSH %s.rrd\n", str_replace(' ', '\\ ', $val));
409 $this->socket_cmd($socket, $cmd); 409 $this->socket_cmd($socket, $cmd);
410 } 410 }
411 } 411 }