Mercurial > pidgin
comparison src/protocols/oscar/service.c @ 5892:da8939ad60b6
[gaim-migrate @ 6324]
Fixes a spelling mistake.
Fixes a rare possible-crash in oscar.
Shuffled some code around. I tend to do this a lot.
Attemped to fix the buddy icon infi-loop thing.
Sean, search for "81" in oscar.c
I commented that out. I'm pretty sure it will stop the
looping, but do you know why that's there? I don't really
understand when the server would send 0x81 as "flags," or
what it means.
Good night, moon.
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Sun, 15 Jun 2003 09:28:57 +0000 |
parents | 508adf90fbb9 |
children | a747e9e0e2cf |
comparison
equal
deleted
inserted
replaced
5891:58ea0597a856 | 5892:da8939ad60b6 |
---|---|
943 } | 943 } |
944 | 944 |
945 /* | 945 /* |
946 * Subtype 0x0021 - Receive our extended status | 946 * Subtype 0x0021 - Receive our extended status |
947 * | 947 * |
948 * This is used for MAC non-away "away" messages, and maybe ICQ extended status messages? | 948 * This is used for iChat's "available" messages, and maybe ICQ extended |
949 * It's also used to tell the client whether or not it needs to upload an SSI buddy icon... who engineers this stuff, anyway? | 949 * status messages? It's also used to tell the client whether or not it |
950 * needs to upload an SSI buddy icon... who engineers this stuff, anyway? | |
950 */ | 951 */ |
951 static int aim_parse_extstatus(aim_session_t *sess, aim_module_t *mod, aim_frame_t *rx, aim_modsnac_t *snac, aim_bstream_t *bs) | 952 static int aim_parse_extstatus(aim_session_t *sess, aim_module_t *mod, aim_frame_t *rx, aim_modsnac_t *snac, aim_bstream_t *bs) |
952 { | 953 { |
953 int ret = 0, i; | 954 int ret = 0; |
954 aim_rxcallback_t userfunc; | 955 aim_rxcallback_t userfunc; |
955 char *msg = NULL, *md5 = NULL; | |
956 fu16_t type; | 956 fu16_t type; |
957 fu8_t number, length, cached; | 957 fu8_t flags, length; |
958 | 958 |
959 type = aimbs_get16(bs); | 959 type = aimbs_get16(bs); |
960 flags = aimbs_get8(bs); | |
961 length = aimbs_get8(bs); | |
962 | |
960 if ((userfunc = aim_callhandler(sess, rx->conn, snac->family, snac->subtype))) { | 963 if ((userfunc = aim_callhandler(sess, rx->conn, snac->family, snac->subtype))) { |
961 switch (type) { | 964 switch (type) { |
962 case 0x0001: | 965 case 0x0000: |
963 case 0x0000: /* not sure what the difference between 1 and 0 is */ | 966 case 0x0001: { /* not sure what the difference between 1 and 0 is */ |
964 cached = aimbs_get8(bs); | 967 fu8_t *md5 = aimbs_getraw(bs, length); |
965 length = aimbs_get8(bs); | 968 ret = userfunc(sess, rx, type, flags, length, md5); |
966 md5 = aimbs_getraw(bs, length); | |
967 ret = userfunc(sess, rx, type, cached, length, md5); | |
968 free(md5); | 969 free(md5); |
969 break; | 970 } break; |
970 case 0x0002: | 971 case 0x0002: { |
971 number = aimbs_get8(bs); /* 0x04 */ | 972 /* there is a second length that is just for the message */ |
972 length = aimbs_get8(bs); /* the first length */ | 973 char *msg = aimbs_getstr(bs, aimbs_get16(bs)); |
973 msg = aimbs_getstr(bs, aimbs_get16(bs)); /* the second length is just for the message */ | |
974 ret = userfunc(sess, rx, msg); | 974 ret = userfunc(sess, rx, msg); |
975 free(msg); | 975 free(msg); |
976 break; | 976 } break; |
977 } | 977 } |
978 } | 978 } |
979 return ret; | 979 return ret; |
980 } | 980 } |
981 | 981 |