Revision: 16389
Author: thekingant
Date: 2006-07-01 11:39:33 -0700 (Sat, 01 Jul 2006)
ViewCVS: http://svn.sourceforge.net/gaim/?rev=16389&view=rev
Log Message:
-----------
Backport SVN revision #16388 from HEAD to v2_0_0
Original commit message:
When moving a buddy on AIM, remove the buddy from the server list
before adding it to the new group (it used to be the other way
around).
The downside of this is that, if you're moving an ICQ buddy who
requires authorization, you'll have to rerequest authorization.
The upside of this is that it actually works, and moving an ICQ
buddy won't inadvertently delete them from your list.
ViewCVS Links:
-------------
http://svn.sourceforge.net/gaim/?rev=16388&view=rev
Modified Paths:
--------------
branches/v2_0_0/src/protocols/oscar/family_feedbag.c
branches/v2_0_0/src/protocols/oscar/oscar.h
Modified: branches/v2_0_0/src/protocols/oscar/family_feedbag.c
===================================================================
--- branches/v2_0_0/src/protocols/oscar/family_feedbag.c 2006-07-01 18:39:13 UTC (rev 16388)
+++ branches/v2_0_0/src/protocols/oscar/family_feedbag.c 2006-07-01 18:39:33 UTC (rev 16389)
@@ -456,14 +456,14 @@
* @param sn The name of the buddy.
* @return 1 if you are waiting for authorization; 0 if you are not
*/
-int aim_ssi_waitingforauth(struct aim_ssi_item *list, const char *gn, const char *sn)
+gboolean aim_ssi_waitingforauth(struct aim_ssi_item *list, const char *gn, const char *sn)
{
struct aim_ssi_item *cur = aim_ssi_itemlist_finditem(list, gn, sn, AIM_SSI_TYPE_BUDDY);
if (cur) {
if (aim_tlv_gettlv(cur->data, 0x0066, 1))
- return 1;
+ return TRUE;
}
- return 0;
+ return FALSE;
}
/**
@@ -945,10 +945,17 @@
*/
int aim_ssi_movebuddy(OscarData *od, const char *oldgn, const char *newgn, const char *sn)
{
- char *alias = aim_ssi_getalias(od->ssi.local, oldgn, sn);
- aim_ssi_addbuddy(od, sn, newgn, alias, NULL, NULL, aim_ssi_waitingforauth(od->ssi.local, oldgn, sn));
+ char *alias;
+ gboolean waitingforauth;
+
+ alias = aim_ssi_getalias(od->ssi.local, oldgn, sn);
+ waitingforauth = aim_ssi_waitingforauth(od->ssi.local, oldgn, sn);
+
aim_ssi_delbuddy(od, sn, oldgn);
+ aim_ssi_addbuddy(od, sn, newgn, alias, NULL, NULL, waitingforauth);
+
free(alias);
+
return 0;
}
Modified: branches/v2_0_0/src/protocols/oscar/oscar.h
===================================================================
--- branches/v2_0_0/src/protocols/oscar/oscar.h 2006-07-01 18:39:13 UTC (rev 16388)
+++ branches/v2_0_0/src/protocols/oscar/oscar.h 2006-07-01 18:39:33 UTC (rev 16389)
@@ -1144,7 +1144,7 @@
guint32 aim_ssi_getpresence(struct aim_ssi_item *list);
char *aim_ssi_getalias(struct aim_ssi_item *list, const char *gn, const char *sn);
char *aim_ssi_getcomment(struct aim_ssi_item *list, const char *gn, const char *sn);
-int aim_ssi_waitingforauth(struct aim_ssi_item *list, const char *gn, const char *sn);
+gboolean aim_ssi_waitingforauth(struct aim_ssi_item *list, const char *gn, const char *sn);
/* Client functions for changing SSI data */
int aim_ssi_addbuddy(OscarData *od, const char *name, const char *group, const char *alias, const char *comment, const char *smsnum, int needauth);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|