Mercurial > pidgin
changeset 6789:94b575afb77e
[gaim-migrate @ 7328]
Added msn_object_destroy. Missing symbols are bad, mmkay?
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Sun, 07 Sep 2003 23:58:43 +0000 |
parents | c1995194e3d1 |
children | 1aea5e6186bd |
files | src/protocols/msn/msn.c src/protocols/msn/msnobject.c |
diffstat | 2 files changed, 39 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/protocols/msn/msn.c Sun Sep 07 23:53:52 2003 +0000 +++ b/src/protocols/msn/msn.c Sun Sep 07 23:58:43 2003 +0000 @@ -642,6 +642,7 @@ msn_add_buddy(GaimConnection *gc, const char *name, GaimGroup *group) { MsnSession *session = gc->proto_data; + MsnGroup *msn_group = NULL; char *who; char outparams[MSN_BUF_LEN]; GSList *l; @@ -663,11 +664,23 @@ if (l != NULL) return; - g_snprintf(outparams, sizeof(outparams), - "FL %s %s", who, who); + if (group != NULL) + msn_group = msn_groups_find_with_name(session->groups, group->name); + + if (msn_group != NULL) + { + g_snprintf(outparams, sizeof(outparams), + "FL %s %s %d", who, who, msn_group_get_id(msn_group)); + } + else + { + g_snprintf(outparams, sizeof(outparams), + "FL %s %s", who, who); + } if (!msn_servconn_send_command(session->notification_conn, - "ADD", outparams)) { + "ADD", outparams)) + { gaim_connection_error(gc, _("Write error")); return; }
--- a/src/protocols/msn/msnobject.c Sun Sep 07 23:53:52 2003 +0000 +++ b/src/protocols/msn/msnobject.c Sun Sep 07 23:58:43 2003 +0000 @@ -76,6 +76,29 @@ return obj; } +void +msn_object_destroy(MsnObject *obj) +{ + g_return_if_fail(obj != NULL); + + if (obj->creator != NULL) + g_free(obj->creator); + + if (obj->location != NULL) + g_free(obj->location); + + if (obj->friendly != NULL) + g_free(obj->friendly); + + if (obj->sha1d != NULL) + g_free(obj->sha1d); + + if (obj->sha1c != NULL) + g_free(obj->sha1c); + + g_free(obj); +} + char * msn_object_to_string(const MsnObject *obj) {