}
else if (rval > 0 && pfds[0].revents & POLLIN)
{
- TcpConnectorMsgHandle* handle;
- if ( (handle = read_message(sock_fd)) != nullptr )
- if ( !receive_ring->put(handle) )
- ErrorMessage("TcpC Input Thread: overrun\n");
+ TcpConnectorMsgHandle* handle = read_message(sock_fd);
+ if (handle && !receive_ring->put(handle))
+ {
+ ErrorMessage("TcpC Input Thread: overrun\n");
+ delete handle;
+ }
}
}
const Parameter* def_params = m->get_default_parameters();
if ( ( params and params->type < Parameter::PT_MAX ) ||
- ( def_params and params->type < Parameter::PT_MAX ) )
+ ( def_params and def_params->type < Parameter::PT_MAX ) )
{
cout << endl << "Configuration: " << endl << endl;
show_configs(name, true);
ServicePOP3Data* pd = &dd->server;
const uint8_t* begin = nullptr;
+ assert(data);
const uint8_t* end = data + size;
char* v_end = pd->version + MAX_VERSION_SIZE - 1;
switch (pd->state)
static struct SigInfo* create_sig_info()
{
- auto si = new SigInfo;
- memset(si, 0, sizeof(SigInfo));
+ auto si = new SigInfo();
return si;
}