Mercurial > pidgin
diff libpurple/protocols/oscar/family_icbm.c @ 22856:ab2322195dab
Minor changes... mostly whitespace related.
Also changed some functions in family_admin.c to be void instead of
returning the same int every time, and fixed a tiny memleak in
family_admin.c. Oh, I think there was a variable in family_icbm.c
that was being redeclared inside of a block--functionally it was fine,
but it could have led to confusion.
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Mon, 05 May 2008 09:22:46 +0000 |
parents | 6f5f0a4de7f4 |
children | 9c0ee2491ed1 |
line wrap: on
line diff
--- a/libpurple/protocols/oscar/family_icbm.c Mon May 05 04:54:37 2008 +0000 +++ b/libpurple/protocols/oscar/family_icbm.c Mon May 05 09:22:46 2008 +0000 @@ -184,9 +184,9 @@ snacid = aim_cachesnac(od, 0x0004, 0x0002, 0x0000, NULL, 0); flap_connection_send_snac(od, conn, 0x0004, 0x0002, 0x0000, snacid, &bs); - + byte_stream_destroy(&bs); - + return 0; } @@ -520,7 +520,7 @@ aim_tlvlist_free(outer_tlvlist); flap_connection_send_snac(od, conn, 0x0004, 0x0006, 0x0000, snacid, &bs); - + byte_stream_destroy(&bs); return 0; @@ -592,7 +592,7 @@ flap_connection_send_snac(od, conn, 0x0004, 0x0006, 0x0000, snacid, &bs); byte_stream_destroy(&bs); - + return 0; } @@ -685,7 +685,7 @@ flap_connection_send_snac(od, conn, 0x0004, 0x0006, 0x0000, snacid, &bs); byte_stream_destroy(&bs); - + return 0; } @@ -728,7 +728,7 @@ aim_tlvlist_write(&hdrbs, &inner_tlvlist); aim_tlvlist_add_raw(&outer_tlvlist, 0x0005, byte_stream_curpos(&hdrbs), hdrbs.data); - g_free(hdrbs.data); + byte_stream_destroy(&hdrbs); aim_tlvlist_write(&bs, &outer_tlvlist); @@ -772,7 +772,7 @@ flap_connection_send_snac(od, conn, 0x0004, 0x0006, 0x0000, snacid, &bs); - byte_stream_destroy(&bs); + byte_stream_destroy(&bs); } /** @@ -945,20 +945,20 @@ if (filename != NULL) { - ByteStream bs; + ByteStream inner_bs; /* Begin TLV t(2711) */ - byte_stream_new(&bs, 2+2+4+strlen(filename)+1); - byte_stream_put16(&bs, (numfiles > 1) ? 0x0002 : 0x0001); - byte_stream_put16(&bs, numfiles); - byte_stream_put32(&bs, size); + byte_stream_new(&inner_bs, 2+2+4+strlen(filename)+1); + byte_stream_put16(&inner_bs, (numfiles > 1) ? 0x0002 : 0x0001); + byte_stream_put16(&inner_bs, numfiles); + byte_stream_put32(&inner_bs, size); /* Filename - NULL terminated, for some odd reason */ - byte_stream_putstr(&bs, filename); - byte_stream_put8(&bs, 0x00); - - aim_tlvlist_add_raw(&inner_tlvlist, 0x2711, bs.len, bs.data); - byte_stream_destroy(&bs); + byte_stream_putstr(&inner_bs, filename); + byte_stream_put8(&inner_bs, 0x00); + + aim_tlvlist_add_raw(&inner_tlvlist, 0x2711, inner_bs.len, inner_bs.data); + byte_stream_destroy(&inner_bs); /* End TLV t(2711) */ } @@ -1163,7 +1163,7 @@ flap_connection_send_snac(od, conn, 0x0004, 0x0006, 0x0000, snacid, &bs); byte_stream_destroy(&bs); - + return 0; } @@ -1232,7 +1232,7 @@ flap_connection_send_snac(od, conn, 0x0004, 0x0006, 0x0000, snacid, &bs); byte_stream_destroy(&bs); - + return 0; } @@ -2339,7 +2339,7 @@ aim_tlvlist_free(tlvlist); flap_connection_send_snac(od, conn, 0x0004, 0x000b, 0x0000, snacid, &bs); - + byte_stream_destroy(&bs); return 0; @@ -2716,7 +2716,7 @@ flap_connection_send_snac(od, conn, 0x0004, 0x0014, 0x0000, snacid, &bs); byte_stream_destroy(&bs); - + return 0; }