diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2016-02-14 14:41:52 +0100 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2016-02-14 14:41:52 +0100 |
commit | 8ded9e3d0bbc2d7cdc5b9f01b4fed9c8685caf82 (patch) | |
tree | e155a951afe91f4ddf349ce70a71150943ed8cfd /sensor | |
parent | f6493150c1a7172bcd8c9cc1790829285f707ee9 (diff) | |
download | ble-toys-8ded9e3d0bbc2d7cdc5b9f01b4fed9c8685caf82.tar.gz ble-toys-8ded9e3d0bbc2d7cdc5b9f01b4fed9c8685caf82.tar.bz2 ble-toys-8ded9e3d0bbc2d7cdc5b9f01b4fed9c8685caf82.tar.xz ble-toys-8ded9e3d0bbc2d7cdc5b9f01b4fed9c8685caf82.zip |
mqtt: Using mqtt_support utilities from the mqtt-cassandra bridge.
Diffstat (limited to 'sensor')
-rw-r--r-- | sensor/main/io.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
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<ostream> stream, |