pidgin: 466913c8: Clear out the old list of endpoints when...

qulogic at pidgin.im qulogic at pidgin.im
Thu Dec 2 01:35:46 EST 2010


----------------------------------------------------------------------
Revision: 466913c83f3af67699061111c981570f06978200
Parent:   950bb2d6cc372cd809bb44f57c4c4c00e35b7495
Author:   qulogic at pidgin.im
Date:     12/02/10 01:04:55
Branch:   im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/466913c83f3af67699061111c981570f06978200

Changelog: 

Clear out the old list of endpoints when we receive a new one. This
will correct the "View Locations" list when we force a location to
sign out.

Changes against parent 950bb2d6cc372cd809bb44f57c4c4c00e35b7495

  patched  ChangeLog
  patched  libpurple/protocols/msn/notification.c
  patched  libpurple/protocols/msn/user.c
  patched  libpurple/protocols/msn/user.h

-------------- next part --------------
============================================================
--- ChangeLog	2dac3780b4e5209cd93e69164fffba5036260f23
+++ ChangeLog	d914e68d5c36337630ca7f9c61c9236744bf8821
@@ -30,6 +30,7 @@ version 2.7.8 (??/??/????):
 	  characters. (#8508)
 	* Fix receiving messages from users on Yahoo and other federated
 	  services. (#13022)
+	* Correctly remove old endpoints when they sign out.
 
 version 2.7.7 (11/23/2010):
 	General:
============================================================
--- libpurple/protocols/msn/notification.c	5a39f1d359e101c46352fac9063a74a8d57b3645
+++ libpurple/protocols/msn/notification.c	692267ce554d0d283c69883b3196b3e1021eb18b
@@ -1558,6 +1558,7 @@ parse_user_endpoints(MsnUser *user, xmln
 
 	purple_debug_info("msn", "Get EndpointData\n");
 
+	msn_user_clear_endpoints(user);
 	for (epNode = xmlnode_get_child(payloadNode, "EndpointData");
 	     epNode;
 	     epNode = xmlnode_get_next_twin(epNode)) {
============================================================
--- libpurple/protocols/msn/user.c	23444d18f83fb88f405655478ee2691bbf83f218
+++ libpurple/protocols/msn/user.c	56ddf0cfb014c53a2d5cf3fd3b5ea9f53b63e9fe
@@ -305,6 +305,22 @@ void
 }
 
 void
+msn_user_clear_endpoints(MsnUser *user)
+{
+	MsnUserEndpoint *ep;
+	GSList *l;
+
+	g_return_if_fail(user != NULL);
+
+	for (l = user->endpoints; l; l = g_slist_delete_link(l, l)) {
+		ep = l->data;
+		free_user_endpoint(ep);
+	}
+
+	user->endpoints = NULL;
+}
+
+void
 msn_user_set_op(MsnUser *user, MsnListOp list_op)
 {
 	g_return_if_fail(user != NULL);
============================================================
--- libpurple/protocols/msn/user.h	d62321593f95c67e7ea21f2dcbd2fc9eab4771db
+++ libpurple/protocols/msn/user.h	186ba3b5c5bef9856611feaae28a6817e2ffaeb4
@@ -286,6 +286,14 @@ msn_user_set_endpoint_data(MsnUser *user
 msn_user_set_endpoint_data(MsnUser *user, const char *endpoint, MsnUserEndpoint *data);
 
 /**
+ * Clears all endpoint data for a user.
+ *
+ * @param user     The user.
+ */
+void
+msn_user_clear_endpoints(MsnUser *user);
+
+/**
  * Sets the client id for a user.
  *
  * @param user     The user.


More information about the Commits mailing list