changeset 30809:50d472b3d752

Fixed a bug I accidentally introduced in fb1ab831dedebf45ea50b6f87bfc00265a0115ef. We now have two different set_perm_deny()'s with different semantics (the ICQ one controls visibility, the AIM one, blocking), but purple_ssi_parselist() always called the ICQ one, no matter what is the current account. I've also changed the names of functions to make the distinction clearer.
author ivan.komarov@soc.pidgin.im
date Thu, 01 Jul 2010 18:56:17 +0000
parents ab7e28b1b478
children b8f47c07ca42 c5790044f32f
files libpurple/protocols/oscar/libaim.c libpurple/protocols/oscar/oscar.c libpurple/protocols/oscar/oscar.h libpurple/protocols/oscar/oscarcommon.h
diffstat 4 files changed, 13 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/oscar/libaim.c	Thu Jul 01 17:15:37 2010 +0000
+++ b/libpurple/protocols/oscar/libaim.c	Thu Jul 01 18:56:17 2010 +0000
@@ -25,6 +25,7 @@
  */
 
 #include "oscarcommon.h"
+#include "oscar.h"
 
 static PurplePluginProtocolInfo prpl_info =
 {
@@ -57,7 +58,7 @@
 	oscar_add_deny,			/* add_deny */
 	oscar_rem_permit,		/* rem_permit */
 	oscar_rem_deny,			/* rem_deny */
-	oscar_set_permit_deny,	/* set_permit_deny */
+	oscar_set_aim_permdeny,	/* set_permit_deny */
 	oscar_join_chat,		/* join_chat */
 	NULL,					/* reject_chat */
 	oscar_get_chat_name,	/* get_chat_name */
--- a/libpurple/protocols/oscar/oscar.c	Thu Jul 01 17:15:37 2010 +0000
+++ b/libpurple/protocols/oscar/oscar.c	Thu Jul 01 18:56:17 2010 +0000
@@ -4067,8 +4067,10 @@
 		return;
 	}
 
-	if (od->icq)
+	if (od->icq) {
+		/* Set visibility */
 		oscar_set_icq_permdeny(account);
+	}
 
 	/* Set the AIM-style away message for both AIM and ICQ accounts */
 	oscar_set_info_and_status(account, FALSE, NULL, TRUE, status);
@@ -4539,7 +4541,11 @@
 		} /* End of switch on curitem->type */
 	} /* End of for loop */
 
-	oscar_set_icq_permdeny(account);
+	if (od->icq) {
+		oscar_set_icq_permdeny(account);
+	} else {
+		oscar_set_aim_permdeny(gc);
+	}
 
 	/* Activate SSI */
 	/* Sending the enable causes other people to be able to see you, and you to see them */
@@ -5172,7 +5178,7 @@
 	return ret;
 }
 
-void oscar_set_permit_deny(PurpleConnection *gc) {
+void oscar_set_aim_permdeny(PurpleConnection *gc) {
 	PurpleAccount *account = purple_connection_get_account(gc);
 	OscarData *od = purple_connection_get_protocol_data(gc);
 
--- a/libpurple/protocols/oscar/oscar.h	Thu Jul 01 17:15:37 2010 +0000
+++ b/libpurple/protocols/oscar/oscar.h	Thu Jul 01 18:56:17 2010 +0000
@@ -1737,6 +1737,8 @@
 void oscar_auth_sendrequest_menu(PurpleBlistNode *node, gpointer ignored);
 void oscar_auth_recvrequest(PurpleConnection *gc, gchar *name, gchar *nick, gchar *reason);
 
+void oscar_set_aim_permdeny(PurpleConnection *gc);
+
 struct buddyinfo
 {
 	gboolean typingnot;
--- a/libpurple/protocols/oscar/oscarcommon.h	Thu Jul 01 17:15:37 2010 +0000
+++ b/libpurple/protocols/oscar/oscarcommon.h	Thu Jul 01 18:56:17 2010 +0000
@@ -77,7 +77,6 @@
 void oscar_add_deny(PurpleConnection *gc, const char *who);
 void oscar_rem_permit(PurpleConnection *gc, const char *who);
 void oscar_rem_deny(PurpleConnection *gc, const char *who);
-void oscar_set_permit_deny(PurpleConnection *gc);
 void oscar_join_chat(PurpleConnection *gc, GHashTable *data);
 char *oscar_get_chat_name(GHashTable *data);
 void oscar_chat_invite(PurpleConnection *gc, int id, const char *message, const char *name);