]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
its wrong to assert cbdataValid(foo) when 'foo' is the callback data
authorwessels <>
Wed, 16 Dec 1998 12:21:37 +0000 (12:21 +0000)
committerwessels <>
Wed, 16 Dec 1998 12:21:37 +0000 (12:21 +0000)
in the callback function itself.

src/peer_digest.cc

index 61daefabc51532e9aa3263f4ff15fb39de506d7e..016227565f24650794539a8ea18fc84068893311 100644 (file)
@@ -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 */