Skip to content
Snippets Groups Projects
Commit f236b485 authored by Sergey Linev's avatar Sergey Linev Committed by Axel Naumann
Browse files

http: remove args list, used in depricated methods

parent c4603374
No related branches found
No related tags found
No related merge requests found
...@@ -52,7 +52,6 @@ protected: ...@@ -52,7 +52,6 @@ protected:
std::string fCors; ///<! CORS: sets Access-Control-Allow-Origin header for ProcessRequest responses std::string fCors; ///<! CORS: sets Access-Control-Allow-Origin header for ProcessRequest responses
std::mutex fMutex; ///<! mutex to protect list with arguments std::mutex fMutex; ///<! mutex to protect list with arguments
TList fCallArgs; ///<! submitted arguments (deprecated)
std::queue<std::shared_ptr<THttpCallArg>> fArgs; ///<! submitted arguments std::queue<std::shared_ptr<THttpCallArg>> fArgs; ///<! submitted arguments
std::mutex fWSMutex; ///<! mutex to protect WS handler lists std::mutex fWSMutex; ///<! mutex to protect WS handler lists
......
...@@ -208,24 +208,6 @@ THttpServer::~THttpServer() ...@@ -208,24 +208,6 @@ THttpServer::~THttpServer()
{ {
StopServerThread(); StopServerThread();
THttpCallArg *arg = nullptr;
Bool_t owner = kFALSE;
while (true) {
// delete outside the locked mutex area
if (owner && arg)
delete arg;
std::unique_lock<std::mutex> lk(fMutex);
if (fCallArgs.GetSize() == 0)
break;
arg = static_cast<THttpCallArg *>(fCallArgs.First());
const char *opt = fCallArgs.FirstLink()->GetAddOption();
owner = opt && !strcmp(opt, "owner");
fCallArgs.RemoveFirst();
}
if (fTerminated) { if (fTerminated) {
TIter iter(&fEngines); TIter iter(&fEngines);
THttpEngine *engine = nullptr; THttpEngine *engine = nullptr;
...@@ -670,33 +652,6 @@ Int_t THttpServer::ProcessRequests() ...@@ -670,33 +652,6 @@ Int_t THttpServer::ProcessRequests()
arg->NotifyCondition(); arg->NotifyCondition();
} }
// then process old-style queue, will be removed later
while (true) {
THttpCallArg *arg = nullptr;
lk.lock();
if (fCallArgs.GetSize() > 0) {
arg = static_cast<THttpCallArg *>(fCallArgs.First());
fCallArgs.RemoveFirst();
}
lk.unlock();
if (!arg)
break;
fSniffer->SetCurrentCallArg(arg);
try {
cnt++;
ProcessRequest(arg);
fSniffer->SetCurrentCallArg(nullptr);
} catch (...) {
fSniffer->SetCurrentCallArg(nullptr);
}
arg->NotifyCondition();
}
// regularly call Process() method of engine to let perform actions in ROOT context // regularly call Process() method of engine to let perform actions in ROOT context
TIter iter(&fEngines); TIter iter(&fEngines);
THttpEngine *engine = nullptr; THttpEngine *engine = nullptr;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment