summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOthmar Gsenger <otti@anytun.org>2008-02-28 22:01:35 +0000
committerOthmar Gsenger <otti@anytun.org>2008-02-28 22:01:35 +0000
commit2fece736b8d7eb0e44fc7f21e0c0eacf831f4564 (patch)
tree814bf31b3bf4b8bbe42b27ebf417b50a3b7f0d5f
parentdebug (diff)
sync bug fixed
-rw-r--r--syncClientSocket.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/syncClientSocket.cpp b/syncClientSocket.cpp
index 1e9e313..a0952b6 100644
--- a/syncClientSocket.cpp
+++ b/syncClientSocket.cpp
@@ -42,7 +42,6 @@ void SyncClientSocket::OnReconnect()
void SyncClientSocket::OnRawData(const char *buf,size_t len)
//void SyncClientSocket::OnLine(const std::string& line)
{
- cLog.msg(Log::PRIO_NOTICE) << "recieved sync inforamtaion from " << GetRemoteHostname() << std::endl;
for(size_t index=0;index<len;index++)
{
std::cout << buf[index];
@@ -59,8 +58,8 @@ void SyncClientSocket::OnRawData(const char *buf,size_t len)
char * buffer = new char [missing_chars+1];
iss_.read(buffer,missing_chars+1);
std::stringstream tmp;
- tmp.write(buffer,missing_chars+1);
- std::cout<<'"'<<tmp.str()<<'"'<<std::endl;
+ tmp.write(buffer+1,missing_chars);
+ cLog.msg(Log::PRIO_NOTICE) << "recieved sync inforamtaion from " << GetRemoteHostname() <<" \""<<tmp.str()<<'"'<< std::endl;
boost::archive::text_iarchive ia(tmp);
SyncCommand scom(cl_);
ia >> scom;