Changeset - af83093fd1a4
[Not reviewed]
0 1 0
Jan Kaluza - 10 years ago 2016-01-21 19:11:28
jkaluza@redhat.com
Web interface: remove unneeded code to trim last new-line character on instances status page
1 file changed with 0 insertions and 3 deletions:
0 comments (0 inline, 0 general)
spectrum_manager/src/APIServer.cpp
Show inline comments
 
@@ -98,15 +98,12 @@ void APIServer::serve_instances(Server *server, Server::session *session, struct
 
		instance.AddMember("name", id.c_str(), json.GetAllocator());
 

	
 
		std::string status = server->send_command(id, "status");
 
		if (status.empty()) {
 
			status = "Cannot get the instance status.";
 
		}
 
		else if (*(status.end() - 1) == '\n') {
 
			status.erase(status.end() - 1);
 
		}
 
		instance.AddMember("status", status.c_str(), json.GetAllocator());
 

	
 
		bool running = true;
 
		if (status.find("Running") == std::string::npos) {
 
			running = false;
 
		}
0 comments (0 inline, 0 general)