u_char *MsgPtr;
int FakeArg = 1024;
- snmplib_debug(4, "Buffer=%x BufLenP=%x, buflen=%d\n", Buffer, BufLenP,
+ snmplib_debug(4, "Buffer=%p BufLenP=%p, buflen=%d\n", Buffer, BufLenP,
*BufLenP);
/* Header for the entire thing, with a false, large length */
bufp = asn_build_header(Buffer, BufLenP,
/* A nice header for this PDU.
* Encoded with the wrong length. We'll fix it later.
*/
- snmplib_debug(8, "snmp_msg_Encode:Encoding PDU Header at 0x%x (fake len %d) (%d bytes so far)\n",
+ snmplib_debug(8, "snmp_msg_Encode:Encoding PDU Header at 0x%p (fake len %d) (%d bytes so far)\n",
bufp, *BufLenP, *BufLenP);
PDUHeaderPtr = bufp;
bufp = asn_build_header(bufp, BufLenP,
/*
- * $Id: auth_basic.cc,v 1.13 2001/10/17 19:43:40 hno Exp $
+ * $Id: auth_basic.cc,v 1.14 2001/10/24 05:26:12 hno Exp $
*
* DEBUG: section 29 Authenticator
* AUTHOR: Duane Wessels
storeAppendPrintf(entry, "\n%s %s realm %s\n%s %s children %d\n%s %s credentialsttl %d seconds\n",
name, "basic", config->basicAuthRealm,
name, "basic", config->authenticateChildren,
- name, "basic", config->credentialsTTL);
+ name, "basic", (int)config->credentialsTTL);
}
/* store user in hash */
authenticateUserNameCacheAdd(auth_user);
} else {
- debug(29, 9) ("authBasicDecodeAuth: Found user '%s' in the user cache as '%d'\n", local_basic.username, auth_user);
+ debug(29, 9) ("authBasicDecodeAuth: Found user '%s' in the user cache as '%p'\n", local_basic.username, auth_user);
xfree(local_basic.username);
basic_auth = auth_user->scheme_data;
if (strcmp(local_basic.passwd, basic_auth->passwd)) {
/*
- * $Id: auth_digest.cc,v 1.9 2001/10/17 19:43:41 hno Exp $
+ * $Id: auth_digest.cc,v 1.10 2001/10/24 05:26:14 hno Exp $
*
* DEBUG: section 29 Authenticator
* AUTHOR: Robert Collins
/* the cache's link */
authDigestNonceLink(newnonce);
newnonce->flags.incache = 1;
- debug(29, 5) ("authenticateDigestNonceNew: created nonce %0p at %d\n", newnonce, newnonce->noncedata.creationtime);
+ debug(29, 5) ("authenticateDigestNonceNew: created nonce %p at %ld\n", newnonce, (long int)newnonce->noncedata.creationtime);
return newnonce;
}
*/
digest_nonce_h *nonce;
debug(29, 3) ("authenticateDigestNonceCacheCleanup: Cleaning the nonce cache now\n");
- debug(29, 3) ("authenticateDigestNonceCacheCleanup: Current time: %d\n",
- current_time.tv_sec);
+ debug(29, 3) ("authenticateDigestNonceCacheCleanup: Current time: %ld\n",
+ (long int)current_time.tv_sec);
hash_first(digest_nonce_cache);
while ((nonce = ((digest_nonce_h *) hash_next(digest_nonce_cache)))) {
- debug(29, 3) ("authenticateDigestNonceCacheCleanup: nonce entry : '%s'\n", nonce->hash.key);
- debug(29, 4) ("authenticateDigestNonceCacheCleanup: Creation time: %d\n", nonce->noncedata.creationtime);
+ debug(29, 3) ("authenticateDigestNonceCacheCleanup: nonce entry : %p '%s'\n", nonce, (char *)nonce->hash.key);
+ debug(29, 4) ("authenticateDigestNonceCacheCleanup: Creation time: %ld\n", (long int)nonce->noncedata.creationtime);
if (authDigestNonceIsStale(nonce)) {
- debug(29, 4) ("authenticateDigestNonceCacheCleanup: Removing nonce %s from cache due to timeout.\n", nonce->hash.key);
+ debug(29, 4) ("authenticateDigestNonceCacheCleanup: Removing nonce %s from cache due to timeout.\n", (char *)nonce->hash.key);
assert(nonce->flags.incache);
/* invalidate nonce so future requests fail */
nonce->flags.valid = 0;
{
assert(nonce != NULL);
nonce->references++;
- debug(29, 9) ("authDigestNonceLink: nonce '%d' now at '%d'.\n", nonce, nonce->references);
+ debug(29, 9) ("authDigestNonceLink: nonce '%p' now at '%d'.\n", nonce, nonce->references);
}
#if NOT_USED
if (nonce->references > 0) {
nonce->references--;
} else {
- debug(29, 1) ("authDigestNonceUnlink; Attempt to lower nonce %d refcount below 0!\n", nonce);
+ debug(29, 1) ("authDigestNonceUnlink; Attempt to lower nonce %p refcount below 0!\n", nonce);
}
- debug(29, 9) ("authDigestNonceUnlink: nonce '%d' now at '%d'.\n", nonce, nonce->references);
+ debug(29, 9) ("authDigestNonceUnlink: nonce '%p' now at '%d'.\n", nonce, nonce->references);
if (nonce->references == 0)
authenticateDigestNonceDelete(nonce);
}
nonce = hash_lookup(digest_nonce_cache, nonceb64);
if ((nonce == NULL) || (strcmp(nonce->hash.key, nonceb64)))
return NULL;
- debug(29, 9) ("authDigestNonceFindNonce: Found nonce '%d'\n", nonce);
+ debug(29, 9) ("authDigestNonceFindNonce: Found nonce '%p'\n", nonce);
return nonce;
}
return -1;
/* has it's max duration expired? */
if (nonce->noncedata.creationtime + digestConfig->noncemaxduration < current_time.tv_sec) {
- debug(29, 4) ("authDigestNonceIsStale: Nonce is too old. %d %d %d\n", nonce->noncedata.creationtime, digestConfig->noncemaxduration, current_time.tv_sec);
+ debug(29, 4) ("authDigestNonceIsStale: Nonce is too old. %ld %d %ld\n", (long int)nonce->noncedata.creationtime, (int)digestConfig->noncemaxduration, (long int)current_time.tv_sec);
nonce->flags.valid = 0;
return -1;
}
name, "digest", config->digestAuthRealm,
name, "digest", config->authenticateChildren,
name, "digest", config->noncemaxuses,
- name, "digest", config->noncemaxduration,
- name, "digest", config->nonceGCInterval);
+ name, "digest", (int)config->noncemaxduration,
+ name, "digest", (int)config->nonceGCInterval);
}
void
*/
authDigestUserLinkNonce(auth_user, nonce);
} else {
- debug(29, 9) ("authDigestDecodeAuth: Found user '%s' in the user cache as '%d'\n", username, auth_user);
+ debug(29, 9) ("authDigestDecodeAuth: Found user '%s' in the user cache as '%p'\n", username, auth_user);
digest_user = auth_user->scheme_data;
xfree(username);
}
node = dlinkNodeNew();
dlinkAdd(auth_user_request, node, &auth_user->requests);
- debug(29, 9) ("username = '%s'\nrealm = '%s'\nqop = '%s'\nalgorithm = '%s'\nuri = '%s'\nnonce = '%s'\nnc = '%s'\ncnonce = '%s'\nresponse = '%s'\ndigestnonce = '%d'\n",
+ debug(29, 9) ("username = '%s'\nrealm = '%s'\nqop = '%s'\nalgorithm = '%s'\nuri = '%s'\nnonce = '%s'\nnc = '%s'\ncnonce = '%s'\nresponse = '%s'\ndigestnonce = '%p'\n",
digest_user->username, digest_request->realm,
digest_request->qop, digest_request->algorithm,
digest_request->uri, digest_request->nonceb64,
/*
- * $Id: auth_ntlm.cc,v 1.14 2001/10/17 17:09:08 hno Exp $
+ * $Id: auth_ntlm.cc,v 1.15 2001/10/24 05:26:16 hno Exp $
*
* DEBUG: section 29 NTLM Authenticator
* AUTHOR: Robert Collins
storeAppendPrintf(entry, "\n%s %s children %d\n%s %s max_challenge_reuses %d\n%s %s max_challenge_lifetime %d seconds\n",
name, "ntlm", config->authenticateChildren,
name, "ntlm", config->challengeuses,
- name, "ntlm", config->challengelifetime);
+ name, "ntlm", (int)config->challengelifetime);
}
switch (ntlm_request->auth_state) {
case AUTHENTICATE_STATE_NONE: /* no progress at all. */
if (ntlm_request->flags.credentials_ok != 2)
- debug(29, 1) ("authenticateNTLMDirection: called before NTLM Authenticate!. Report a bug to squid-dev. au %x\n", auth_user_request);
+ debug(29, 1) ("authenticateNTLMDirection: called before NTLM Authenticate!. Report a bug to squid-dev. au %p\n", auth_user_request);
return -2;
case AUTHENTICATE_STATE_NEGOTIATE: /* send to helper */
case AUTHENTICATE_STATE_RESPONSE: /*send to helper */
if (ntlm_request->ntlmauthenticate)
xfree(ntlm_request->ntlmauthenticate);
if (ntlm_request->authserver != NULL && ntlm_request->authserver_deferred) {
- debug(29, 9) ("authenticateNTLMRequestFree: releasing server '%d'\n", ntlm_request->authserver);
+ debug(29, 9) ("authenticateNTLMRequestFree: releasing server '%p'\n", ntlm_request->authserver);
helperStatefulReleaseServer(ntlm_request->authserver);
ntlm_request->authserver = NULL;
}
/* were they linked in by one or more proxy-authenticate headers */
link = ntlm_user->proxy_auth_list.head;
while (link) {
- debug(29, 9) ("authenticateFreeProxyAuthUser: removing proxy_auth hash entry '%d'\n", link->data);
+ debug(29, 9) ("authenticateFreeProxyAuthUser: removing proxy_auth hash entry '%p'\n", link->data);
proxy_auth_hash = link->data;
tmplink = link;
link = link->next;
auth_user_t *auth_user;
ntlm_user_t *ntlm_user;
ntlm_request_t *ntlm_request;
- debug(29, 9) ("authenticateNTLMHandleReply: Helper: '%d' {%s}\n", lastserver, reply ? reply : "<NULL>");
+ debug(29, 9) ("authenticateNTLMHandleReply: Helper: '%p' {%s}\n", lastserver, reply ? reply : "<NULL>");
valid = cbdataValid(r->data);
if (!valid) {
- debug(29, 1) ("AuthenticateNTLMHandleReply: invalid callback data. Releasing helper '%d'.\n", lastserver);
+ debug(29, 1) ("AuthenticateNTLMHandleReply: invalid callback data. Releasing helper '%p'.\n", lastserver);
cbdataUnlock(r->data);
authenticateStateFree(r);
debug(29, 9) ("NTLM HandleReply, telling stateful helper : %d\n", S_HELPER_RELEASE);
result = S_HELPER_DEFER;
/* reserve the server for future authentication */
ntlm_request->authserver_deferred = 1;
- debug(29, 9) ("authenticateNTLMHandleReply: helper '%d'\n", lastserver);
+ debug(29, 9) ("authenticateNTLMHandleReply: helper '%p'\n", lastserver);
assert(ntlm_request->auth_state == AUTHENTICATE_STATE_NEGOTIATE);
ntlm_request->authserver = lastserver;
ntlm_request->authchallenge = xstrndup(reply, NTLM_CHALLENGE_SZ + 5);
/* The helper broke on YR. It automatically
* resets */
ntlm_request->flags.credentials_ok = 3; /* cannot process */
- debug(29, 1) ("authenticateNTLMHandleReply: Error obtaining challenge from helper: %d. Error returned '%s'\n", lastserver, reply);
+ debug(29, 1) ("authenticateNTLMHandleReply: Error obtaining challenge from helper: %p. Error returned '%s'\n", lastserver, reply);
/* mark it for starving */
helperstate->starve = 1;
/* resubmit the request. This helper is currently busy, so we will get
return 1;
}
if (helperstate->renewed + ntlmConfig->challengelifetime < squid_curtime) {
- debug(29, 4) ("authenticateNTLMChangeChallenge_p: Challenge exceeded max lifetime by %d seconds\n", squid_curtime - (helperstate->renewed + ntlmConfig->challengelifetime));
+ debug(29, 4) ("authenticateNTLMChangeChallenge_p: Challenge exceeded max lifetime by %d seconds\n", (int) (squid_curtime - (helperstate->renewed + ntlmConfig->challengelifetime)));
return 1;
}
debug(29, 9) ("Challenge is to be reused\n");
case AUTHENTICATE_STATE_RESPONSE:
sent_string = xstrdup(ntlm_request->ntlmauthenticate);
assert(ntlm_request->authserver);
- debug(29, 9) ("authenticateNTLMStart: Asking NTLMauthenticator '%d'.\n", ntlm_request->authserver);
+ debug(29, 9) ("authenticateNTLMStart: Asking NTLMauthenticator '%p'.\n", ntlm_request->authserver);
break;
default:
fatal("Invalid authenticate state for NTLMStart");
ntlm_request->authserver = server;
/* tell the log what helper we have been given */
- debug(29, 9) ("authenticateNTLMStart: helper '%d' assigned\n", server);
+ debug(29, 9) ("authenticateNTLMStart: helper '%p' assigned\n", server);
/* server and valid challenge? */
if ((server == NULL) || !authenticateNTLMValidChallenge(helperstate)) {
/* No server, or server with invalid challenge */
assert(auth_user_request->auth_user->auth_type == AUTH_NTLM);
assert(auth_user_request->scheme_data != NULL);
ntlm_request = auth_user_request->scheme_data;
- debug(29, 9) ("authenticateNTLMReleaseServer: releasing server '%d'\n", ntlm_request->authserver);
+ debug(29, 9) ("authenticateNTLMReleaseServer: releasing server '%p'\n", ntlm_request->authserver);
helperStatefulReleaseServer(ntlm_request->authserver);
ntlm_request->authserver = NULL;
}
/*
- * $Id: aiops.cc,v 1.11 2001/10/17 19:33:06 hno Exp $
+ * $Id: aiops.cc,v 1.12 2001/10/24 05:26:18 hno Exp $
*
* DEBUG: section 43 AIOPS
* AUTHOR: Stewart Forster <slf@connect.com.au>
squid_curtime >= (high_start + 5)) {
debug(43, 1) ("squidaio_queue_request: WARNING - Disk I/O overloading\n");
if (squid_curtime >= (high_start + 15))
- debug(43, 1) ("squidaio_queue_request: Queue Length: current=%d, high=%d, low=%d, duration=%d\n",
- request_queue_len, queue_high, queue_low, squid_curtime - high_start);
+ debug(43, 1) ("squidaio_queue_request: Queue Length: current=%d, high=%d, low=%d, duration=%ld\n",
+ request_queue_len, queue_high, queue_low, (long int) (squid_curtime - high_start));
last_warn = squid_curtime;
}
} else {
/*
- * $Id: store_io_coss.cc,v 1.11 2001/08/12 10:20:41 adrian Exp $
+ * $Id: store_io_coss.cc,v 1.12 2001/10/24 05:26:22 hno Exp $
*
* DEBUG: section 81 Storage Manager COSS Interface
* AUTHOR: Eric Stern
assert(sio->read.callback_data == NULL);
sio->read.callback = callback;
sio->read.callback_data = callback_data;
- debug(81, 3) ("storeCossRead: offset %d\n", offset);
+ debug(81, 3) ("storeCossRead: offset %ld\n", (long int)offset);
sio->offset = offset;
cstate->flags.reading = 1;
if ((offset + size) > sio->st_size)
*/
assert(sio->e->mem_obj->object_sz != -1);
- debug(81, 3) ("storeCossWrite: offset %d, len %d\n", sio->offset, size);
+ debug(81, 3) ("storeCossWrite: offset %ld, len %lu\n", (long int)sio->offset, (unsigned long int)size);
diskoffset = sio->swap_filen + sio->offset;
dest = storeCossMemPointerFromDiskOffset(SD, diskoffset, &membuf);
assert(dest != NULL);
for (m = cs->membufs.head; m; m = m->next) {
t = m->data;
if ((e->swap_filen >= t->diskstart) && (e->swap_filen <= t->diskend)) {
- debug(81, 3) ("storeCossMemBufLock: locking %08X, lockcount %d\n", t, t->lockcount);
+ debug(81, 3) ("storeCossMemBufLock: locking %p, lockcount %d\n", t, t->lockcount);
t->lockcount++;
return;
}
}
- debug(81, 3) ("storeCossMemBufLock: FAILED to lock %08X\n", e);
+ debug(81, 3) ("storeCossMemBufLock: FAILED to lock %p\n", e);
}
static void
t = m->data;
if ((e->swap_filen >= t->diskstart) && (e->swap_filen <= t->diskend)) {
t->lockcount--;
- debug(81, 3) ("storeCossMemBufUnlock: unlocking %08X, lockcount %d\n", t, t->lockcount);
+ debug(81, 3) ("storeCossMemBufUnlock: unlocking %p, lockcount %d\n", t, t->lockcount);
}
if (t->flags.full && !t->flags.writing && !t->lockcount)
storeCossWriteMemBuf(SD, t);
CossMemBuf *t = my_data;
CossInfo *cs = (CossInfo *) t->SD->fsdata;
- debug(81, 3) ("storeCossWriteMemBufDone: buf %08X, len %d\n", t, len);
+ debug(81, 3) ("storeCossWriteMemBufDone: buf %p, len %ld\n", t, (long int)len);
if (errflag)
debug(81, 0) ("storeCossMemBufWriteDone: got failure (%d)\n", errflag);
newmb = cbdataAlloc(CossMemBuf);
newmb->diskstart = start;
debug(81, 3) ("storeCossCreateMemBuf: creating new membuf at %d\n", newmb->diskstart);
- debug(81, 3) ("storeCossCreateMemBuf: at %08X\n", newmb);
+ debug(81, 3) ("storeCossCreateMemBuf: at %p\n", newmb);
newmb->diskend = newmb->diskstart + COSS_MEMBUF_SZ - 1;
newmb->flags.full = 0;
newmb->flags.writing = 0;
/*
- * $Id: store_heap_replacement.cc,v 1.6 2001/02/07 18:56:56 hno Exp $
+ * $Id: store_heap_replacement.cc,v 1.7 2001/10/24 05:26:22 hno Exp $
*
* DEBUG: section 20 Storage Manager Heap-based replacement
* AUTHOR: John Dilley
else
tie = 1.0 - exp((double) (e->lastref - squid_curtime) / 86400.0);
key = age + (double) e->refcount - tie;
- debug(81, 3) ("HeapKeyGen_StoreEntry_LFUDA: %s refcnt=%ld lastref=%ld age=%f tie=%f -> %f\n",
- storeKeyText(e->hash.key), e->refcount, e->lastref, age, tie, key);
+ debug(81, 3) ("HeapKeyGen_StoreEntry_LFUDA: %s refcnt=%d lastref=%ld age=%f tie=%f -> %f\n",
+ storeKeyText(e->hash.key), (int)e->refcount, e->lastref, age, tie, key);
if (e->mem_obj && e->mem_obj->url)
debug(81, 3) ("HeapKeyGen_StoreEntry_LFUDA: url=%s\n",
e->mem_obj->url);
double size = e->swap_file_sz ? (double) e->swap_file_sz : 1.0;
double tie = (e->lastref > 1) ? (1.0 / e->lastref) : 1.0;
key = age + ((double) e->refcount / size) - tie;
- debug(81, 3) ("HeapKeyGen_StoreEntry_GDSF: %s size=%f refcnt=%ld lastref=%ld age=%f tie=%f -> %f\n",
- storeKeyText(e->hash.key), size, e->refcount, e->lastref, age, tie, key);
+ debug(81, 3) ("HeapKeyGen_StoreEntry_GDSF: %s size=%f refcnt=%d lastref=%ld age=%f tie=%f -> %f\n",
+ storeKeyText(e->hash.key), size, (int)e->refcount, e->lastref, age, tie, key);
if (e->mem_obj && e->mem_obj->url)
debug(81, 3) ("HeapKeyGen_StoreEntry_GDSF: url=%s\n",
e->mem_obj->url);