summaryrefslogtreecommitdiff
path: root/protocols
diff options
context:
space:
mode:
authorPhil Mesnier <mesnier_p@ociweb.com>2005-04-10 02:10:13 +0000
committerPhil Mesnier <mesnier_p@ociweb.com>2005-04-10 02:10:13 +0000
commitfdf30e5d0d7fbb7bd3889131206fa23db51b0ce4 (patch)
tree474a4010167e176b1f0c3cbde93b84e660bf15ae /protocols
parent54a9f369c9ca98a774954f50c6cb07f1ec585fe6 (diff)
downloadATCD-fdf30e5d0d7fbb7bd3889131206fa23db51b0ce4.tar.gz
Sat Apr 9 21:05:23 2005 Phil Mesnier <mesnier_p@ociweb.com>
Diffstat (limited to 'protocols')
-rw-r--r--protocols/ace/HTBP/HTBP_Inside_Squid_Filter.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/protocols/ace/HTBP/HTBP_Inside_Squid_Filter.cpp b/protocols/ace/HTBP/HTBP_Inside_Squid_Filter.cpp
index b936cd8e580..4a75ac6ffc6 100644
--- a/protocols/ace/HTBP/HTBP_Inside_Squid_Filter.cpp
+++ b/protocols/ace/HTBP/HTBP_Inside_Squid_Filter.cpp
@@ -48,8 +48,13 @@ ACE::HTBP::Inside_Squid_Filter::make_request_header (ACE::HTBP::Channel *ch,
tempId = ch->request_count();
while (tempId /= 10) rid_size++;
- if (session->peer_addr().get_host_name(remote_host,
- sizeof remote_host) == -1)
+ // This test was originally get_host_name() == -1, but this is
+ // problematic if the address doesn't resolve to a name. I think
+ // that it should be configurable, or maybe the hostname needs to
+ // be carried independent of the address to work with hosts that may
+ // have dynamic IP addresses. For now that isn't a problem.
+ if (session->peer_addr().get_host_addr(remote_host,
+ sizeof remote_host) == 0)
ACE_ERROR_RETURN ((LM_ERROR,
ACE_TEXT("HTBP::Inside_Squid_Filter:could not get ")
ACE_TEXT("peer_addr hostname\n")),