--------------------- PatchSet 2738 Date: 2001/08/10 14:39:03 Author: rbcollins Branch: ntlm Tag: (none) Log: minor tidyups Members: src/auth/ntlm/auth_ntlm.c:1.1.10.14.2.35->1.1.10.14.2.36 Index: squid/src/auth/ntlm/auth_ntlm.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/auth/ntlm/auth_ntlm.c,v retrieving revision 1.1.10.14.2.35 retrieving revision 1.1.10.14.2.36 diff -u -r1.1.10.14.2.35 -r1.1.10.14.2.36 --- squid/src/auth/ntlm/auth_ntlm.c 2 Aug 2001 14:27:53 -0000 1.1.10.14.2.35 +++ squid/src/auth/ntlm/auth_ntlm.c 10 Aug 2001 14:39:03 -0000 1.1.10.14.2.36 @@ -375,6 +375,8 @@ xfree(ntlm_request->authchallenge); if (ntlm_request->ntlmauthenticate) xfree(ntlm_request->ntlmauthenticate); + if (ntlm_request->authserver != NULL && ntlm_request->authserver_deferred) + authenticateNTLMReleaseServer(conn->auth_user_request); memPoolFree(ntlm_request_pool, ntlm_request); } @@ -580,7 +582,6 @@ /* first the standard KK stuff */ auth_user->flags.credentials_ok = 2; /* Login/Usercode failed */ debug(29, 4) ("authenticateNTLMHandleReply: Error validating user via NTLM. Error returned '%s'\n", reply); - ntlm_request->auth_state = AUTHENTICATE_STATE_NONE; if ((t = strchr(reply, ' '))) /* strip after a space */ *t = '\0'; /* now we mark the helper for resetting. */ @@ -726,8 +727,7 @@ helperStatefulReleaseServer(server); /* Get another deferrable server */ server = helperStatefulDefer(ntlmauthenticators); - if (server != NULL) - helperstate = helperStatefulServerGetData(server); + helperstate = server ? helperStatefulServerGetData(server) : NULL; } if (server == NULL) debug(29, 9) ("unable to get a deferred ntlm helper... all helpers are refreshing challenges. Queuing as a placeholder request.\n"); @@ -1010,6 +1010,7 @@ } else { debug(29, 4) ("authenticateNTLMAuthenticateUser: ntlm proxy-auth cache hit\n"); /* throw away the temporary entry */ + ntlm_request->authserver_deferred = 0; authenticateNTLMReleaseServer(auth_user_request); authenticateAuthUserMerge(auth_user, proxy_auth_hash->auth_user); auth_user = proxy_auth_hash->auth_user; @@ -1029,7 +1030,7 @@ return; break; case AUTHENTICATE_STATE_RESPONSE: - /* auth-challenge pair cache miss. We've just got the response */ + /* auth-challenge pair cache miss. We've just got the response from the helper */ /*add to cache and let them through */ ntlm_request->auth_state = AUTHENTICATE_STATE_DONE; /* this connection is authenticated */