From f81b0621dc41d1d03f5cda0f06928be730a91384 Mon Sep 17 00:00:00 2001 From: otti Date: Thu, 28 Feb 2008 22:35:07 +0000 Subject: [PATCH] length to size git-svn-id: https://anytun.org/svn/anytun@359 2edecd69-f0ce-4815-94af-351a89d40aaa --- syncClientSocket.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/syncClientSocket.cpp b/syncClientSocket.cpp index c68586a..fdda068 100644 --- a/syncClientSocket.cpp +++ b/syncClientSocket.cpp @@ -49,7 +49,7 @@ void SyncClientSocket::OnRawData(const char *buf,size_t len) } while (1) { - if(missing_chars==-1 && iss_.str().length()>5) + if(missing_chars==-1 && iss_.str().size()>5) { char * buffer = new char [6]; iss_.read(buffer,6); @@ -59,7 +59,7 @@ void SyncClientSocket::OnRawData(const char *buf,size_t len) cLog.msg(Log::PRIO_NOTICE) << "recieved sync inforamtaion from " << GetRemoteHostname() <<" "<0 && missing_chars<=static_cast(iss_.str().length())) + if(missing_chars>0 && missing_chars<=static_cast(iss_.str().size())) { char * buffer = new char [missing_chars]; iss_.read(buffer,missing_chars); -- 2.11.4.GIT