# HG changeset patch # User Elliott Sales de Andrade # Date 1291269895 0 # Node ID 7bf659dbaceeb84ac600ab62051c530d5e6b7ddd # Parent fc6ecc8f1b34a333e56719fb46ef5b91204a066c 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. diff -r fc6ecc8f1b34 -r 7bf659dbacee ChangeLog --- 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: diff -r fc6ecc8f1b34 -r 7bf659dbacee libpurple/protocols/msn/notification.c --- 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)) { diff -r fc6ecc8f1b34 -r 7bf659dbacee libpurple/protocols/msn/user.c --- 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); diff -r fc6ecc8f1b34 -r 7bf659dbacee libpurple/protocols/msn/user.h --- 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.