X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fnntp%2Fnntpconnection.cpp;h=0212e239b8149c87a786193301dc45c847229299;hb=221236a4d3aac4144529d418ce368db5c98facb0;hp=6e53237d3c183b0640406dcdcd7dfb48e7b3dd2c;hpb=dec33c63afafabf83c3039e916725cac6faef9b3;p=fms.git diff --git a/src/nntp/nntpconnection.cpp b/src/nntp/nntpconnection.cpp index 6e53237..0212e23 100644 --- a/src/nntp/nntpconnection.cpp +++ b/src/nntp/nntpconnection.cpp @@ -17,11 +17,10 @@ #include #endif -NNTPConnection::NNTPConnection(SOCKET sock) +NNTPConnection::NNTPConnection(SOCKET sock):m_socket(sock) { - std::string tempval; + std::string tempval(""); - m_socket=sock; m_tempbuffer.resize(32768); m_status.m_isposting=false; @@ -1323,6 +1322,14 @@ void NNTPConnection::run() m_log->error("NNTPConnection::run select returned -1 : "+GetSocketErrorMessage()); } + //process all remaining commands in buffer + std::vector::size_type rbs=0; + while(rbs!=m_receivebuffer.size()) + { + rbs=m_receivebuffer.size(); + HandleReceivedData(); + } + }while(!Disconnected() && !IsCancelled()); Disconnect();