]> git.ipfire.org Git - thirdparty/squid.git/blame - src/mgr/Filler.cc
mkrelease: allow two digits for minor release numbers (#1837)
[thirdparty/squid.git] / src / mgr / Filler.cc
CommitLineData
8822ebee 1/*
b8ae064d 2 * Copyright (C) 1996-2023 The Squid Software Foundation and contributors
8822ebee 3 *
bbc27441
AJ
4 * Squid software is distributed under GPLv2+ license and includes
5 * contributions from numerous individuals and organizations.
6 * Please see the COPYING and CONTRIBUTORS files for details.
8822ebee
AR
7 */
8
bbc27441
AJ
9/* DEBUG: section 16 Cache Manager API */
10
f7f3304a 11#include "squid.h"
8822ebee 12#include "base/TextException.h"
c3e8e4e9 13#include "comm/Connection.h"
4c218615 14#include "ipc/RequestId.h"
8822ebee
AR
15#include "mgr/Filler.h"
16#include "mgr/Response.h"
17#include "Store.h"
18
8822ebee
AR
19CBDATA_NAMESPACED_CLASS_INIT(Mgr, Filler);
20
c3e8e4e9 21Mgr::Filler::Filler(const Action::Pointer &anAction, const Comm::ConnectionPointer &conn,
4c218615 22 const Ipc::RequestId aRequestId):
f53969cc
SM
23 StoreToCommWriter(conn, anAction->createStoreEntry()),
24 action(anAction),
25 requestId(aRequestId)
8822ebee 26{
bf95c10a 27 debugs(16, 5, conn << " action: " << action);
8822ebee
AR
28}
29
30void
31Mgr::Filler::start()
32{
bf95c10a 33 debugs(16, 5, MYNAME);
8822ebee 34 Must(requestId != 0);
aee3523a 35 Must(action != nullptr);
8822ebee
AR
36
37 StoreToCommWriter::start();
38 action->run(entry, false);
39}
40
41void
42Mgr::Filler::swanSong()
43{
bf95c10a 44 debugs(16, 5, MYNAME);
8822ebee
AR
45 action->sendResponse(requestId);
46 StoreToCommWriter::swanSong();
47}
f53969cc 48