Continued improvements to shutdown.
This commit is contained in:
1 parent
b4ab5fb86a
commit
28292e924a
55 files changed
+459
-367
No files matched your search
+9
-14
@@ -13,20 +13,15 @@ namespace core {
|
||||
}
|
||||
|
||||
bool CommandList::processRequest(std::string request, TCPSession *session, std::stringstream &data) {
|
||||
std::stringstream input = std::stringstream(request);
|
||||
while(!input.eof()) {
|
||||
std::string requests;
|
||||
std::getline(input, requests);
|
||||
if(session->grab != NULL)
|
||||
session->grab->processCommand(requests, session, data);
|
||||
else {
|
||||
int pos = requests.find(" ");
|
||||
std::string function = pos == requests.npos ? requests: requests.substr(0, pos);
|
||||
for(auto *command : commands)
|
||||
if(command->check(function))
|
||||
command->processCommand(requests, session, data);
|
||||
}
|
||||
}
|
||||
if(session->grab != NULL)
|
||||
session->grab->processCommand(request, session, data);
|
||||
else {
|
||||
int pos = request.find(" ");
|
||||
std::string function = pos == request.npos ? request: request.substr(0, pos);
|
||||
for(auto *command : commands)
|
||||
if(command->check(function))
|
||||
command->processCommand(request, session, data);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user