changeset 10944:4a4f2760a9ad

[gaim-migrate @ 12737] 0 is not a valid value for account->perm_deny. committer: Tailor Script <tailor@pidgin.im>
author Stu Tomlinson <stu@nosnilmot.com>
date Thu, 26 May 2005 13:04:41 +0000
parents aa1df43e474c
children 1ce8013f5642
files src/account.c src/blist.c src/protocols/yahoo/yahoo.c
diffstat 3 files changed, 5 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/src/account.c	Thu May 26 12:49:25 2005 +0000
+++ b/src/account.c	Thu May 26 13:04:41 2005 +0000
@@ -682,6 +682,8 @@
 	account->ui_settings = g_hash_table_new_full(g_str_hash, g_str_equal,
 				g_free, (GDestroyNotify)g_hash_table_destroy);
 	account->system_log = NULL;
+	/* 0 is not a valid privacy setting */
+	account->perm_deny = 1;
 
 	account->presence = gaim_presence_new_for_account(account);
 
--- a/src/blist.c	Thu May 26 12:49:25 2005 +0000
+++ b/src/blist.c	Thu May 26 13:04:41 2005 +0000
@@ -561,6 +561,7 @@
 		for (anode = privacy->child; anode; anode = anode->next) {
 			xmlnode *x;
 			GaimAccount *account;
+			int imode;
 			const char *acct_name, *proto, *mode, *protocol;
 
 			acct_name = xmlnode_get_attrib(anode, "name");
@@ -576,7 +577,8 @@
 			if (!account)
 				continue;
 
-			account->perm_deny = atoi(mode);
+			imode = atoi(mode);
+			account->perm_deny = (imode != 0 ? imode : 1);
 
 			for (x = anode->child; x; x = x->next) {
 				char *name;
--- a/src/protocols/yahoo/yahoo.c	Thu May 26 12:49:25 2005 +0000
+++ b/src/protocols/yahoo/yahoo.c	Thu May 26 13:04:41 2005 +0000
@@ -77,12 +77,6 @@
 	gboolean permitted=FALSE;
 
 	switch (gc->account->perm_deny) {
-		case 0:
-			gaim_debug_warning("yahoo", "Privacy setting was 0.  If you can "
-							   "reproduce this, please file a bug report.\n");
-			permitted = TRUE;
-			break;
-
 		case GAIM_PRIVACY_ALLOW_ALL:
 			permitted = TRUE;
 			break;