dynamic translations
This commit is contained in:
@@ -113,7 +113,7 @@ namespace nntpchan
|
||||
QueueLine("STREAMING");
|
||||
QueueLine(".");
|
||||
} else if (cmd == "CHECK") {
|
||||
if(cmdlen == 2) {
|
||||
if(cmdlen >= 2) {
|
||||
const std::string & msgid = command[1];
|
||||
if(IsValidMessageID(msgid) && m_store.Accept(msgid))
|
||||
{
|
||||
|
@@ -90,15 +90,16 @@ namespace nntpchan
|
||||
}, [] (uv_stream_t * s, ssize_t nread, const uv_buf_t * b) {
|
||||
IServerConn * self = (IServerConn*) s->data;
|
||||
if(self == nullptr) {
|
||||
delete [] b->base;
|
||||
if(b->base)
|
||||
delete [] b->base;
|
||||
return;
|
||||
}
|
||||
if(nread > 0) {
|
||||
b->base[nread] = 0;
|
||||
self->m_handler->OnData(b->base, nread);
|
||||
self->SendNextReply();
|
||||
if(self->m_handler->ShouldClose())
|
||||
self->Close();
|
||||
delete [] b->base;
|
||||
} else {
|
||||
if (nread != UV_EOF) {
|
||||
std::cerr << "error in nntp server conn alloc: ";
|
||||
@@ -108,7 +109,6 @@ namespace nntpchan
|
||||
// got eof or error
|
||||
self->Close();
|
||||
}
|
||||
delete [] b->base;
|
||||
});
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user