changeset 5837:a48c338dff6c

[gaim-migrate @ 6268] Possibly fixed some misbehaving typing notification or buddy icon problems, but probably not the gaim-keeps-resending-icon-to-trillian thing (it's more of a trillian bug, really). Fixed a compile warning. Made the availablemsg not show up when people are no longer available. I got my excercise today by running from my computer to the mac downstairs and then back up here 20 times testing this. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Thu, 12 Jun 2003 04:20:08 +0000
parents 09f7f23dc83a
children 6aa7651c7c15
files src/protocols/oscar/oscar.c src/protocols/oscar/service.c
diffstat 2 files changed, 13 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/src/protocols/oscar/oscar.c	Thu Jun 12 03:27:58 2003 +0000
+++ b/src/protocols/oscar/oscar.c	Thu Jun 12 04:20:08 2003 +0000
@@ -1813,10 +1813,11 @@
 		bi->caps = caps;
 	bi->typingnot = FALSE;
 	bi->ico_informed = FALSE;
-	if (info->availablemsg) {
-		free(bi->availablemsg);
+	free(bi->availablemsg);
+	if (info->availablemsg)
 		bi->availablemsg = g_strdup(info->availablemsg);
-	}
+	else
+		bi->availablemsg = NULL;
 
 	/* Server stored icon stuff */
 	if (info->iconcsumlen) {
@@ -1852,6 +1853,7 @@
 
 static int gaim_parse_offgoing(aim_session_t *sess, aim_frame_t *fr, ...) {
 	GaimConnection *gc = sess->aux_data;
+	struct oscar_data *od = gc->proto_data;
 	va_list ap;
 	aim_userinfo_t *info;
 
@@ -1861,6 +1863,8 @@
 
 	serv_got_update(gc, info->sn, 0, 0, 0, 0, 0);
 
+	g_hash_table_remove(od->buddyinfo, normalize(info->sn));
+
 	return 1;
 }
 
--- a/src/protocols/oscar/service.c	Thu Jun 12 03:27:58 2003 +0000
+++ b/src/protocols/oscar/service.c	Thu Jun 12 04:20:08 2003 +0000
@@ -952,11 +952,13 @@
 	int ret = 0;
 	aim_rxcallback_t userfunc;
 	char *msg = NULL;
-	fu16_t id;
+	fu16_t type;
+	fu8_t number, length;
 
-	aimbs_get16(bs); /* 0x0002 */
-	aimbs_get16(bs); /* 0x0404 or 0x0407?  Maybe 0x04 and then a length? */
-	msg = aimbs_getstr(bs, aimbs_get16(bs));
+	type = aimbs_get16(bs); /* 0x0002 */
+	number = aimbs_get8(bs); /* 0x04 */
+	length = aimbs_get8(bs); /* the first length */
+	msg = aimbs_getstr(bs, aimbs_get16(bs)); /* the second length is just for the message */
 
 	if ((userfunc = aim_callhandler(sess, rx->conn, snac->family, snac->subtype)))
 		ret = userfunc(sess, rx, msg);