--------------------- PatchSet 1248 Date: 2001/01/10 10:03:10 Author: rbcollins Branch: auth_digest Tag: (none) Log: change %d pointer debug statements to %p. Remove // comments Members: lib/rfc2617.c:1.1.2.3->1.1.2.4 src/authenticate.c:1.1.1.3.12.17.2.11.2.17->1.1.1.3.12.17.2.11.2.18 Index: squid/lib/rfc2617.c =================================================================== RCS file: /cvsroot/squid-sf//squid/lib/rfc2617.c,v retrieving revision 1.1.2.3 retrieving revision 1.1.2.4 diff -u -r1.1.2.3 -r1.1.2.4 --- squid/lib/rfc2617.c 18 Dec 2000 10:02:46 -0000 1.1.2.3 +++ squid/lib/rfc2617.c 10 Jan 2001 10:03:10 -0000 1.1.2.4 @@ -51,7 +51,6 @@ ) { MD5_CTX Md5Ctx; -// HASH HA1; if (pszUserName) { @@ -93,7 +92,8 @@ HASH RespHash; HASHHEX HA2Hex; - // calculate H(A2) + /* calculate H(A2) + */ MD5Init(&Md5Ctx); MD5Update(&Md5Ctx, pszMethod, strlen(pszMethod)); MD5Update(&Md5Ctx, ":", 1); @@ -105,7 +105,8 @@ MD5Final(HA2, &Md5Ctx); CvtHex(HA2, HA2Hex); - // calculate response + /* calculate response + */ MD5Init(&Md5Ctx); MD5Update(&Md5Ctx, HA1, HASHHEXLEN); MD5Update(&Md5Ctx, ":", 1); Index: squid/src/authenticate.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/authenticate.c,v retrieving revision 1.1.1.3.12.17.2.11.2.17 retrieving revision 1.1.1.3.12.17.2.11.2.18 diff -u -r1.1.1.3.12.17.2.11.2.17 -r1.1.1.3.12.17.2.11.2.18 --- squid/src/authenticate.c 9 Jan 2001 14:48:40 -0000 1.1.1.3.12.17.2.11.2.17 +++ squid/src/authenticate.c 10 Jan 2001 10:03:10 -0000 1.1.1.3.12.17.2.11.2.18 @@ -1,6 +1,6 @@ /* - * $Id: authenticate.c,v 1.1.1.3.12.17.2.11.2.17 2001/01/09 14:48:40 rbcollins Exp $ + * $Id: authenticate.c,v 1.1.1.3.12.17.2.11.2.18 2001/01/10 10:03:10 rbcollins Exp $ * * DEBUG: section 29 Authenticator * AUTHOR: Duane Wessels @@ -122,7 +122,7 @@ { assert(auth_user_request); assert(handler); - debug(29, 9) ("authenticateStart: auth_user_request '%d'\n", auth_user_request); + debug(29, 9) ("authenticateStart: auth_user_request '%p'\n", auth_user_request); if (auth_user_request->auth_user->auth_module > 0) authscheme_list[auth_user_request->auth_user->auth_module - 1].authStart(auth_user_request, handler, data); else @@ -137,7 +137,7 @@ int authenticateValidateUser(auth_user_request_t * auth_user_request) { - debug(29, 9) ("authenticateValidateUser: Validating Auth_user request '%d'.\n", auth_user_request); + debug(29, 9) ("authenticateValidateUser: Validating Auth_user request '%p'.\n", auth_user_request); if (auth_user_request == NULL) { debug(29, 4) ("authenticateValidateUser: Auth_user_request was NULL!\n"); return 0; @@ -147,11 +147,11 @@ return 0; } if (auth_user_request->auth_user->auth_type == AUTH_UNKNOWN) { - debug(29, 4) ("authenticateValidateUser: Auth_user '%d' uses unknown scheme.\n", auth_user_request->auth_user); + debug(29, 4) ("authenticateValidateUser: Auth_user '%p' uses unknown scheme.\n", auth_user_request->auth_user); return 0; } if (auth_user_request->auth_user->auth_type == AUTH_BROKEN) { - debug(29, 4) ("authenticateValidateUser: Auth_user '%d' is broken for it's scheme.\n", auth_user_request->auth_user); + debug(29, 4) ("authenticateValidateUser: Auth_user '%p' is broken for it's scheme.\n", auth_user_request->auth_user); return 0; } /* any other sanity checks that we need in the future */ @@ -159,7 +159,7 @@ /* Thus should a module call to something like authValidate */ /* finally return ok */ - debug(29, 4) ("authenticateValidateUser: Validated Auth_user request '%d'.\n", auth_user_request); + debug(29, 4) ("authenticateValidateUser: Validated Auth_user request '%p'.\n", auth_user_request); return 1; } @@ -195,7 +195,7 @@ authenticateAuthUserRequestFree(auth_user_request_t * auth_user_request) { dlink_node *link; - debug(29, 5) ("authenticateAuthUserRequestFree: freeing request %d\n", auth_user_request); + debug(29, 5) ("authenticateAuthUserRequestFree: freeing request %p\n", auth_user_request); if (!auth_user_request) return; assert(auth_user_request->references == 0); @@ -425,7 +425,7 @@ /* some other HTTP status */ break; } - debug(29, 9) ("authenticateFixHeader: headertype:%d authuser:%d\n", type, auth_user_request); + debug(29, 9) ("authenticateFixHeader: headertype:%d authuser:%p\n", type, auth_user_request); if ((rep->sline.status == HTTP_PROXY_AUTHENTICATION_REQUIRED) || (rep->sline.status == HTTP_UNAUTHORIZED)) /* this is a authenticate-needed response */ @@ -463,23 +463,23 @@ void authenticateAuthUserLock(auth_user_t * auth_user) { - debug(29, 9) ("authenticateAuthUserLock auth_user '%d'.\n", auth_user); + debug(29, 9) ("authenticateAuthUserLock auth_user '%p'.\n", auth_user); assert(auth_user != NULL); auth_user->references++; - debug(29, 9) ("authenticateAuthUserLock auth_user '%d' now at '%d'.\n", auth_user, auth_user->references); + debug(29, 9) ("authenticateAuthUserLock auth_user '%p' now at '%d'.\n", auth_user, auth_user->references); } void authenticateAuthUserUnlock(auth_user_t * auth_user) { - debug(29, 9) ("authenticateAuthUserUnlock auth_user '%d'.\n", auth_user); + debug(29, 9) ("authenticateAuthUserUnlock auth_user '%p'.\n", auth_user); assert(auth_user != NULL); if (auth_user->references > 0) { auth_user->references--; } else { - debug(29, 1) ("Attempt to lower Auth User %d refcount below 0!\n", auth_user); + debug(29, 1) ("Attempt to lower Auth User %p refcount below 0!\n", auth_user); } - debug(29, 9) ("authenticateAuthUserUnlock auth_user '%d' now at '%d'.\n", auth_user, auth_user->references); + debug(29, 9) ("authenticateAuthUserUnlock auth_user '%p' now at '%d'.\n", auth_user, auth_user->references); if (auth_user->references == 0) authenticateFreeProxyAuthUser(auth_user); } @@ -487,23 +487,23 @@ void authenticateAuthUserRequestLock(auth_user_request_t * auth_user_request) { - debug(29, 9) ("authenticateAuthUserRequestLock auth_user request '%d'.\n", auth_user_request); + debug(29, 9) ("authenticateAuthUserRequestLock auth_user request '%p'.\n", auth_user_request); assert(auth_user_request != NULL); auth_user_request->references++; - debug(29, 9) ("authenticateAuthUserRequestLock auth_user request '%d' now at '%d'.\n", auth_user_request, auth_user_request->references); + debug(29, 9) ("authenticateAuthUserRequestLock auth_user request '%p' now at '%d'.\n", auth_user_request, auth_user_request->references); } void authenticateAuthUserRequestUnlock(auth_user_request_t * auth_user_request) { - debug(29, 9) ("authenticateAuthUserRequestUnlock auth_user request '%d'.\n", auth_user_request); + debug(29, 9) ("authenticateAuthUserRequestUnlock auth_user request '%p'.\n", auth_user_request); assert(auth_user_request != NULL); if (auth_user_request->references > 0) { auth_user_request->references--; } else { - debug(29, 1) ("Attempt to lower Auth User request %d refcount below 0!\n", auth_user_request); + debug(29, 1) ("Attempt to lower Auth User request %p refcount below 0!\n", auth_user_request); } - debug(29, 9) ("authenticateAuthUserRequestUnlock auth_user_request '%d' now at '%d'.\n", auth_user_request, auth_user_request->references); + debug(29, 9) ("authenticateAuthUserRequestUnlock auth_user_request '%p' now at '%d'.\n", auth_user_request, auth_user_request->references); if (auth_user_request->references == 0) { /* not locked anymore */ authenticateAuthUserRequestFree(auth_user_request); @@ -529,7 +529,7 @@ auth_user_request_t *auth_user_request; /* XXX combine two authuser structs. Incomplete: it should merge in hash references * too and ask the module to merge in scheme data */ - debug(29, 5) ("authenticateAuthUserMerge auth_user '%d' into auth_user '%d'.\n", from, to); + debug(29, 5) ("authenticateAuthUserMerge auth_user '%p' into auth_user '%p'.\n", from, to); link = from->requests.head; while (link) { auth_user_request = link->data; @@ -554,12 +554,12 @@ #endif dlink_node *link, *tmplink; assert(data != NULL); - debug(29, 5) ("authenticateFreeProxyAuthUser: Freeing auth_user '%d' with refcount '%d'.\n", u, u->references); + debug(29, 5) ("authenticateFreeProxyAuthUser: Freeing auth_user '%p' with refcount '%d'.\n", u, u->references); assert(u->references == 0); /* were they linked in by username ? */ if (u->usernamehash) { assert(u->usernamehash->auth_user == u); - debug(29, 5) ("authenticateFreeProxyAuthUser: removing usernamehash entry '%d'\n", u->usernamehash); + debug(29, 5) ("authenticateFreeProxyAuthUser: removing usernamehash entry '%p'\n", u->usernamehash); hash_remove_link(proxy_auth_username_cache, (hash_link *) u->usernamehash); /* don't free the key as we use the same user string as the auth_user @@ -570,7 +570,7 @@ /* were they linked in by one or more proxy-authenticate headers */ link = u->proxy_auth_list.head; while (link) { - debug(29, 6) ("authenticateFreeProxyAuthUser: removing proxy_auth hash entry '%d'\n", link->data); + debug(29, 6) ("authenticateFreeProxyAuthUser: removing proxy_auth hash entry '%p'\n", link->data); proxy_auth_hash = link->data; tmplink = link; link = link->next; @@ -584,7 +584,7 @@ /* remove any outstanding requests */ link = u->requests.head; while (link) { - debug(29, 5) ("authenticateFreeProxyAuthUser: removing request entry '%d'\n", link->data); + debug(29, 5) ("authenticateFreeProxyAuthUser: removing request entry '%p'\n", link->data); auth_user_request = link->data; tmplink = link; link = link->next;