diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-07-20 18:02:09 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-07-20 18:02:09 +0000 |
commit | 6bfae0cd735052b91151f8ffc56808d090683483 (patch) | |
tree | b89b421bd263613c9c63e7d9dbf5671f703be591 /src/dnsqueue.cpp | |
parent | 3a7023f2c595d14778b3f1f7e53d3914698dd500 (diff) |
Fixed, no longer a memory leak (Thread leak)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4465 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/dnsqueue.cpp')
-rw-r--r-- | src/dnsqueue.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/dnsqueue.cpp b/src/dnsqueue.cpp index 35dc1bba1..fb0e0bd75 100644 --- a/src/dnsqueue.cpp +++ b/src/dnsqueue.cpp @@ -39,6 +39,7 @@ class Lookup; Lookup* dnslist[MAX_DESCRIPTORS]; Lookup* user_fd_to_dns[MAX_DESCRIPTORS]; +extern userrec* fd_ref_table[MAX_DESCRIPTORS]; //enum LookupState { reverse, forward }; @@ -239,7 +240,19 @@ bool lookup_dns(const std::string &nick) void ZapThisDns(int fd) { -#ifndef THREADED_DNS +#ifdef THREADED_DNS +/* if (fd_ref_table[fd]) + { + if (fd_ref_table[fd]->registered >= 3) + { + log(DEBUG,"Joining thread for user %d",fd); + if (pthread_join(fd_ref_table[fd]->dnsthread, NULL)) + { + log(DEBUG,"Can't pthread_join(): %s", strerror(errno)); + } + } + }*/ +#else if ((fd < 0) || (fd > MAX_DESCRIPTORS)) return; |