Ignore:
Timestamp:
2005-12-15T12:24:25Z (18 years ago)
Author:
Jelmer Vernooij <jelmer@…>
Branches:
master
Children:
4146a07
Parents:
2983f5e (diff), bf02a67 (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:

Merge Wilmer

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/oscar/tlv.c

    r2983f5e rbd69a21  
    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.