Mercurial > pidgin
diff libpurple/protocols/oscar/tlv.c @ 29418:365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
bob007, salieff, and nops (these are their trac usernames). I have made
some minor tweaks to the patch, but these shouldn't be a problem. This patch
needs some TLC before we can merge it anywhere else; it adds API so it must
hit im.pidgin.pidgin.next.minor before hitting im.pidgin.pidgin. Refs #4508.
author | John Bailey <rekkanoryo@rekkanoryo.org> |
---|---|
date | Thu, 13 Nov 2008 17:04:53 +0000 |
parents | da3de0190be2 |
children | 11cb7f2bb6e8 |
line wrap: on
line diff
--- a/libpurple/protocols/oscar/tlv.c Thu Nov 13 09:00:45 2008 +0000 +++ b/libpurple/protocols/oscar/tlv.c Thu Nov 13 17:04:53 2008 +0000 @@ -407,10 +407,11 @@ * @param caps Bitfield of capability flags to send * @return The size of the value added. */ -int aim_tlvlist_add_caps(GSList **list, const guint16 type, const guint32 caps) +int aim_tlvlist_add_caps(GSList **list, const guint16 type, const guint32 caps, const gint32 customicon) { guint8 buf[256]; /* TODO: Don't use a fixed length buffer */ ByteStream bs; + guint8 *data; if (caps == 0) return 0; /* nothing there anyway */ @@ -418,6 +419,12 @@ byte_stream_init(&bs, buf, sizeof(buf)); byte_stream_putcaps(&bs, caps); + + /* adding of custom icon GUID */ + data = aim_get_custom_icon_data(customicon); + if (data != NULL) { + byte_stream_putraw(&bs, data, 16); + } return aim_tlvlist_add_raw(list, type, byte_stream_curpos(&bs), buf); }