From 0903fa164b121a1b604ee3f72921c7071d3f18f6 Mon Sep 17 00:00:00 2001 From: Amos Jeffries Date: Wed, 2 Feb 2011 13:28:49 +1300 Subject: [PATCH] Omitted bits from rev11198 --- src/err_type.h | 3 +++ src/redirect.cc | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/err_type.h b/src/err_type.h index fc131b3ce0..e919310c10 100644 --- a/src/err_type.h +++ b/src/err_type.h @@ -52,6 +52,9 @@ typedef enum { /* ICAP Errors */ ERR_ICAP_FAILURE, + /* Squid problem */ + ERR_GATEWAY_FAILURE, + /* Special Cases */ ERR_DIR_LISTING, /* Display of remote directory (FTP, Gopher) */ ERR_SQUID_SIGNATURE, /* not really an error */ diff --git a/src/redirect.cc b/src/redirect.cc index d84e841df9..3ad959631a 100644 --- a/src/redirect.cc +++ b/src/redirect.cc @@ -194,14 +194,14 @@ redirectStart(ClientHttpRequest * http, RH * handler, void *data) clientStreamNode *node = (clientStreamNode *)http->client_stream.tail->prev->data; clientReplyContext *repContext = dynamic_cast(node->data.getRaw()); assert (repContext); - IpAddress tmpnoaddr; + Ip::Address tmpnoaddr; tmpnoaddr.SetNoAddr(); repContext->setReplyToError(ERR_GATEWAY_FAILURE, status, http->request->method, NULL, http->getConn() != NULL ? http->getConn()->peer : tmpnoaddr, http->request, NULL, - http->getConn() != NULL && http->getConn()->auth_user_request ? + http->getConn() != NULL && http->getConn()->auth_user_request != NULL ? http->getConn()->auth_user_request : http->request->auth_user_request); node = (clientStreamNode *)http->client_stream.tail->data; -- 2.47.2