changeset 6373:4d61775a5741

[gaim-migrate @ 6878] Losing privacy information is a bad thing. I don't know if this would have happened or not, but at the very least, we got some nasty assertions at startup. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Tue, 05 Aug 2003 11:10:34 +0000
parents 9dd4bb3cf1df
children ca73fdf3eb38
files src/privacy.c
diffstat 1 files changed, 12 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/src/privacy.c	Tue Aug 05 11:08:40 2003 +0000
+++ b/src/privacy.c	Tue Aug 05 11:10:34 2003 +0000
@@ -34,7 +34,6 @@
 
 	g_return_val_if_fail(account != NULL, FALSE);
 	g_return_val_if_fail(who     != NULL, FALSE);
-	g_return_val_if_fail(gaim_account_is_connected(account), FALSE);
 
 	name = g_strdup(normalize(who));
 
@@ -50,7 +49,9 @@
 
 	account->permit = g_slist_append(account->permit, g_strdup(who));
 
-	serv_add_permit(gaim_account_get_connection(account), who);
+	if (gaim_account_is_connected(account))
+		serv_add_permit(gaim_account_get_connection(account), who);
+
 	gaim_blist_save();
 
 	if (privacy_ops != NULL && privacy_ops->permit_added != NULL)
@@ -67,7 +68,6 @@
 
 	g_return_val_if_fail(account != NULL, FALSE);
 	g_return_val_if_fail(who     != NULL, FALSE);
-	g_return_val_if_fail(gaim_account_is_connected(account), FALSE);
 
 	name = g_strdup(normalize(who));
 
@@ -84,7 +84,9 @@
 	account->permit = g_slist_remove(account->permit, l->data);
 	g_free(l->data);
 
-	serv_rem_deny(gaim_account_get_connection(account), who);
+	if (gaim_account_is_connected(account))
+		serv_rem_deny(gaim_account_get_connection(account), who);
+
 	gaim_blist_save();
 
 	if (privacy_ops != NULL && privacy_ops->permit_removed != NULL)
@@ -101,7 +103,6 @@
 
 	g_return_val_if_fail(account != NULL, FALSE);
 	g_return_val_if_fail(who     != NULL, FALSE);
-	g_return_val_if_fail(gaim_account_is_connected(account), FALSE);
 
 	name = g_strdup(normalize(who));
 
@@ -117,7 +118,9 @@
 
 	account->deny = g_slist_append(account->deny, g_strdup(who));
 
-	serv_add_deny(gaim_account_get_connection(account), who);
+	if (gaim_account_is_connected(account))
+		serv_add_deny(gaim_account_get_connection(account), who);
+
 	gaim_blist_save();
 
 	if (privacy_ops != NULL && privacy_ops->deny_added != NULL)
@@ -134,7 +137,6 @@
 
 	g_return_val_if_fail(account != NULL, FALSE);
 	g_return_val_if_fail(who     != NULL, FALSE);
-	g_return_val_if_fail(gaim_account_is_connected(account), FALSE);
 
 	name = g_strdup(normalize(who));
 
@@ -151,7 +153,9 @@
 	account->deny = g_slist_remove(account->deny, l->data);
 	g_free(l->data);
 
-	serv_rem_deny(gaim_account_get_connection(account), who);
+	if (gaim_account_is_connected(account))
+		serv_rem_deny(gaim_account_get_connection(account), who);
+
 	gaim_blist_save();
 
 	if (privacy_ops != NULL && privacy_ops->deny_removed != NULL)