Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions Framework/Core/src/DPLWebSocket.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,8 @@ void WSDPLHandler::endHeaders()
if (mHeaders["upgrade"] != "websocket") {
throw WSError{400, "Bad Request: not a websocket upgrade"};
}
if (mHeaders["connection"] != "upgrade") {

if (mHeaders["connection"].find("upgrade") == std::string::npos) {
throw WSError{400, "Bad Request: connection not for upgrade"};
}
if (mHeaders["sec-websocket-protocol"] != "dpl") {
Expand Down Expand Up @@ -447,7 +448,8 @@ void WSDPLClient::endHeaders()
if (mHeaders["upgrade"] != "websocket") {
throw runtime_error_f("No websocket upgrade");
}
if (mHeaders["connection"] != "upgrade") {
// find is used to account for multiple options
if (mHeaders["connection"].find("upgrade") == std::string::npos) {
throw runtime_error_f("No connection upgrade");
}
if (mHeaders.count("sec-websocket-accept") == 0) {
Expand Down
2 changes: 1 addition & 1 deletion Framework/Core/src/DriverServerContext.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ struct ServiceRegistry;
struct GuiCallbackContext;

struct DriverServerContext {
uv_loop_t* loop;
uv_loop_t* loop = nullptr;
ServiceRegistry* registry = nullptr;
std::vector<DeviceControl>* controls = nullptr;
std::vector<DeviceInfo>* infos = nullptr;
Expand Down
4 changes: 2 additions & 2 deletions Framework/Core/src/runDataProcessing.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -2357,7 +2357,7 @@ int doMain(int argc, char** argv, o2::framework::WorkflowSpec const& workflow,
// configuration they get passed by their parents.
for (auto& dp : importedWorkflow) {
auto found = std::find_if(physicalWorkflow.begin(), physicalWorkflow.end(),
[& name = dp.name](DataProcessorSpec const& spec) { return spec.name == name; });
[&name = dp.name](DataProcessorSpec const& spec) { return spec.name == name; });
if (found == physicalWorkflow.end()) {
physicalWorkflow.push_back(dp);
rankIndex.insert(std::make_pair(dp.name, workflowHashB));
Expand Down Expand Up @@ -2435,7 +2435,7 @@ int doMain(int argc, char** argv, o2::framework::WorkflowSpec const& workflow,
throw std::runtime_error("Unable to do topological sort of the resulting workflow. Do you have loops?\n" + debugTopoInfo(physicalWorkflow, topoInfos, edges));
}
// Sort by layer and then by name, to ensure stability.
std::stable_sort(topoInfos.begin(), topoInfos.end(), [& workflow = physicalWorkflow, &rankIndex, &topoInfos](TopoIndexInfo const& a, TopoIndexInfo const& b) {
std::stable_sort(topoInfos.begin(), topoInfos.end(), [&workflow = physicalWorkflow, &rankIndex, &topoInfos](TopoIndexInfo const& a, TopoIndexInfo const& b) {
auto aRank = std::make_tuple(a.layer, -workflow.at(a.index).outputs.size(), workflow.at(a.index).name);
auto bRank = std::make_tuple(b.layer, -workflow.at(b.index).outputs.size(), workflow.at(b.index).name);
return aRank < bRank;
Expand Down