Loading src/connection.cpp +3 −8 Original line number Diff line number Diff line Loading @@ -156,11 +156,8 @@ void netplus::con::sending(bool state) { netplus::con::condata *netplus::con::_resizeQueue(condata** firstdata, condata** lastdata, unsigned long &qsize,unsigned long size){ if (size == 0) return nullptr; NetException exception; if(!*firstdata || size > qsize){ if(!*firstdata || size > qsize || qsize==0 || size==0){ exception[NetException::Error] << "_resizeQueue wrong datasize or ConnectionData"; throw exception; } Loading @@ -176,7 +173,7 @@ HAVEDATA: if((*firstdata)) { curlen += ((int)(*firstdata)->getDataLength() - size); if ( curlen <= 0 || size >= curlen) { if ( curlen <= 0 || size >= (unsigned long)curlen) { size -= (*firstdata)->getDataLength(); #ifdef DEBUG delsize += (*firstdata)->getDataLength(); Loading @@ -187,8 +184,6 @@ HAVEDATA: (*lastdata) = nullptr; delete* firstdata; (*firstdata) = newdat; if ((*firstdata) && size > 0) goto HAVEDATA; }else{ std::string buf = (*firstdata)->_Data.substr(size,curlen); (*firstdata)->_Data = buf; Loading @@ -206,7 +201,7 @@ HAVEDATA: // << " Calculated Blocksize: " << (presize-delsize) // << " Planned size: " << qsize // << std::endl; if((presize-delsize)!=qsize){ if((unsigned long)(presize-delsize)!=qsize){ exception[NetException::Critical] << "_resizeQueue: Calculated wrong size"; throw exception; } Loading src/linux/event.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -159,7 +159,7 @@ namespace netplus { } try { char buf[BLOCKSIZE]; ssize_t rcvsize = _ServerSocket->recvData(rcon->csock, buf, BLOCKSIZE); size_t rcvsize = _ServerSocket->recvData(rcon->csock, buf, BLOCKSIZE); if(rcvsize==0) return; rcon->addRecvQueue(buf, rcvsize); Loading @@ -183,7 +183,7 @@ namespace netplus { exp[NetException::Note] << "WriteEvent: no data to send!" << pos; throw exp; } ssize_t sended = _ServerSocket->sendData(wcon->csock, size_t sended = _ServerSocket->sendData(wcon->csock, (void*)wcon->getSendData()->getData(), wcon->getSendData()->getDataLength(), 0); Loading Loading
src/connection.cpp +3 −8 Original line number Diff line number Diff line Loading @@ -156,11 +156,8 @@ void netplus::con::sending(bool state) { netplus::con::condata *netplus::con::_resizeQueue(condata** firstdata, condata** lastdata, unsigned long &qsize,unsigned long size){ if (size == 0) return nullptr; NetException exception; if(!*firstdata || size > qsize){ if(!*firstdata || size > qsize || qsize==0 || size==0){ exception[NetException::Error] << "_resizeQueue wrong datasize or ConnectionData"; throw exception; } Loading @@ -176,7 +173,7 @@ HAVEDATA: if((*firstdata)) { curlen += ((int)(*firstdata)->getDataLength() - size); if ( curlen <= 0 || size >= curlen) { if ( curlen <= 0 || size >= (unsigned long)curlen) { size -= (*firstdata)->getDataLength(); #ifdef DEBUG delsize += (*firstdata)->getDataLength(); Loading @@ -187,8 +184,6 @@ HAVEDATA: (*lastdata) = nullptr; delete* firstdata; (*firstdata) = newdat; if ((*firstdata) && size > 0) goto HAVEDATA; }else{ std::string buf = (*firstdata)->_Data.substr(size,curlen); (*firstdata)->_Data = buf; Loading @@ -206,7 +201,7 @@ HAVEDATA: // << " Calculated Blocksize: " << (presize-delsize) // << " Planned size: " << qsize // << std::endl; if((presize-delsize)!=qsize){ if((unsigned long)(presize-delsize)!=qsize){ exception[NetException::Critical] << "_resizeQueue: Calculated wrong size"; throw exception; } Loading
src/linux/event.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -159,7 +159,7 @@ namespace netplus { } try { char buf[BLOCKSIZE]; ssize_t rcvsize = _ServerSocket->recvData(rcon->csock, buf, BLOCKSIZE); size_t rcvsize = _ServerSocket->recvData(rcon->csock, buf, BLOCKSIZE); if(rcvsize==0) return; rcon->addRecvQueue(buf, rcvsize); Loading @@ -183,7 +183,7 @@ namespace netplus { exp[NetException::Note] << "WriteEvent: no data to send!" << pos; throw exp; } ssize_t sended = _ServerSocket->sendData(wcon->csock, size_t sended = _ServerSocket->sendData(wcon->csock, (void*)wcon->getSendData()->getData(), wcon->getSendData()->getDataLength(), 0); Loading