Wrapping storeClientCopy2() with cbdataLock/Unlock should prevent
it from being freed until the end of this function.
Gross solution.
eventAdd("storeClientCopyEvent", storeClientCopyEvent, sc, 0, 0);
return;
}
+ cbdataLock(sc); /* ick, prevent sc from getting freed */
sc->flags.store_copying = 1;
debug(20, 3) ("storeClientCopy2: %s\n", storeKeyText(e->key));
assert(callback != NULL);
}
}
sc->flags.store_copying = 0;
+ cbdataUnlock(sc); /* ick, allow sc to be freed */
}
static void