changeset 22229:ae5917260eac

merge of '9d22bc3a3d82cb26e7196d41b472b81c7660274d' and 'f6e17bf35872d70d9ebba4cf860470a5b21d54ce'
author Jeffrey Connelly <jaconnel@calpoly.edu>
date Tue, 29 Jan 2008 01:51:26 +0000
parents 9f95357c21b9 (current diff) 6337a8fd7784 (diff)
children 0f654f866de0 4af9179e33df e808d83d797e
files
diffstat 2 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/plugins/tcl/tcl_cmds.c	Tue Jan 29 01:51:01 2008 +0000
+++ b/libpurple/plugins/tcl/tcl_cmds.c	Tue Jan 29 01:51:26 2008 +0000
@@ -25,6 +25,7 @@
 #include "internal.h"
 #include "conversation.h"
 #include "connection.h"
+#include "eventloop.h"
 #include "account.h"
 #include "server.h"
 #include "notify.h"
@@ -1778,7 +1779,7 @@
 	}
 	/* We can't unload immediately, but we can unload at the first 
 	 * known safe opportunity. */
-	g_idle_add(unload_self, (gpointer)plugin);
+	purple_timeout_add(0, unload_self, (gpointer)plugin);
 
 	return TCL_OK;
 }
--- a/libpurple/protocols/bonjour/bonjour.c	Tue Jan 29 01:51:01 2008 +0000
+++ b/libpurple/protocols/bonjour/bonjour.c	Tue Jan 29 01:51:26 2008 +0000
@@ -673,11 +673,12 @@
 
 	/* Try to figure out a good host name to use */
 	/* TODO: Avoid 'localhost,' if possible */
-	if (gethostname(hostname, 255) != 0) {
+	if (gethostname(hostname, sizeof(hostname)) != 0) {
 		purple_debug_warning("bonjour", "Error when getting host name: %s.  Using \"localhost.\"\n",
 				g_strerror(errno));
 		strcpy(hostname, "localhost");
 	}
+	hostname[sizeof(hostname) - 1] = '\0';
 	default_hostname = g_strdup(hostname);
 }