Mercurial > pidgin
changeset 30989:7bf659dbacee
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.
author | Elliott Sales de Andrade <qulogic@pidgin.im> |
---|---|
date | Thu, 02 Dec 2010 06:04:55 +0000 |
parents | fc6ecc8f1b34 |
children | 05b3fa3725a1 |
files | ChangeLog libpurple/protocols/msn/notification.c libpurple/protocols/msn/user.c libpurple/protocols/msn/user.h |
diffstat | 4 files changed, 26 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Thu Dec 02 05:21:50 2010 +0000 +++ b/ChangeLog Thu Dec 02 06:04:55 2010 +0000 @@ -30,6 +30,7 @@ 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:
--- a/libpurple/protocols/msn/notification.c Thu Dec 02 05:21:50 2010 +0000 +++ b/libpurple/protocols/msn/notification.c Thu Dec 02 06:04:55 2010 +0000 @@ -1558,6 +1558,7 @@ 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)) {
--- a/libpurple/protocols/msn/user.c Thu Dec 02 05:21:50 2010 +0000 +++ b/libpurple/protocols/msn/user.c Thu Dec 02 06:04:55 2010 +0000 @@ -305,6 +305,22 @@ } 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);
--- a/libpurple/protocols/msn/user.h Thu Dec 02 05:21:50 2010 +0000 +++ b/libpurple/protocols/msn/user.h Thu Dec 02 06:04:55 2010 +0000 @@ -286,6 +286,14 @@ 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.