summaryrefslogtreecommitdiff
path: root/syncClientSocket.cpp
diff options
context:
space:
mode:
authorOthmar Gsenger <otti@anytun.org>2008-02-28 22:26:42 +0000
committerOthmar Gsenger <otti@anytun.org>2008-02-28 22:26:42 +0000
commitbe9abfcfc8e8210088636f4aa64948b20aaaffba (patch)
treefd1ad932bc53f395f476074b4157b685356e0e11 /syncClientSocket.cpp
parentanother sync fix (diff)
fix
Diffstat (limited to 'syncClientSocket.cpp')
-rw-r--r--syncClientSocket.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/syncClientSocket.cpp b/syncClientSocket.cpp
index a6f03f4..8d1da61 100644
--- a/syncClientSocket.cpp
+++ b/syncClientSocket.cpp
@@ -51,10 +51,10 @@ void SyncClientSocket::OnRawData(const char *buf,size_t len)
{
if(missing_chars==-1 && iss_.str().length()>5)
{
- char * buffer = new char [missing_chars];
- iss_.read(buffer,missing_chars);
+ char * buffer = new char [6];
+ iss_.read(buffer,6);
std::stringstream tmp;
- tmp.write(buffer,missing_chars);
+ tmp.write(buffer,6);
tmp>>missing_chars;
cLog.msg(Log::PRIO_NOTICE) << "recieved sync inforamtaion from " << GetRemoteHostname() <<" "<<tmp.str()<<"bytes of data"<< std::endl;
delete buffer;