]>
git.ipfire.org Git - thirdparty/squid.git/blob - src/mgr/FunAction.cc
4 * DEBUG: section 16 Cache Manager API
9 #include "base/TextException.h"
10 #include "ipc/UdsOp.h"
11 #include "mgr/Command.h"
12 #include "mgr/Filler.h"
13 #include "mgr/FunAction.h"
14 #include "mgr/Request.h"
18 Mgr::FunAction::Pointer
19 Mgr::FunAction::Create(const Command::Pointer
&aCmd
, OBJH
* aHandler
)
21 return new FunAction(aCmd
, aHandler
);
24 Mgr::FunAction::FunAction(const Command::Pointer
&aCmd
, OBJH
* aHandler
):
25 Action(aCmd
), handler(aHandler
)
27 Must(handler
!= NULL
);
32 Mgr::FunAction::respond(const Request
& request
)
35 const int fd
= Ipc::ImportFdIntoComm(request
.fd
, SOCK_STREAM
, IPPROTO_TCP
, Ipc::fdnHttpSocket
);
37 Must(request
.requestId
!= 0);
38 AsyncJob::Start(new Mgr::Filler(this, fd
, request
.requestId
));
42 Mgr::FunAction::dump(StoreEntry
* entry
)
46 if (UsingSmp() && IamWorkerProcess())
47 storeAppendPrintf(entry
, "by kid%d {\n", KidIdentifier
);
49 if (atomic() && UsingSmp() && IamWorkerProcess())
50 storeAppendPrintf(entry
, "} by kid%d\n\n", KidIdentifier
);