From: Amos Jeffries Date: Sun, 23 May 2010 12:40:04 +0000 (+1200) Subject: Remove some cruft before audit X-Git-Tag: SQUID_3_2_0_1~167^2~5 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ce8876d2578708a31966a77b488b01d489de17df;p=thirdparty%2Fsquid.git Remove some cruft before audit --- diff --git a/src/auth/Scheme.cc b/src/auth/Scheme.cc index 0f695d3aa7..b476636c18 100644 --- a/src/auth/Scheme.cc +++ b/src/auth/Scheme.cc @@ -64,14 +64,6 @@ AuthScheme::Find(const char *typestr) return AuthScheme::Pointer(NULL); } -#if 0 // with ref-counting we never have a constant version of *::Pointer -Vector const & -AuthScheme::Schemes() -{ - return GetSchemes(); -} -#endif - Vector & AuthScheme::GetSchemes() { @@ -91,6 +83,8 @@ AuthScheme::GetSchemes() void AuthScheme::FreeAll() { +// assert(shutting_down); + while (GetSchemes().size()) { AuthScheme::Pointer scheme = GetSchemes().back(); GetSchemes().pop_back(); diff --git a/src/auth/basic/auth_basic.cc b/src/auth/basic/auth_basic.cc index 958be1995e..135c1c2157 100644 --- a/src/auth/basic/auth_basic.cc +++ b/src/auth/basic/auth_basic.cc @@ -434,34 +434,6 @@ BasicUser::makeLoggingInstance(AuthUserRequest::Pointer auth_user_request) } } -#if 0 -/* TODO: instead of duplicating into the cache why not just add a ::Pointer to ourselves there? */ -AuthUser::Pointer -BasicUser::makeCachedFrom() -{ - /* the user doesn't exist in the username cache yet */ - debugs(29, 9, HERE << "Creating new user '" << username() << "'"); - BasicUser *basic_user = new BasicUser(config); - /* save the credentials */ - basic_user->username(username()); - username(NULL); - basic_user->passwd = passwd; - passwd = NULL; - /* set the auth_user type */ - basic_user->auth_type = AUTH_BASIC; - /* current time for timeouts */ - basic_user->expiretime = current_time.tv_sec; - - /* this basic_user struct is the 'lucky one' to get added to the username cache */ - /* the requests after this link to the basic_user */ - /* store user in hash */ - basic_user->addToNameCache(); - - AuthUser::Pointer auth_user = dynamic_cast(basic_user); - return auth_user; -} -#endif - void BasicUser::updateCached(BasicUser *from) {