From: rousskov <> Date: Wed, 13 Feb 2008 06:17:50 +0000 (+0000) Subject: Merging async-call branch changes to HEAD: X-Git-Tag: BASIC_TPROXY4~107 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=486bf0fb25cc58c8247aab8b8ed21328af7cc251;p=thirdparty%2Fsquid.git Merging async-call branch changes to HEAD: ConnStateData used a RefCount pointer (the openReference) to keep itself alive which is not compatible with the cbdata used by CommCalls. This change makes the ConnStateData class non RefCountable and uses cbdata instead. --- diff --git a/src/auth/basic/auth_basic.cc b/src/auth/basic/auth_basic.cc index 3e6f655908..4c46ab470c 100644 --- a/src/auth/basic/auth_basic.cc +++ b/src/auth/basic/auth_basic.cc @@ -1,5 +1,5 @@ /* - * $Id: auth_basic.cc,v 1.52 2007/08/03 02:11:17 amosjeffries Exp $ + * $Id: auth_basic.cc,v 1.53 2008/02/12 23:17:50 rousskov Exp $ * * DEBUG: section 29 Authenticator * AUTHOR: Duane Wessels @@ -154,7 +154,7 @@ AuthBasicUserRequest::authenticated() const /* log a basic user in */ void -AuthBasicUserRequest::authenticate(HttpRequest * request, ConnStateData::Pointer conn, http_hdr_type type) +AuthBasicUserRequest::authenticate(HttpRequest * request, ConnStateData * conn, http_hdr_type type) { assert(user() != NULL); diff --git a/src/auth/basic/auth_basic.h b/src/auth/basic/auth_basic.h index 7200e4f2b2..6d1951a419 100644 --- a/src/auth/basic/auth_basic.h +++ b/src/auth/basic/auth_basic.h @@ -95,7 +95,7 @@ public: virtual ~AuthBasicUserRequest(); virtual int authenticated() const; - virtual void authenticate(HttpRequest * request, ConnStateData::Pointer conn, http_hdr_type type); + virtual void authenticate(HttpRequest * request, ConnStateData *conn, http_hdr_type type); virtual int module_direction(); virtual void module_start(RH *, void *); virtual AuthUser *user() {return _theUser;} diff --git a/src/auth/digest/auth_digest.cc b/src/auth/digest/auth_digest.cc index 09742bfa94..367109612e 100644 --- a/src/auth/digest/auth_digest.cc +++ b/src/auth/digest/auth_digest.cc @@ -1,5 +1,5 @@ /* - * $Id: auth_digest.cc,v 1.62 2008/01/20 08:54:30 amosjeffries Exp $ + * $Id: auth_digest.cc,v 1.63 2008/02/12 23:17:51 rousskov Exp $ * * DEBUG: section 29 Authenticator * AUTHOR: Robert Collins @@ -573,7 +573,7 @@ AuthDigestUserRequest::authenticated() const /* log a digest user in */ void -AuthDigestUserRequest::authenticate(HttpRequest * request, ConnStateData::Pointer conn, http_hdr_type type) +AuthDigestUserRequest::authenticate(HttpRequest * request, ConnStateData * conn, http_hdr_type type) { auth_user_t *auth_user; AuthDigestUserRequest *digest_request; diff --git a/src/auth/digest/auth_digest.h b/src/auth/digest/auth_digest.h index 72178a6490..fb1c43890c 100644 --- a/src/auth/digest/auth_digest.h +++ b/src/auth/digest/auth_digest.h @@ -61,7 +61,7 @@ public: virtual ~AuthDigestUserRequest(); virtual int authenticated() const; - virtual void authenticate(HttpRequest * request, ConnStateData::Pointer conn, http_hdr_type type); + virtual void authenticate(HttpRequest * request, ConnStateData * conn, http_hdr_type type); virtual int module_direction(); virtual void addHeader(HttpReply * rep, int accel); #if WAITING_FOR_TE diff --git a/src/auth/negotiate/auth_negotiate.cc b/src/auth/negotiate/auth_negotiate.cc index 0f7431c571..9da34662cc 100644 --- a/src/auth/negotiate/auth_negotiate.cc +++ b/src/auth/negotiate/auth_negotiate.cc @@ -1,5 +1,5 @@ /* - * $Id: auth_negotiate.cc,v 1.28 2007/12/14 23:11:51 amosjeffries Exp $ + * $Id: auth_negotiate.cc,v 1.29 2008/02/12 23:17:52 rousskov Exp $ * * DEBUG: section 29 Negotiate Authenticator * AUTHOR: Robert Collins, Henrik Nordstrom, Francesco Chemolli @@ -660,7 +660,7 @@ AuthNegotiateUserRequest::authenticated() const } void -AuthNegotiateUserRequest::authenticate(HttpRequest * request, ConnStateData::Pointer conn, http_hdr_type type) +AuthNegotiateUserRequest::authenticate(HttpRequest * request, ConnStateData * conn, http_hdr_type type) { const char *proxy_auth, *blob; @@ -677,7 +677,7 @@ AuthNegotiateUserRequest::authenticate(HttpRequest * request, ConnStateData::Poi /* Check that we are in the client side, where we can generate * auth challenges */ - if (conn.getRaw() == NULL) { + if (conn == NULL) { auth_state = AUTHENTICATE_STATE_FAILED; debugs(29, 1, "AuthNegotiateUserRequest::authenticate: attempt to perform authentication without a connection!"); return; @@ -769,7 +769,7 @@ AuthNegotiateUserRequest::authenticate(HttpRequest * request, ConnStateData::Poi } AuthNegotiateUserRequest::AuthNegotiateUserRequest() : - conn(NULL), auth_state(AUTHENTICATE_STATE_NONE), + /*conn(NULL),*/ auth_state(AUTHENTICATE_STATE_NONE), _theUser(NULL) { waiting=0; diff --git a/src/auth/negotiate/auth_negotiate.h b/src/auth/negotiate/auth_negotiate.h index e8b2939420..d2fac2404f 100644 --- a/src/auth/negotiate/auth_negotiate.h +++ b/src/auth/negotiate/auth_negotiate.h @@ -59,7 +59,7 @@ public: AuthNegotiateUserRequest(); virtual ~AuthNegotiateUserRequest(); virtual int authenticated() const; - virtual void authenticate(HttpRequest * request, ConnStateData::Pointer conn, http_hdr_type type); + virtual void authenticate(HttpRequest * request, ConnStateData * conn, http_hdr_type type); virtual int module_direction(); virtual void onConnectionClose(ConnStateData *); virtual void module_start(RH *, void *); @@ -76,7 +76,7 @@ public: /*we need to store the helper server between requests */ helper_stateful_server *authserver; /* what connection is this associated with */ - ConnStateData::Pointer conn; + /* ConnStateData * conn;*/ /* how far through the authentication process are we? */ auth_state_t auth_state; diff --git a/src/auth/ntlm/auth_ntlm.cc b/src/auth/ntlm/auth_ntlm.cc index 461c760df9..a6a0415f3c 100644 --- a/src/auth/ntlm/auth_ntlm.cc +++ b/src/auth/ntlm/auth_ntlm.cc @@ -1,5 +1,5 @@ /* - * $Id: auth_ntlm.cc,v 1.78 2007/12/14 23:11:51 amosjeffries Exp $ + * $Id: auth_ntlm.cc,v 1.79 2008/02/12 23:17:53 rousskov Exp $ * * DEBUG: section 29 NTLM Authenticator * AUTHOR: Robert Collins, Henrik Nordstrom, Francesco Chemolli @@ -596,7 +596,7 @@ AuthNTLMUserRequest::authenticated() const } void -AuthNTLMUserRequest::authenticate(HttpRequest * request, ConnStateData::Pointer conn, http_hdr_type type) +AuthNTLMUserRequest::authenticate(HttpRequest * request, ConnStateData * conn, http_hdr_type type) { const char *proxy_auth, *blob; @@ -613,7 +613,7 @@ AuthNTLMUserRequest::authenticate(HttpRequest * request, ConnStateData::Pointer /* Check that we are in the client side, where we can generate * auth challenges */ - if (conn.getRaw() == NULL) { + if (conn == NULL || !cbdataReferenceValid(conn)) { auth_state = AUTHENTICATE_STATE_FAILED; debugs(29, 1, "AuthNTLMUserRequest::authenticate: attempt to perform authentication without a connection!"); return; @@ -706,7 +706,7 @@ AuthNTLMUserRequest::authenticate(HttpRequest * request, ConnStateData::Pointer } AuthNTLMUserRequest::AuthNTLMUserRequest() : - conn(NULL), auth_state(AUTHENTICATE_STATE_NONE), + /*conn(NULL),*/ auth_state(AUTHENTICATE_STATE_NONE), _theUser(NULL) { waiting=0; diff --git a/src/auth/ntlm/auth_ntlm.h b/src/auth/ntlm/auth_ntlm.h index 227b2527f2..6d8d2f8b0d 100644 --- a/src/auth/ntlm/auth_ntlm.h +++ b/src/auth/ntlm/auth_ntlm.h @@ -59,7 +59,7 @@ public: AuthNTLMUserRequest(); virtual ~AuthNTLMUserRequest(); virtual int authenticated() const; - virtual void authenticate(HttpRequest * request, ConnStateData::Pointer conn, http_hdr_type type); + virtual void authenticate(HttpRequest * request, ConnStateData * conn, http_hdr_type type); virtual int module_direction(); virtual void onConnectionClose(ConnStateData *); virtual void module_start(RH *, void *); @@ -74,7 +74,7 @@ public: /*we need to store the helper server between requests */ helper_stateful_server *authserver; /* what connection is this associated with */ - ConnStateData::Pointer conn; +// ConnStateData * conn; /* how far through the authentication process are we? */ auth_state_t auth_state;