From: wessels <> Date: Wed, 16 Dec 1998 12:21:37 +0000 (+0000) Subject: its wrong to assert cbdataValid(foo) when 'foo' is the callback data X-Git-Tag: SQUID_3_0_PRE1~2457 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=48c27a0e5a8acbf95a1f5d7f73aceb86f10638be;p=thirdparty%2Fsquid.git its wrong to assert cbdataValid(foo) when 'foo' is the callback data in the callback function itself. --- diff --git a/src/peer_digest.cc b/src/peer_digest.cc index 61daefabc5..016227565f 100644 --- a/src/peer_digest.cc +++ b/src/peer_digest.cc @@ -1,6 +1,6 @@ /* - * $Id: peer_digest.cc,v 1.66 1998/12/16 00:07:20 wessels Exp $ + * $Id: peer_digest.cc,v 1.67 1998/12/16 05:21:37 wessels Exp $ * * DEBUG: section 72 Peer Digest Routines * AUTHOR: Alex Rousskov @@ -126,7 +126,7 @@ peerDigestDestroy(PeerDigest * pd) /* inform peer (if any) that we are gone */ if (cbdataValid(p)) peerNoteDigestGone(p); - cbdataUnlock(p); /* must unlock, valid or not */ + cbdataUnlock(p); /* must unlock, valid or not */ peerDigestClean(pd); cbdataFree(pd); @@ -220,7 +220,10 @@ peerDigestCheck(void *data) PeerDigest *pd = data; time_t req_time; - assert(cbdataValid(pd)); + /* + * you can't assert(cbdataValid(pd)) -- if its not valid this + * function never gets called + */ assert(!pd->flags.requested); pd->times.next_check = 0; /* unknown */