From 8ded9e3d0bbc2d7cdc5b9f01b4fed9c8685caf82 Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Sun, 14 Feb 2016 14:41:52 +0100 Subject: mqtt: Using mqtt_support utilities from the mqtt-cassandra bridge. --- sensor/main/io.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'sensor') diff --git a/sensor/main/io.cpp b/sensor/main/io.cpp index 74bc796..96a98f6 100644 --- a/sensor/main/io.cpp +++ b/sensor/main/io.cpp @@ -215,7 +215,7 @@ void KeyValueSampleOutputStream::write(SampleRecord const &sample) { return; } - auto &s = *stream.get(); + auto s = stream.get(); bool first = true; if (!dict.empty()) { @@ -228,9 +228,9 @@ void KeyValueSampleOutputStream::write(SampleRecord const &sample) { if (first) { first = false; } else { - s << ", "; + *s << ", "; } - s << key->name << "=" << value.get(); + *s << key->name << "=" << value.get(); } } } else { @@ -241,16 +241,16 @@ void KeyValueSampleOutputStream::write(SampleRecord const &sample) { if (first) { first = false; } else { - s << ", "; + *s << ", "; } // Make sure that the key is registered in the dictionary dict.indexOf(sampleKey->name); - s << sampleKey->name << "=" << o.get(); + *s << sampleKey->name << "=" << o.get(); } } } - s << endl << flush; + *s << endl << flush; } RrdSampleOutputStream::RrdSampleOutputStream(shared_ptr stream, -- cgit v1.2.3