Changeset - 8780e3a1d0af
[Not reviewed]
0 1 0
Vitaly Takmazov - 7 years ago 2018-09-18 19:06:31
vitalyster@gmail.com
fix compatibility with gcc 4.9
1 file changed with 6 insertions and 6 deletions:
0 comments (0 inline, 0 general)
spectrum_manager/src/APIServer.cpp
Show inline comments
 
@@ -84,13 +84,13 @@ void APIServer::serve_instances(Server *server, Server::session *session, struct
 
	std::vector<std::string> usernames;
 
	std::vector<std::string> list = show_list(m_config, false);
 

	
 
	Json::Value json;
 
	json["error"] = 0;
 

	
 
	Json::Value instances(Json::ValueType::arrayValue);
 
	Json::Value instances(Json::arrayValue);
 
	BOOST_FOREACH(std::string &id, list) {
 
		Json::Value instance;
 
		instance["id"] = id;
 

	
 
		std::string name = get_config(m_config, id, "identity.name");
 
		if (name.empty() || name == "Spectrum 2 Transport") {
 
@@ -287,13 +287,13 @@ void APIServer::serve_instances_commands(Server *server, Server::session *sessio
 
	boost::split(commands, response, boost::is_any_of("\n"));
 

	
 
	Json::Value json;
 
	json["error"] = 0;
 

	
 
	std::vector<std::vector<std::string> > tmp;
 
	Json::Value cmds(Json::ValueType::arrayValue);
 
	Json::Value cmds(Json::arrayValue);
 
	BOOST_FOREACH(const std::string &command, commands) {
 
		escaped_list_separator<char> els('\\', ' ', '\"');
 
		tokenizer<escaped_list_separator<char> > tok(command, els);
 

	
 
		std::vector<std::string> tokens;
 
		for(tokenizer<escaped_list_separator<char> >::iterator beg=tok.begin(); beg!=tok.end(); ++beg) {
 
@@ -351,13 +351,13 @@ void APIServer::serve_instances_variables(Server *server, Server::session *sessi
 
	boost::split(commands, response, boost::is_any_of("\n"));
 

	
 
	Json::Value json;
 
	json["error"] = 0;
 

	
 
	std::vector<std::vector<std::string> > tmp;
 
	Json::Value cmds(Json::ValueType::arrayValue);
 
	Json::Value cmds(Json::arrayValue);
 
	BOOST_FOREACH(const std::string &command, commands) {
 
		escaped_list_separator<char> els('\\', ' ', '\"');
 
		tokenizer<escaped_list_separator<char> > tok(command, els);
 

	
 
		std::vector<std::string> tokens;
 
		for(tokenizer<escaped_list_separator<char> >::iterator beg=tok.begin(); beg!=tok.end(); ++beg) {
 
@@ -448,13 +448,13 @@ void APIServer::serve_instances_command_args(Server *server, Server::session *se
 
	boost::split(args, response, boost::is_any_of("\n"));
 

	
 
	Json::Value json;
 
	json["error"] = 0;
 

	
 
	std::vector<std::vector<std::string> > tmp;
 
	Json::Value argList(Json::ValueType::arrayValue);
 
	Json::Value argList(Json::arrayValue);
 

	
 
	if (userContext && session->admin) {
 
		Json::Value arg;
 
		arg["name"] = "username";
 
		arg["label"] = "Username";
 
		arg["example"] = "";
 
@@ -568,13 +568,13 @@ void APIServer::serve_instances_execute(Server *server, Server::session *session
 
	if (!fields.empty() && /*fields[0].find(" - ") != std::string::npos &&*/ (fields[0].find(": ") != std::string::npos || fields[0].find(":\"") != std::string::npos)) {
 
		Json::Value json;
 
		json["error"] = 0;
 

	
 
		std::vector<std::string> tmp;
 
		std::vector<std::string> tmp2;
 
		Json::Value table(Json::ValueType::arrayValue);
 
		Json::Value table(Json::arrayValue);
 

	
 
		BOOST_FOREACH(const std::string &line, fields) {
 
			escaped_list_separator<char> els('\\', ' ', '\"');
 
			tokenizer<escaped_list_separator<char> > tok(line, els);
 

	
 
			Json::Value arg;
 
@@ -625,13 +625,13 @@ void APIServer::serve_users(Server *server, Server::session *session, struct mg_
 
	Json::Value json;
 
	json["error"] = 0;
 

	
 
	std::vector<std::string> list;
 
	m_storage->getUsers(list);
 

	
 
	Json::Value users(Json::ValueType::arrayValue);
 
	Json::Value users(Json::arrayValue);
 
	BOOST_FOREACH(std::string &id, list) {
 
		Json::Value user;
 
		user["username"] = id;
 
		users.append(user);
 
	}
 

	
0 comments (0 inline, 0 general)