changeset 18753:2cc872f4f620

Fix stun to work on startup (this is is a temporary hack until purple_prefs_load() happens in the core). Fixes #2334
author Daniel Atallah <daniel.atallah@gmail.com>
date Tue, 31 Jul 2007 03:26:05 +0000
parents 02529af24ae2
children 66df5d93cdf4
files libpurple/core.c libpurple/stun.c pidgin/gtkmain.c
diffstat 3 files changed, 7 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/core.c	Mon Jul 30 22:37:00 2007 +0000
+++ b/libpurple/core.c	Tue Jul 31 03:26:05 2007 +0000
@@ -159,8 +159,9 @@
 	/*
 	 * Call this early on to try to auto-detect our IP address and
 	 * hopefully save some time later.
+	 * TODO: do this here after purple_prefs_load() has been moved into purple_prefs_init()
 	 */
-	purple_network_get_my_ip(-1);
+	/*purple_network_get_my_ip(-1);*/
 
 	if (ops != NULL && ops->ui_init != NULL)
 		ops->ui_init();
--- a/libpurple/stun.c	Mon Jul 30 22:37:00 2007 +0000
+++ b/libpurple/stun.c	Tue Jul 31 03:26:05 2007 +0000
@@ -429,5 +429,4 @@
 
 void purple_stun_init() {
 	purple_prefs_add_string("/purple/network/stun_server", "");
-	purple_stun_discover(NULL);
 }
--- a/pidgin/gtkmain.c	Mon Jul 30 22:37:00 2007 +0000
+++ b/pidgin/gtkmain.c	Tue Jul 31 03:26:05 2007 +0000
@@ -31,6 +31,7 @@
 #include "eventloop.h"
 #include "ft.h"
 #include "log.h"
+#include "network.h"
 #include "notify.h"
 #include "prefs.h"
 #include "prpl.h"
@@ -760,7 +761,6 @@
 #endif
 		return 0;
 	}
-		
 
 	/* TODO: Move blist loading into purple_blist_init() */
 	purple_set_blist(purple_blist_new());
@@ -777,6 +777,10 @@
 	/* TODO: Move pounces loading into purple_pounces_init() */
 	purple_pounces_load();
 
+	/* Call this early on to try to auto-detect our IP address and
+	 * hopefully save some time later.
+	 * TODO: move this (back) into purple_core_init() when purple_prefs_load() is in purple_prefs_init() */
+	 purple_network_get_my_ip(-1);
 
 	/* HACK BY SEANEGAN:
 	 * We've renamed prpl-oscar to prpl-aim and prpl-icq, accordingly.