Ignore:
Timestamp:
2005-12-13T21:20:34Z (18 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
ab4afba
Parents:
34759e6 (diff), b8ef1b1 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

AIM groupchat support, thanks to Hanji (Nelson Elhage)!

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/oscar/tlv.c

    r34759e6 r1aa0bb5  
    340340}
    341341
     342int aim_addtlvtochain_chatroom(aim_tlvlist_t **list, guint16 type, guint16 exchange, const char *roomname, guint16 instance)
     343{
     344        guint8 *buf;
     345        int buflen;
     346        aim_bstream_t bs;
     347
     348        buflen = 2 + 1 + strlen(roomname) + 2;
     349       
     350        if (!(buf = g_malloc(buflen)))
     351                return 0;
     352
     353        aim_bstream_init(&bs, buf, buflen);
     354
     355        aimbs_put16(&bs, exchange);
     356        aimbs_put8(&bs, strlen(roomname));
     357        aimbs_putraw(&bs, (guint8 *)roomname, strlen(roomname));
     358        aimbs_put16(&bs, instance);
     359
     360        aim_addtlvtochain_raw(list, type, aim_bstream_curpos(&bs), buf);
     361
     362        g_free(buf);
     363
     364        return 0;
     365}
     366
    342367/**
    343368 * aim_writetlvchain - Write a TLV chain into a data buffer.
Note: See TracChangeset for help on using the changeset viewer.