Mercurial > pidgin
changeset 2808:e79f30457998
[gaim-migrate @ 2821]
plug it in, plug it in
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Wed, 28 Nov 2001 05:30:13 +0000 |
parents | f01e6a425136 |
children | c479d54abc0a |
files | src/protocols/oscar/im.c src/protocols/oscar/rxqueue.c |
diffstat | 2 files changed, 8 insertions(+), 28 deletions(-) [+] |
line wrap: on
line diff
--- 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;
--- 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; }