gaim/gaim

0 is not a valid value for account->perm_deny.
oldstatus
2005-05-26, Stu Tomlinson
150d5e5ead24
Parents 7eae8e752991
Children 72ae9106c3bd
0 is not a valid value for account->perm_deny.
--- a/src/account.c Thu May 26 08:49:15 2005 -0400
+++ b/src/account.c Thu May 26 09:04:27 2005 -0400
@@ -145,6 +145,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;
return account;
}
--- a/src/blist.c Thu May 26 08:49:15 2005 -0400
+++ b/src/blist.c Thu May 26 09:04:27 2005 -0400
@@ -2004,6 +2004,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");
@@ -2019,7 +2020,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 08:49:15 2005 -0400
+++ b/src/protocols/yahoo/yahoo.c Thu May 26 09:04:27 2005 -0400
@@ -78,12 +78,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;