# HG changeset patch # User Eric Warmenhoven # Date 1006925413 0 # Node ID e79f304579989029b571c84400cdc99d7dde6e57 # Parent f01e6a42513663b9bd4b3b92eba100f9ba06682d [gaim-migrate @ 2821] plug it in, plug it in committer: Tailor Script diff -r f01e6a425136 -r e79f30457998 src/protocols/oscar/im.c --- a/src/protocols/oscar/im.c Tue Nov 27 23:55:50 2001 +0000 +++ b/src/protocols/oscar/im.c Wed Nov 28 05:30:13 2001 +0000 @@ -953,30 +953,6 @@ return 0; } -/* - * - * This should use tlvlists, but doesn't for performance reasons. - * - * XXX support multipart IMs: - * - * 0004 0007 0000 8f08 d295 - * 0031 6520 3b7b f9fd - * 0001 - * 06 XXXX XXXX XXXX - * 0000 - * 0004 - * 0001 0002 0004 - * 0010 0004 0000 01a3 - * 0002 0004 3ab6 94fa - * 0003 0004 3b7b f85a - * 0002 003c - * 0501 0001 01 - * 0101 000a 0000 0000 3c48 544d 4c3e ASCII part - * ISO-8859 part: - * 0101 0016 0003 0000 6c6b 7364 6a6b 6c6a 676c a56b 3b73 646a 6b6a - * 0101 000b 0000 0000 3c2f 4854 4d4c 3e another ASCII part - * - */ static int incomingim_ch1(aim_session_t *sess, aim_module_t *mod, aim_frame_t *rx, aim_modsnac_t *snac, fu16_t channel, aim_userinfo_t *userinfo, aim_bstream_t *bs, fu8_t *cookie) { fu16_t type, length; diff -r f01e6a425136 -r e79f30457998 src/protocols/oscar/rxqueue.c --- a/src/protocols/oscar/rxqueue.c Tue Nov 27 23:55:50 2001 +0000 +++ b/src/protocols/oscar/rxqueue.c Wed Nov 28 05:30:13 2001 +0000 @@ -24,10 +24,10 @@ int ret; ret = recv(fd, ((unsigned char *)buf)+cur, left, 0); - if (ret == -1) + + /* Of course EOF is an error, only morons disagree with that. */ + if (ret <= 0) return -1; - else if (ret == 0) - return cur; cur += ret; left -= ret; @@ -396,7 +396,11 @@ * or we break. We must handle it just in case. */ if (aimbs_get8(&flaphdr) != 0x2a) { - faimdprintf(sess, 0, "FLAP framing disrupted"); + fu8_t start; + + aim_bstream_rewind(&flaphdr); + start = aimbs_get8(&flaphdr); + faimdprintf(sess, 0, "FLAP framing disrupted (0x%02x)", start); aim_conn_close(conn); return -1; }