aboutsummaryrefslogtreecommitdiffstats
path: root/src/user_resolver.cpp
diff options
context:
space:
mode:
authorGravatar Daniel De Graaf2010-04-26 14:50:54 -0500
committerGravatar Daniel De Graaf2010-08-03 17:32:43 -0400
commit563afd411844e6bda2c48b26ae413b93480ebcfc (patch)
tree7f7f4d1cc5f309b027dd2aeb1b318008cf9f558c /src/user_resolver.cpp
parentChange DNS binding to avoid BindSocket which could use the wrong address family (diff)
Add debug output of UserResolver results
Diffstat (limited to 'src/user_resolver.cpp')
-rw-r--r--src/user_resolver.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/user_resolver.cpp b/src/user_resolver.cpp
index d230de1a9..9268f3938 100644
--- a/src/user_resolver.cpp
+++ b/src/user_resolver.cpp
@@ -22,9 +22,17 @@ void UserResolver::OnLookupComplete(const std::string &result, unsigned int ttl,
{
UserResolver *res_forward; // for forward-resolution
LocalUser* bound_user = (LocalUser*)ServerInstance->FindUUID(uuid);
+ if (!bound_user)
+ {
+ ServerInstance->Logs->Log("RESOLVER", DEBUG, "Resolution finished for user '%s' who is gone", uuid.c_str());
+ return;
+ }
+
+ ServerInstance->Logs->Log("RESOLVER", DEBUG, "DNS result for %s: '%s' -> '%s'", uuid.c_str(), input.c_str(), result.c_str());
- if ((!this->fwd) && bound_user)
+ if (!fwd)
{
+ // first half of resolution is done. We now need to verify that the host matches.
bound_user->stored_host = result;
try
{
@@ -50,7 +58,7 @@ void UserResolver::OnLookupComplete(const std::string &result, unsigned int ttl,
ServerInstance->Logs->Log("RESOLVER", DEBUG,"Error in resolver: %s",e.GetReason());
}
}
- else if ((this->fwd) && bound_user)
+ else
{
/* Both lookups completed */