summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevron Rees <kevron_m_rees@linux.intel.com>2013-05-17 16:26:31 -0700
committerKevron Rees <kevron_m_rees@linux.intel.com>2013-05-17 16:51:10 -0700
commit6b4ae7e83638e40988b32e858beae49cba53f850 (patch)
tree577c3a8af0492374b968106d18a97edb4ee0bf5f
parent5aed337359e75e6bbaed1e8a8f987762537d88a3 (diff)
downloadautomotive-message-broker-6b4ae7e83638e40988b32e858beae49cba53f850.tar.gz
fixed websocketsink getRanged json
-rw-r--r--plugins/websocketsink/websocketsinkmanager.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/plugins/websocketsink/websocketsinkmanager.cpp b/plugins/websocketsink/websocketsinkmanager.cpp
index b0256e2b..d4808cd2 100644
--- a/plugins/websocketsink/websocketsinkmanager.cpp
+++ b/plugins/websocketsink/websocketsinkmanager.cpp
@@ -234,8 +234,9 @@ void WebSocketSinkManager::addSingleShotRangedSink(libwebsocket* socket, Vehicle
stringstream s;
//TODO: Dirty hack hardcoded stuff, jsut to make it work.
- stringstream data ("[");
- //data << "{ \"property
+ stringstream data;
+ data.precision(15);
+ data<< "[";
std::list<AbstractPropertyType*> values = reply->values;
for(auto itr = values.begin(); itr != values.end(); itr++)
{
@@ -249,7 +250,7 @@ void WebSocketSinkManager::addSingleShotRangedSink(libwebsocket* socket, Vehicle
data<<"]";
- s << "{\"type\":\"methodReply\",\"name\":\"getRanged\",\"data\":"<<data<<",\"transactionid\":\"" << id << "\"}";
+ s << "{\"type\":\"methodReply\",\"name\":\"getRanged\",\"data\":"<<data.str()<<",\"transactionid\":\"" << id << "\"}";
string replystr = s.str();
//printf("Reply: %s\n",replystr.c_str());