Re: assert(sc->cmp_offset == copy_offset);

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Wed, 8 May 2002 00:09:20 +0200

The bug is quite likely in the caller of storeClinetCopy().

The "new improved" store client in Squid-HEAD expects reads to be
done linearly, with no overlaps or gaps. This property was not fully
enforced earlier.

Eventually copy_offset will go away completely, but for the time
being it is still there to verify that the callers of storeClientCopy
is operating correctly.

Regards
Henrik

On Tuesday 07 May 2002 14:22, Evgen wrote:
> Hi,
> I periodically get assertion
> 2002/05/06 13:40:16|assertion failed: \SQUID\store_client.cpp:197:
> "sc->cmp_offset == copy_offset"
>
> I look at code in store_client.c ->
> storeClientCopy(),storeClientCopy2(),storeClientCopy3() and can't
> understand what is wrong with it.
>
> Moreover,
>
> void
> storeClientCopy(store_client * sc,
> [...]
> off_t copy_offset,
> [...]
> {
> assert(sc->cmp_offset == copy_offset);
> sc->copy_offset = copy_offset;
> sc->callback = callback;
> sc->callback_data = cbdataReference(data);
> sc->copy_buf = buf;
> sc->copy_size = size;
> sc->copy_offset = copy_offset;
>
> What the function parameter copy_offset is need for if it must be
> equal to sc->copy_offset ?
>
> What the code sc->copy_offset = copy_offset stands for two times
> ?
>
> SY,
> EK
Received on Tue May 07 2002 - 16:11:13 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:15:25 MST