|
@@ -185,7 +185,18 @@ void con_handler::handle_read_command(const boost::system::error_code &err,
|
|
|
answer["command"] = "status";
|
|
|
|
|
|
// TODO answer a real status message
|
|
|
- answer["response"] = "This is a status message :)";
|
|
|
+ std::string response;
|
|
|
+ if (this->getFile.is_open() && this->putFile.is_open()) {
|
|
|
+ response = "download and upload running";
|
|
|
+ } else if (this->putFile.is_open()) {
|
|
|
+ response = "upload running";
|
|
|
+ } else if (this->getFile.is_open()) {
|
|
|
+ response = "download running";
|
|
|
+ } else {
|
|
|
+ response = "ok";
|
|
|
+ }
|
|
|
+
|
|
|
+ answer["response"] = response;
|
|
|
const std::string answerString = Json::writeString(stringBuilder, answer);
|
|
|
|
|
|
// send answer
|