besser82 / rpms / pidgin

Forked from rpms/pidgin 6 years ago
Clone
4609635
http://sourceforge.net/tracker/index.php?func=detail&aid=1604261&group_id=235&atid=300235
4609635
If the network connection on a machine is changed while gaim is running, it
4609635
won't pick up the changes unless NetworkManager support is enabled. This
4609635
makes it always re-read the DNS info before a server connect.
4609635
4609635
This implemention is considered to be disliked because it re-reads the config files a few times
4609635
upon every connection.  There appears however to be no work underway to fix it properly.  This 
4609635
behavior is at least harmless while fixing the bug, so we will keep this patch for now.
4609635
4609635
diff -urN pidgin-2.0.0beta7devel.orig/libpurple/connection.c pidgin-2.0.0beta7devel/libpurple/connection.c
4609635
--- pidgin-2.0.0beta7devel.orig/libpurple/connection.c	2007-03-20 01:59:41.000000000 -0400
4609635
+++ pidgin-2.0.0beta7devel/libpurple/connection.c	2007-04-16 13:54:40.000000000 -0400
4609635
@@ -37,6 +37,10 @@
4609635
 #include "signals.h"
4609635
 #include "util.h"
4609635
 
4609635
+#include <netinet/in.h>
4609635
+#include <arpa/nameser.h>
4609635
+#include <resolv.h>
4609635
+
4609635
 static GList *connections = NULL;
4609635
 static GList *connections_connecting = NULL;
4609635
 static PurpleConnectionUiOps *connection_ui_ops = NULL;
4609635
@@ -139,6 +143,9 @@
4609635
 
4609635
 	purple_signal_emit(purple_connections_get_handle(), "signing-on", gc);
4609635
 
4609635
+	/* Re-read resolv.conf and friends in case DNS servers have changed */
4609635
+	res_init();
4609635
+
4609635
 	if (regist)
4609635
 	{
4609635
 		purple_debug_info("connection", "Registering.  gc = %p\n", gc);
4609635
diff -urN pidgin-2.0.0beta7devel.orig/libpurple/network.c pidgin-2.0.0beta7devel/libpurple/network.c
4609635
--- pidgin-2.0.0beta7devel.orig/libpurple/network.c	2007-04-01 11:51:46.000000000 -0400
4609635
+++ pidgin-2.0.0beta7devel/libpurple/network.c	2007-04-16 13:55:08.000000000 -0400
4609635
@@ -612,8 +612,6 @@
4609635
 	switch(current)
4609635
 	{
4609635
 	case LIBNM_ACTIVE_NETWORK_CONNECTION:
4609635
-		/* Call res_init in case DNS servers have changed */
4609635
-		res_init();
4609635
 		if (ui_ops != NULL && ui_ops->network_connected != NULL)
4609635
 			ui_ops->network_connected();
4609635
 		prev = current;