/*
- * Copyright (C) 1996-2015 The Squid Software Foundation and contributors
+ * Copyright (C) 1996-2021 The Squid Software Foundation and contributors
*
* Squid software is distributed under GPLv2+ license and includes
* contributions from numerous individuals and organizations.
static void
addSwapDir(TestSwapDirPointer aStore)
{
- allocate_new_swapdir(&Config.cacheSwap);
+ allocate_new_swapdir(Config.cacheSwap);
Config.cacheSwap.swapDirs[Config.cacheSwap.n_configured] = aStore.getRaw();
++Config.cacheSwap.n_configured;
}
testStoreHashIndex::testStats()
{
StoreEntry *logEntry = new StoreEntry;
- logEntry->makeMemObject();
- logEntry->mem_obj->setUris("dummy_storeId", NULL, HttpRequestMethod());
+ logEntry->createMemObject("dummy_storeId", NULL, HttpRequestMethod());
logEntry->store_status = STORE_PENDING;
Store::Init();
TestSwapDirPointer aStore (new TestSwapDir);
testStoreHashIndex::testMaxSize()
{
StoreEntry *logEntry = new StoreEntry;
- logEntry->makeMemObject();
- logEntry->mem_obj->setUris("dummy_storeId", NULL, HttpRequestMethod());
+ logEntry->createMemObject("dummy_storeId", NULL, HttpRequestMethod());
logEntry->store_status = STORE_PENDING;
Store::Init();
TestSwapDirPointer aStore (new TestSwapDir);
e->lastref = squid_curtime;
e->timestamp = squid_curtime;
e->expires = squid_curtime;
- e->lastmod = squid_curtime;
+ e->lastModified(squid_curtime);
e->refcount = 1;
- EBIT_CLR(e->flags, RELEASE_REQUEST);
- EBIT_CLR(e->flags, KEY_PRIVATE);
e->ping_status = PING_NONE;
EBIT_CLR(e->flags, ENTRY_VALIDATED);
e->hashInsert((const cache_key *)name.termedBuf()); /* do it after we clear KEY_PRIVATE */