soc.2009.transport: 3af89398: Make allowed_servers config variable opt...

hanzz at soc.pidgin.im hanzz at soc.pidgin.im
Sat Jun 20 02:25:25 EDT 2009


-----------------------------------------------------------------
Revision: 3af8939828833ffee95056dc49037b53fe6fb8bc
Ancestor: e160ee19f8fd0c6140d0d311405f2107077183ce
Author: hanzz at soc.pidgin.im
Date: 2009-06-20T06:21:03
Branch: im.pidgin.soc.2009.transport
URL: http://d.pidgin.im/viewmtn/revision/info/3af8939828833ffee95056dc49037b53fe6fb8bc

Modified files:
        main.cpp

ChangeLog: 

Make allowed_servers config variable optional

-------------- next part --------------
============================================================
--- main.cpp	4821eb5878eaf517c5e4c7b7089722cd816342a0
+++ main.cpp	2d63b68c17096377bd6d7ddf0d081c48f39fced2
@@ -830,11 +830,13 @@ void GlooxMessageHandler::loadConfigFile
 	}
 	g_strfreev (bind);
 	
-	bind = g_key_file_get_string_list(keyfile, "service", "allowed_servers", NULL, NULL);
-	for (i = 0; bind[i]; i++){
-		m_configuration.allowedServers.push_back((std::string) bind[i]);
+	if(g_key_file_has_key(keyfile,"service","allowed_servers",NULL)) {
+		bind = g_key_file_get_string_list(keyfile, "service", "allowed_servers", NULL, NULL);
+		for (i = 0; bind[i]; i++){
+			m_configuration.allowedServers.push_back((std::string) bind[i]);
+		}
+		g_strfreev (bind);
 	}
-	g_strfreev (bind);
 
 	g_key_file_free(keyfile);
 }


More information about the Commits mailing list