* supports are read/write, and since COSS works on a single file
* per storedir it should work just fine.
*
- * $Id: async_io.cc,v 1.8 2002/04/13 23:07:56 hno Exp $
+ * $Id: async_io.cc,v 1.9 2002/05/19 14:14:52 hno Exp $
*/
#include "squid.h"
DWCB *wc;
FREE *freefunc;
void *cbdata;
+ int callback_valid;
void *buf;
int fd;
async_queue_entry_t *aqe;
buf = aqe->aq_e_buf;
fd = aqe->aq_e_fd;
type = aqe->aq_e_type;
+ callback_valid = cbdataReferenceValidDone(aqe->aq_e_callback_data, &cbdata);
/* Free slot */
bzero(aqe, sizeof(async_queue_entry_t));
q->aq_numpending--;
/* Callback */
- if (cbdataReferenceValidDone(aqe->aq_e_callback_data, &cbdata)) {
+ if (callback_valid) {
if (type == AQ_ENTRY_READ)
rc(fd, buf, retval, reterr, cbdata);
if (type == AQ_ENTRY_WRITE)