summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-08-09 21:50:16 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-08-09 21:50:16 +0000
commiteb28eaea35d9d109a0b7b890de9d957d562da675 (patch)
treee9df50a9db5227531a92d40aec83bbc611f127b0
parent3020afbbedca81d14bc098e45b02c27a14625a1c (diff)
Passing invalid instance to dns isnt a good idea
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4825 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--src/dns.cpp2
-rw-r--r--src/users.cpp6
2 files changed, 5 insertions, 3 deletions
diff --git a/src/dns.cpp b/src/dns.cpp
index 882aee1a7..9bc81e453 100644
--- a/src/dns.cpp
+++ b/src/dns.cpp
@@ -835,7 +835,7 @@ DNS::~DNS()
/* High level abstraction of dns used by application at large */
Resolver::Resolver(InspIRCd* Instance, const std::string &source, QueryType qt) : ServerInstance(Instance), input(source), querytype(qt)
{
- log(DEBUG,"Instance: %08x %08x %08x",Instance, ServerInstance, ServerInstance->Res);
+ log(DEBUG,"Instance: %08x %08x",Instance, ServerInstance);
insp_inaddr binip;
diff --git a/src/users.cpp b/src/users.cpp
index 4dccb07f0..7fcda61a9 100644
--- a/src/users.cpp
+++ b/src/users.cpp
@@ -132,7 +132,8 @@ void userrec::StartDNSLookup()
log(DEBUG,"Commencing reverse lookup");
try
{
- res_reverse = new UserResolver(ServerInstance, this, this->GetIPString(), false);
+ log(DEBUG,"Passing instance: %08x",this->ServerInstance);
+ res_reverse = new UserResolver(this->ServerInstance, this, this->GetIPString(), false);
MyServer->AddResolver(res_reverse);
}
catch (ModuleException& e)
@@ -142,7 +143,7 @@ void userrec::StartDNSLookup()
}
UserResolver::UserResolver(InspIRCd* Instance, userrec* user, std::string to_resolve, bool forward) :
- Resolver(ServerInstance, to_resolve, forward ? DNS_QUERY_FORWARD : DNS_QUERY_REVERSE), bound_user(user)
+ Resolver(Instance, to_resolve, forward ? DNS_QUERY_FORWARD : DNS_QUERY_REVERSE), bound_user(user)
{
this->fwd = forward;
this->bound_fd = user->fd;
@@ -256,6 +257,7 @@ const char* userrec::FormatModes()
userrec::userrec(InspIRCd* Instance) : ServerInstance(Instance)
{
+ log(DEBUG,"userrec::userrec(): Instance: %08x",ServerInstance);
// the PROPER way to do it, AVOID bzero at *ALL* costs
*password = *nick = *ident = *host = *dhost = *fullname = *awaymsg = *oper = 0;
server = (char*)Instance->FindServerNamePtr(Instance->Config->ServerName);