Puzzled at storeClientListAdd. A bug? :-(

From: <maer727@dont-contact.us>
Date: Mon, 22 Apr 2002 13:31:46 +0800 (CST)

Hi, pals!

Look at this statement in storeClientListAdd,

    dlinkAdd(sc, &sc->node, &mem->clients);

I think this statement is used to add a storecilent to the mem
object of the StoreEntry that the storecilent is related to.

I am puzzled at this statement. Only the StoreEntry being accessed
has the mem object. Suppose when StoreEntry A is being accessed, the storeclient S is added to the mem object of it. And the storecilent S is waiting for data that it requested to come. Suppose before the requested data comes, we turn to manipulate another StoreEntry B and
the mem object of A becomes NULL. ( I am not very sure about it, since
I just look at the Programming Guide and see that only the StoreEntry being accessed has the mem object. I think StoreEntry A is not being accessed and StoreEntry B is being accessed. And so the mem object of StoreEntry A will become NULL.) Since the mem object of StoreEntry A
becomes NULL, and the storeclient S added to the mem object of StoreEntry A will not be found again. Since the head of link list will become NULL. A bug? Maybe at some points, I am wrong. :-)

Am I correct? If I am not correct, can you give me a simple explanation?

Best regards,
George Ma
Received on Sun Apr 21 2002 - 23:32:47 MDT

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