soc.2009.transport: 45e0e898: Better argv handling

hanzz at soc.pidgin.im hanzz at soc.pidgin.im
Tue Jul 21 02:21:18 EDT 2009


-----------------------------------------------------------------
Revision: 45e0e898d4248f71e9ee20587bc9507dd07f9fdc
Ancestor: 0de216368c69a1ceacba708b853b65fbb83170b9
Author: hanzz at soc.pidgin.im
Date: 2009-07-21T06:14:17
Branch: im.pidgin.soc.2009.transport
URL: http://d.pidgin.im/viewmtn/revision/info/45e0e898d4248f71e9ee20587bc9507dd07f9fdc

Modified files:
        main.cpp

ChangeLog: 

Better argv handling

-------------- next part --------------
============================================================
--- main.cpp	fd8f158a1e2be8c5ab7b6f211cbde2bfa84a5657
+++ main.cpp	7b01162d39c49e87a89dd47a78180b2c3f58160b
@@ -811,6 +811,7 @@ void GlooxMessageHandler::loadConfigFile
 // 		g_error (error->message);
 		Log().Get("gloox") << "Can't load config file!!!";
 		g_key_file_free(keyfile);
+		exit(0);
 		return;
 	}
 	
@@ -1426,7 +1427,7 @@ int main( int argc, char* argv[] ) {
 GlooxMessageHandler* GlooxMessageHandler::m_pInstance = NULL;
 int main( int argc, char* argv[] ) {
 	if (argc != 2)
-		std::cout << "Usage: " << std::string(argv[1]) << " config_file_name\n";
+		std::cout << "Usage: " << std::string(argv[0]) << " config_file_name\n";
 	else {
 		std::string config(argv[1]);
 		GlooxMessageHandler t(config);


More information about the Commits mailing list