soc.2010.icq-tlc: 0f5f9205: Fixed a bug I accidentally introduced in...

ivan.komarov at soc.pidgin.im ivan.komarov at soc.pidgin.im
Thu Jul 1 15:01:16 EDT 2010


----------------------------------------------------------------------
Revision: 0f5f92050db8d88246b01b4efa6f098cc264f144
Parent:   db7aee7fc078f9073a4f2c545f49ca3200871bb9
Author:   ivan.komarov at soc.pidgin.im
Date:     07/01/10 14:56:17
Branch:   im.pidgin.soc.2010.icq-tlc
URL: http://d.pidgin.im/viewmtn/revision/info/0f5f92050db8d88246b01b4efa6f098cc264f144

Changelog: 

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.

Changes against parent db7aee7fc078f9073a4f2c545f49ca3200871bb9

  patched  libpurple/protocols/oscar/libaim.c
  patched  libpurple/protocols/oscar/oscar.c
  patched  libpurple/protocols/oscar/oscar.h
  patched  libpurple/protocols/oscar/oscarcommon.h

-------------- next part --------------
============================================================
--- libpurple/protocols/oscar/oscar.c	fac7214208b1bfeac553fcb3f7d5db6016f267a7
+++ libpurple/protocols/oscar/oscar.c	5be8603cb2831b7a2e682678e174fd71a87a5939
@@ -4067,8 +4067,10 @@ oscar_set_status(PurpleAccount *account,
 		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 @@ static int purple_ssi_parselist(OscarDat
 		} /* 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 @@ char *oscar_status_text(PurpleBuddy *b)
 	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);
 
============================================================
--- libpurple/protocols/oscar/oscar.h	3a6a518e3fd6a58c23680094d57c2bb4f6ac78ee
+++ libpurple/protocols/oscar/oscar.h	6c6e6509db3d6c0d8306114503be73942701b62b
@@ -1737,6 +1737,8 @@ void oscar_auth_recvrequest(PurpleConnec
 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;
============================================================
--- libpurple/protocols/oscar/libaim.c	01b54961fcdc07ab86047966f1f0a83ee4bc4993
+++ libpurple/protocols/oscar/libaim.c	d7e13c0f5fc1b33af3710c5504025e4bc31c6c86
@@ -25,6 +25,7 @@
  */
 
 #include "oscarcommon.h"
+#include "oscar.h"
 
 static PurplePluginProtocolInfo prpl_info =
 {
@@ -57,7 +58,7 @@ static PurplePluginProtocolInfo prpl_inf
 	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 */
============================================================
--- libpurple/protocols/oscar/oscarcommon.h	76500e9ae086bdd06f0d9e5850ea8772ac819ae1
+++ libpurple/protocols/oscar/oscarcommon.h	0bc9985d11166bdfb5d992dae2a00784269e379e
@@ -77,7 +77,6 @@ void oscar_rem_deny(PurpleConnection *gc
 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);


More information about the Commits mailing list