Changeset - 81bcacf6953d
[Not reviewed]
0 2 0
Jan Kaluza - 13 years ago 2012-07-30 14:26:06
hanzz.k@gmail.com
Enable logging unicode characters
2 files changed with 4 insertions and 3 deletions:
0 comments (0 inline, 0 general)
spectrum/src/main.cpp
Show inline comments
 
@@ -114,25 +114,26 @@ static void daemonize(const char *cwd, const char *lock_file) {
 
}
 

	
 
#endif
 

	
 
int main(int argc, char **argv)
 
{
 
	Config config(argc, argv);
 

	
 
	boost::program_options::variables_map vm;
 
	bool no_daemon = false;
 
	std::string config_file;
 
	std::string jid;
 
	
 

	
 
	setlocale(LC_ALL, "");
 

	
 
#ifndef WIN32
 
	if (signal(SIGINT, spectrum_sigint_handler) == SIG_ERR) {
 
		std::cout << "SIGINT handler can't be set\n";
 
		return -1;
 
	}
 

	
 
	if (signal(SIGTERM, spectrum_sigterm_handler) == SIG_ERR) {
 
		std::cout << "SIGTERM handler can't be set\n";
 
		return -1;
 
	}
 
#endif
src/admininterface.cpp
Show inline comments
 
@@ -282,28 +282,28 @@ void AdminInterface::handleQuery(Swift::Message::ref message) {
 
			}
 
		}
 
		else {
 
			message->setBody("Bad argument count. See 'help'.");
 
		}
 
	}
 
	else if (message->getBody().find("unregister ") == 0 && m_userRegistration) {
 
		std::string body = message->getBody();
 
		std::vector<std::string> args;
 
		boost::split(args, body, boost::is_any_of(" "));
 
		if (args.size() == 2) {
 
			if (m_userRegistration->unregisterUser(args[1])) {
 
				message->setBody("User unregistered.");
 
				message->setBody("User '" + args[1] + "' unregistered.");
 
			}
 
			else {
 
				message->setBody("Registration failed: User is not registered");
 
				message->setBody("Registration failed: User '" + args[1] + "' is not registered");
 
			}
 
		}
 
		else {
 
			message->setBody("Bad argument count. See 'help'.");
 
		}
 
	}
 
	else if (message->getBody().find("help") == 0) {
 
		std::string help;
 
		help += "General:\n";
 
		help += "    status - shows instance status\n";
 
		help += "    reload - Reloads config file\n";
 
		help += "    uptime - returns ptime in seconds\n";
0 comments (0 inline, 0 general)