projects
/
apps
/
pfixtools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'with-dns-bl'
[apps/pfixtools.git]
/
common
/
rbl.c
diff --git
a/common/rbl.c
b/common/rbl.c
index
11ed464
..
0ae4979
100644
(file)
--- a/
common/rbl.c
+++ b/
common/rbl.c
@@
-38,13
+38,17
@@
static inline rbl_result_t rbl_dns_check(const char *hostname)
{
static inline rbl_result_t rbl_dns_check(const char *hostname)
{
+ debug("looking up for %s", hostname);
struct hostent *host = gethostbyname(hostname);
if (host != NULL) {
struct hostent *host = gethostbyname(hostname);
if (host != NULL) {
+ debug("host found");
return RBL_FOUND;
} else {
if (h_errno == HOST_NOT_FOUND) {
return RBL_FOUND;
} else {
if (h_errno == HOST_NOT_FOUND) {
+ debug("host not found: %s", hostname);
return RBL_NOTFOUND;
}
return RBL_NOTFOUND;
}
+ debug("dns error: %m");
return RBL_ERROR;
}
}
return RBL_ERROR;
}
}