summaryrefslogtreecommitdiff
path: root/syncClientSocket.cpp
diff options
context:
space:
mode:
authorOthmar Gsenger <otti@anytun.org>2008-02-28 21:57:08 +0000
committerOthmar Gsenger <otti@anytun.org>2008-02-28 21:57:08 +0000
commit036467dbb69d87a2205de88aea7f03d7ac19fa96 (patch)
tree56087d1437982fe325656ae7a31b19987600e28a /syncClientSocket.cpp
parentsync bugfix (diff)
debug
Diffstat (limited to 'syncClientSocket.cpp')
-rw-r--r--syncClientSocket.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/syncClientSocket.cpp b/syncClientSocket.cpp
index 9e6510c..1e9e313 100644
--- a/syncClientSocket.cpp
+++ b/syncClientSocket.cpp
@@ -56,11 +56,11 @@ void SyncClientSocket::OnRawData(const char *buf,size_t len)
} else
if(missing_chars>0 && missing_chars<=static_cast<int16_t>(iss_.str().size()))
{
- char * buffer = new char [missing_chars];
- iss_.read(buffer,missing_chars);
+ char * buffer = new char [missing_chars+1];
+ iss_.read(buffer,missing_chars+1);
std::stringstream tmp;
- tmp.write(buffer,missing_chars);
- std::cout<<tmp.str()<<std::endl;
+ tmp.write(buffer,missing_chars+1);
+ std::cout<<'"'<<tmp.str()<<'"'<<std::endl;
boost::archive::text_iarchive ia(tmp);
SyncCommand scom(cl_);
ia >> scom;