empathy r1642 - trunk/src
- From: xclaesse svn gnome org
- To: svn-commits-list gnome org
- Subject: empathy r1642 - trunk/src
- Date: Fri, 17 Oct 2008 12:48:28 +0000 (UTC)
Author: xclaesse
Date: Fri Oct 17 12:48:28 2008
New Revision: 1642
URL: http://svn.gnome.org/viewvc/empathy?rev=1642&view=rev
Log:
Do not include accounts which don't have profile.. Also fix a leak.
Modified:
trunk/src/empathy-import-dialog.c
Modified: trunk/src/empathy-import-dialog.c
==============================================================================
--- trunk/src/empathy-import-dialog.c (original)
+++ trunk/src/empathy-import-dialog.c Fri Oct 17 12:48:28 2008
@@ -293,9 +293,10 @@
if (!tp_strdiff ((gchar *) child->name,
PIDGIN_ACCOUNT_TAG_PROTOCOL))
{
+ gchar *content;
const gchar *protocol;
- protocol = (gchar *) xmlNodeGetContent (child);
+ protocol = content = (gchar *) xmlNodeGetContent (child);
if (g_str_has_prefix (protocol, "prpl-"))
protocol += 5;
@@ -306,6 +307,10 @@
protocol = "groupwise";
data->profile = mc_profile_lookup (protocol);
+ g_free (content);
+
+ if (data->profile == NULL)
+ break;
}
/* Username and IRC server. */
@@ -376,7 +381,7 @@
/* If we have the needed settings, add the account data to the list,
* otherwise free the data */
- if (g_hash_table_size (data->settings) > 0)
+ if (data->profile != NULL && g_hash_table_size (data->settings) > 0)
accounts = g_list_prepend (accounts, data);
else
import_dialog_account_data_free (data);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]