+ if (usr->registered > 3)
+ {
+ usr->dns_done = true;
+ return true;
+ }
+ if ((hostname != "") && (usr->registered != 7))
+ {
+ if (std::string(usr->ip) == ip)
+ {
+ strlcpy(usr->host,hostname.c_str(),MAXBUF);
+ strlcpy(usr->dhost,hostname.c_str(),MAXBUF);
+ log(DEBUG,"Forward and reverse match, assigning hostname");
+ }
+ else
+ {
+ log(DEBUG,"AWOOGA! Forward lookup doesn't match reverse: R='%s',F='%s',IP='%s'",hostname.c_str(),ip.c_str(),usr->ip);
+ }
+ usr->dns_done = true;
+ return true;
+ }