From: robertc <> Date: Tue, 21 Dec 2004 01:28:09 +0000 (+0000) Subject: merge in digest locking fix for helper requests - bug #825 X-Git-Tag: SQUID_3_0_PRE4~972 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8b45a856951e922ad2520df20755b80e2a7a4341;p=thirdparty%2Fsquid.git merge in digest locking fix for helper requests - bug #825 --- diff --git a/src/auth/digest/auth_digest.cc b/src/auth/digest/auth_digest.cc index 532d05a002..cc2e5b7d0a 100644 --- a/src/auth/digest/auth_digest.cc +++ b/src/auth/digest/auth_digest.cc @@ -1,6 +1,6 @@ /* - * $Id: auth_digest.cc,v 1.38 2004/12/20 16:30:40 robertc Exp $ + * $Id: auth_digest.cc,v 1.39 2004/12/20 18:28:09 robertc Exp $ * * DEBUG: section 29 Authenticator * AUTHOR: Robert Collins @@ -841,6 +841,11 @@ authenticateDigestHandleReply(void *data, char *reply) if (cbdataReferenceValidDone(replyData->data, &cbdata)) replyData->handler(cbdata, NULL); + //we know replyData->auth_user_request != NULL, or we'd have asserted + replyData->auth_user_request->unlock(); + + replyData->auth_user_request=NULL; + cbdataFree(replyData); } @@ -1352,7 +1357,11 @@ AuthDigestUserRequest::module_start(RH * handler, void *data) r->handler = handler; r->data = cbdataReference(data); r->auth_user_request = this; - snprintf(buf, 8192, "\"%s\":\"%s\"\n", digest_user->username(), realm); + + lock() + + snprintf(buf, 8192, "\"%s\":\"%s\"\n", digest_user->username(), realm); + helperSubmit(digestauthenticators, buf, authenticateDigestHandleReply, r); }