# HG changeset patch # User Elliott Sales de Andrade # Date 1260842732 0 # Node ID f56126c5aa44659611efbcb5ab131c20b1010a32 # Parent fee2d38d14bd6b47a6b9ddaac4feaaa6180536b3 Save PrivateEndpointData that we've received. I think this only applies to ourselves, so only check if it's our own UBX. This currently only makes use of the endpoint name and type. diff -r fee2d38d14bd -r f56126c5aa44 libpurple/protocols/msn/notification.c --- a/libpurple/protocols/msn/notification.c Tue Dec 15 01:42:24 2009 +0000 +++ b/libpurple/protocols/msn/notification.c Tue Dec 15 02:05:32 2009 +0000 @@ -1671,6 +1671,41 @@ msn_user_set_endpoint_data(user, id, &data); } + + /* Need to shortcut this check, probably... */ + if (user == user->userlist->session->user) { + for (epNode = xmlnode_get_child(payloadNode, "PrivateEndpointData"); + epNode; + epNode = xmlnode_get_next_twin(epNode)) { + MsnUserEndpoint *ep; + xmlnode *nameNode, *clientNode; + + /* + Endpoint Name + true/false + 1 + NLN + + */ + id = xmlnode_get_attrib(epNode, "id"); + ep = msn_user_get_endpoint_data(user, id); + + if (ep != NULL) { + nameNode = xmlnode_get_child(epNode, "EpName"); + if (nameNode != NULL) { + g_free(ep->name); + ep->name = xmlnode_get_data(nameNode); + } + + clientNode = xmlnode_get_child(epNode, "ClientType"); + if (clientNode != NULL) { + tmp = xmlnode_get_data(clientNode); + ep->type = strtoul(tmp, 10, NULL); + g_free(tmp); + } + } + } + } } /* diff -r fee2d38d14bd -r f56126c5aa44 libpurple/protocols/msn/user.c --- a/libpurple/protocols/msn/user.c Tue Dec 15 01:42:24 2009 +0000 +++ b/libpurple/protocols/msn/user.c Tue Dec 15 02:05:32 2009 +0000 @@ -243,6 +243,7 @@ free_user_endpoint(MsnUserEndpoint *data) { g_free(data->id); + g_free(data->name); g_free(data); } diff -r fee2d38d14bd -r f56126c5aa44 libpurple/protocols/msn/user.h --- a/libpurple/protocols/msn/user.h Tue Dec 15 01:42:24 2009 +0000 +++ b/libpurple/protocols/msn/user.h Tue Dec 15 02:05:32 2009 +0000 @@ -116,6 +116,8 @@ */ typedef struct MsnUserEndpoint { char *id; /**< The client's endpoint ID */ + char *name; /**< The client's endpoint's name */ + int type; /**< The client's endpoint type */ guint clientid; /**< The client's ID */ guint extcaps; /**< The client's extended capabilites */