Changeset - 5d3244bd8bf7
[Not reviewed]
0 5 0
Jan Kaluza - 10 years ago 2015-12-30 11:53:24
jkaluza@redhat.com
Update spectrum2_manager server to new mongoose release
1 file changed:
Changeset was too big and was cut off... Show full diff anyway
0 comments (0 inline, 0 general)
spectrum_manager/src/main.cpp
Show inline comments
 
@@ -126,49 +126,48 @@ int main(int argc, char **argv)
 
		return 1;
 
	}
 

	
 
	if (command[0] == "start") {
 
		return start_instances(&config);
 
	}
 
	else if (command[0] == "stop") {
 
		stop_instances(&config);
 
	}
 
	else if (command[0] == "status") {
 
		return show_status(&config);
 
	}
 
	else if (command[0] == "list") {
 
		std::vector<std::string> list = show_list(&config);
 
	}
 
	else if (command[0] == "restart") {
 
		return restart_instances(&config);
 
	}
 
	else if (command[0] == "server") {
 
		Server server(&config);
 
		if (server.start() == false) {
 
			std::cerr << "Can't set up server handler.\n";
 
			return 1;
 
		}
 
		while (1) { sleep(10); }
 
	}
 
	else {
 
		if (command.size() < 2) {
 
			std::cout << desc << "\n";
 
			return 11;
 
		}
 
		Swift::SimpleEventLoop eventLoop;
 
		Swift::BoostNetworkFactories networkFactories(&eventLoop);
 

	
 
		std::string jid = command[0];
 
		command.erase(command.begin());
 
		std::string cmd = boost::algorithm::join(command, " ");
 

	
 
		if (cmd == "start") {
 
			return start_instances(&config, jid);
 
		}
 
		else if (cmd == "stop") {
 
			stop_instances(&config, jid);
 
			return 0;
 
		}
 
		else if (cmd == "restart") {
 
			return restart_instances(&config, jid);
 
		}
 

	

Changeset was too big and was cut off... Show full diff anyway

0 comments (0 inline, 0 general)