diff options
| author | 2006-07-14 11:17:42 +0000 | |
|---|---|---|
| committer | 2006-07-14 11:17:42 +0000 | |
| commit | 44a631e265c968594b101e324f74a6dbcb787f07 (patch) | |
| tree | 9b0234cb9f5c744ef61e515b5793a1bd6621b35d /src/dnsqueue.cpp | |
| parent | Might as well make this message match, for completeness (diff) | |
Fix sometimes-leaking dns sockets when user quits between the two lookups (forward and reverse)
git-svn-id: http://svn.inspircd.org/repository/branches/1_0_stable@4382 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/dnsqueue.cpp')
| -rw-r--r-- | src/dnsqueue.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/dnsqueue.cpp b/src/dnsqueue.cpp index 285c556fe..1617a3843 100644 --- a/src/dnsqueue.cpp +++ b/src/dnsqueue.cpp @@ -95,6 +95,9 @@ public: } strlcpy(u,nick.c_str(),NICKMAX-1); +#ifndef THREADED_DNS + usr->dns_fd = resolver1.GetFD(); +#endif /* ASSOCIATE WITH DNS LOOKUP LIST */ if (resolver1.GetFD() != -1) { @@ -140,6 +143,9 @@ public: WriteServ(usr->fd,"NOTICE Auth :*** Found your hostname"); } usr->dns_done = true; +#ifndef THREADED_DNS + usr->dns_fd = -1; +#endif return true; } } @@ -150,6 +156,9 @@ public: if (usr) { usr->dns_done = true; +#ifndef THREADED_DNS + usr->dns_fd = -1; +#endif } return true; } @@ -182,11 +191,16 @@ public: return true; } } - if (hostname != "") + if ((hostname != "") && (usr)) { resolver2.ForwardLookup(hostname); if (resolver2.GetFD() != -1) + { dnslist[resolver2.GetFD()] = this; +#ifndef THREADED_DNS + usr->dns_fd = resolver2.GetFD(); +#endif + } } } } |
