summaryrefslogtreecommitdiff
path: root/syncClientSocket.cpp
diff options
context:
space:
mode:
authorOthmar Gsenger <otti@anytun.org>2008-02-28 21:52:46 +0000
committerOthmar Gsenger <otti@anytun.org>2008-02-28 21:52:46 +0000
commitbf8cc84306f0ddf4b4e9c7edfc7458498be2c49b (patch)
tree9596f22fd3016c8a6df534ebc5aa532ed564d7e3 /syncClientSocket.cpp
parentnew sync protocol (diff)
sync bugfix
Diffstat (limited to 'syncClientSocket.cpp')
-rw-r--r--syncClientSocket.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/syncClientSocket.cpp b/syncClientSocket.cpp
index 0159f83..9e6510c 100644
--- a/syncClientSocket.cpp
+++ b/syncClientSocket.cpp
@@ -56,10 +56,16 @@ void SyncClientSocket::OnRawData(const char *buf,size_t len)
} else
if(missing_chars>0 && missing_chars<=static_cast<int16_t>(iss_.str().size()))
{
- boost::archive::text_iarchive ia(iss_);
+ char * buffer = new char [missing_chars];
+ iss_.read(buffer,missing_chars);
+ std::stringstream tmp;
+ tmp.write(buffer,missing_chars);
+ std::cout<<tmp.str()<<std::endl;
+ boost::archive::text_iarchive ia(tmp);
SyncCommand scom(cl_);
ia >> scom;
missing_chars=-1;
+ delete buffer;
} else
break;
}