changeset 30654:c31e1c0cf27f

merge of '0a7239b54affab8c6c4a3a097560826d888cf991' and 'f517ebc8991b2eeeae57b5bed9f2cef7899f60ba'
author Marcus Lundblad <ml@update.uu.se>
date Wed, 30 Jun 2010 21:34:50 +0000
parents f30a02140f74 (diff) fa311a0e51c0 (current diff)
children 16738cb6bb6b
files
diffstat 4 files changed, 12 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/finch/finch.c	Wed Jun 30 21:34:43 2010 +0000
+++ b/finch/finch.c	Wed Jun 30 21:34:50 2010 +0000
@@ -252,6 +252,7 @@
 	gboolean opt_version = FALSE;
 	char *opt_config_dir_arg = NULL;
 	gboolean debug_enabled = FALSE;
+	struct stat st;
 
 	struct option long_options[] = {
 		{"config",   required_argument, NULL, 'c'},
@@ -361,6 +362,8 @@
 	purple_idle_set_ui_ops(finch_idle_get_ui_ops());
 
 	path = g_build_filename(purple_user_dir(), "plugins", NULL);
+	if (!g_stat(path, &st))
+		g_mkdir(path, S_IRUSR | S_IWUSR | S_IXUSR);
 	purple_plugins_add_search_path(path);
 	g_free(path);
 
--- a/finch/gntdebug.c	Wed Jun 30 21:34:43 2010 +0000
+++ b/finch/gntdebug.c	Wed Jun 30 21:34:50 2010 +0000
@@ -77,7 +77,10 @@
 		}
 		return;
 	}
-	pipe(pipes);
+	if (pipe(pipes)) {
+		readhandle = -1;
+		return;
+	};
 	dup2(pipes[1], STDERR_FILENO);
 
 	stderrch = g_io_channel_unix_new(pipes[0]);
--- a/libpurple/connection.c	Wed Jun 30 21:34:43 2010 +0000
+++ b/libpurple/connection.c	Wed Jun 30 21:34:50 2010 +0000
@@ -516,7 +516,8 @@
 	account = data;
 	gc = purple_account_get_connection(account);
 
-	gc->disconnect_timeout = 0;
+	if (gc != NULL)
+		gc->disconnect_timeout = 0;
 
 	password = g_strdup(purple_account_get_password(account));
 	purple_account_disconnect(account);
--- a/pidgin/gtkmain.c	Wed Jun 30 21:34:43 2010 +0000
+++ b/pidgin/gtkmain.c	Wed Jun 30 21:34:50 2010 +0000
@@ -97,7 +97,6 @@
  */
 static const int catch_sig_list[] = {
 	SIGSEGV,
-	SIGHUP,
 	SIGINT,
 	SIGTERM,
 	SIGQUIT,
@@ -223,9 +222,6 @@
 	}
 
 	switch (sig) {
-	case SIGHUP:
-		purple_debug_warning("sighandler", "Caught signal %d\n", sig);
-		break;
 #if defined(USE_GSTREAMER) && !defined(GST_CAN_DISABLE_FORKING)
 /* By default, gstreamer forks when you initialize it, and waitpids for the
  * child.  But if libpurple reaps the child rather than leaving it to
@@ -550,6 +546,7 @@
 	gboolean debug_enabled;
 	gboolean migration_failed = FALSE;
 	GList *active_accounts;
+	struct stat st;
 
 	struct option long_options[] = {
 		{"config",       required_argument, NULL, 'c'},
@@ -853,6 +850,8 @@
 	 * in user's home directory.
 	 */
 	search_path = g_build_filename(purple_user_dir(), "plugins", NULL);
+	if (!g_stat(search_path, &st))
+		g_mkdir(search_path, S_IRUSR | S_IWUSR | S_IXUSR);
 	purple_plugins_add_search_path(search_path);
 	g_free(search_path);
 	purple_plugins_add_search_path(LIBDIR);