Merge from trunk

git-svn-id: http://svn.inspircd.org/repository/branches/1_1_stable@8170 e03df62e-2008-0410-955e-edbf42e46eb7
This commit is contained in:
brain 2007-10-13 22:59:05 +00:00
parent 438bec9314
commit ca29082480

View File

@ -277,27 +277,39 @@ class ModuleIdent : public Module
if (user->GetExt("ident_socket", isock))
{
int *fd;
if (user->GetExt("ident_socket_fd", fd) && (ServerInstance->SE->GetRef(*fd) == isock))
if (user->GetExt("ident_socket_fd", fd))
{
user->Shrink("ident_socket_fd");
delete fd;
isock->Close();
if (ServerInstance->SE->GetRef(*fd) == isock)
isock->Close();
/* Check again, isock->Close() can confuse us */
if (user->GetExt("ident_socket_fd", fd))
{
user->Shrink("ident_socket_fd");
delete fd;
}
}
}
}
}
virtual void OnUserDisconnect(userrec *user)
{
IdentRequestSocket *isock;
if (user->GetExt("ident_socket", isock))
{
int *fd;
if (user->GetExt("ident_socket_fd", fd) && (ServerInstance->SE->GetRef(*fd) == isock))
if (user->GetExt("ident_socket_fd", fd))
{
user->Shrink("ident_socket_fd");
delete fd;
isock->Close();
if (ServerInstance->SE->GetRef(*fd) == isock)
isock->Close();
/* Check again, isock->Close() can confuse us */
if (user->GetExt("ident_socket_fd", fd))
{
user->Shrink("ident_socket_fd");
delete fd;
}
}
}
}