# HG changeset patch # User Mark Doliner # Date 1201888133 0 # Node ID ee80c4ab91eecd912be4ea65c70e0cb32d530d49 # Parent 31863f2d7c3cb29b18f8a8c80d0dcd88c61a9a5e Rename 'add_buddies_in_permit' to 'add_all_buddies_to_permit_list' which I think more accurately describes the function, and add comments to 'purple_privacy_allow' and 'purple_privacy_deny' saying that I think the 'local' and 'restore' parameters could be removed. Does anyone know what those parameters are intended to be used for? diff -r 31863f2d7c3c -r ee80c4ab91ee libpurple/privacy.c --- a/libpurple/privacy.c Fri Feb 01 02:53:51 2008 +0000 +++ b/libpurple/privacy.c Fri Feb 01 17:48:53 2008 +0000 @@ -207,7 +207,7 @@ * buddy list and ONLY buddies from your buddy list. */ static void -add_buddies_in_permit(PurpleAccount *account, gboolean local) +add_all_buddies_to_permit_list(PurpleAccount *account, gboolean local) { GSList *list; @@ -230,6 +230,12 @@ } } +/* + * TODO: All callers of this function pass in FALSE for local and + * restore and I don't understand when you would ever want to + * use TRUE for either of them. I think both parameters could + * safely be removed in the next major version bump. + */ void purple_privacy_allow(PurpleAccount *account, const char *who, gboolean local, gboolean restore) @@ -259,7 +265,7 @@ break; case PURPLE_PRIVACY_ALLOW_BUDDYLIST: if (!purple_find_buddy(account, who)) { - add_buddies_in_permit(account, local); + add_all_buddies_to_permit_list(account, local); purple_privacy_permit_add(account, who, local); account->perm_deny = PURPLE_PRIVACY_ALLOW_USERS; } @@ -269,6 +275,12 @@ } } +/* + * TODO: All callers of this function pass in FALSE for local and + * restore and I don't understand when you would ever want to + * use TRUE for either of them. I think both parameters could + * safely be removed in the next major version bump. + */ void purple_privacy_deny(PurpleAccount *account, const char *who, gboolean local, gboolean restore) @@ -298,7 +310,7 @@ break; case PURPLE_PRIVACY_ALLOW_BUDDYLIST: if (purple_find_buddy(account, who)) { - add_buddies_in_permit(account, local); + add_all_buddies_to_permit_list(account, local); purple_privacy_permit_remove(account, who, local); account->perm_deny = PURPLE_PRIVACY_ALLOW_USERS; }