pidgin: c05b5621: Tweak kartikmohta's patch a bit to use a...

rekkanoryo at pidgin.im rekkanoryo at pidgin.im
Thu Apr 7 21:45:54 EDT 2011


----------------------------------------------------------------------
Revision: c05b56215f08b3f5894d3c0cc75a0bb3b0f99725
Parent:   9b0e784ac3a47eb05dd2a6e58588e1ebb7cb5044
Author:   rekkanoryo at pidgin.im
Date:     04/07/11 21:21:15
Branch:   im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/c05b56215f08b3f5894d3c0cc75a0bb3b0f99725

Changelog: 

Tweak kartikmohta's patch a bit to use accessors instead of directly accessing
struct members, add the @since tag to the doxygen comment in the API addition,
and add the API addition to !ChangeLog.API.  Refs #1131.

Changes against parent 9b0e784ac3a47eb05dd2a6e58588e1ebb7cb5044

  patched  ChangeLog.API
  patched  libpurple/pounce.c
  patched  libpurple/pounce.h

-------------- next part --------------
============================================================
--- libpurple/pounce.c	0d8f82beab6a75843f750fd55694a513fd648c68
+++ libpurple/pounce.c	35c7889e2bc03380d3c1bbbd2e521a01fa1e8afe
@@ -697,13 +697,16 @@ purple_pounce_destroy_all_by_buddy(Purpl
 void
 purple_pounce_destroy_all_by_buddy(PurpleBuddy *buddy)
 {
-	const char *pouncee;
-	PurpleAccount *pouncer;
+	const char *pouncee, *bname;
+	PurpleAccount *pouncer, *bacct;
 	PurplePounce *pounce;
 	GList *l, *l_next;
 
 	g_return_if_fail(buddy != NULL);
 
+	bacct = purple_buddy_get_account(buddy);
+	bname = purple_buddy_get_name(buddy);
+
 	for (l = purple_pounces_get_all(); l != NULL; l = l_next) {
 		pounce = (PurplePounce *)l->data;
 		l_next = l->next;
@@ -711,7 +714,7 @@ purple_pounce_destroy_all_by_buddy(Purpl
 		pouncer = purple_pounce_get_pouncer(pounce);
 		pouncee = purple_pounce_get_pouncee(pounce);
 
-		if ( (pouncer == buddy->account) && (strcmp(pouncee, buddy->name) == 0) )
+		if ( (pouncer == bacct) && (strcmp(pouncee, bname) == 0) )
 			purple_pounce_destroy(pounce);
 	}
 }
============================================================
--- libpurple/pounce.h	02e83d22b0cd46ec88f4384654dfe7d5a6866b49
+++ libpurple/pounce.h	336cf169179e55c73d7eb54c44f85a18b3ad82b6
@@ -126,6 +126,8 @@ void purple_pounce_destroy_all_by_accoun
  * Destroys all buddy pounces for a buddy
  *
  * @param buddy The buddy whose pounces are to be removed
+ *
+ * @since 2.8.0
  */
 void purple_pounce_destroy_all_by_buddy(PurpleBuddy *buddy);
 
============================================================
--- ChangeLog.API	6f06ef113960920b8ea0a23bb68db81c42e0ffca
+++ ChangeLog.API	17812412b9bc07efeaaef9f2a28550ae2262091e
@@ -13,6 +13,7 @@ version 2.8.0 (??/??/????):
 		* purple_media_get_active_remote_candidates
 		* purple_media_manager_get_video_caps (Jakub Adam) (#13095)
 		* purple_media_manager_set_video_caps (Jakub Adam) (#13095)
+		* purple_pounce_destroy_all_by_buddy (Kartik Mohta) (#1131)
 		* Added add_buddy_with_invite to PurplePluginProtocolInfo
 		* Added add_buddies_with_invite to PurplePluginProtocolInfo
 		* Added PurpleSrvTxtQueryUiOps which allow UIs to specify their


More information about the Commits mailing list