* | Inspire Internet Relay Chat Daemon |
* +------------------------------------+
*
- * InspIRCd: (C) 2002-2009 InspIRCd Development Team
+ * InspIRCd: (C) 2002-2010 InspIRCd Development Team
* See: http://wiki.inspircd.org/Credits
*
* This program is free but copyrighted software; see
if (bind.sa.sa_family != 0)
{
- if (ServerInstance->SE->Bind(fd, &bind.sa, sa_size(bind)) < 0)
+ if (ServerInstance->SE->Bind(fd, bind) < 0)
return I_ERR_BIND;
}
void StreamSocket::Close()
{
- /* Save this, so we dont lose it,
- * otherise on failure, error messages
- * might be inaccurate.
- */
- int save = errno;
if (this->fd > -1)
{
if (IOHook)
ServerInstance->SE->Close(this);
fd = -1;
}
- errno = save;
}
CullResult StreamSocket::cull()
std::string::size_type i = recvq.find(delim);
if (i == std::string::npos)
return false;
- line = recvq.substr(0, i - 1);
+ line = recvq.substr(0, i);
// TODO is this the most efficient way to split?
recvq = recvq.substr(i + 1);
return true;
}
catch (CoreException& ex)
{
- ServerInstance->Logs->Log("SOCKET", ERROR, "Caught exception in socket processing on FD %d - '%s'",
+ ServerInstance->Logs->Log("SOCKET", DEFAULT, "Caught exception in socket processing on FD %d - '%s'",
fd, ex.GetReason());
SetError(ex.GetReason());
}