diff src/protocols/oscar/im.c @ 5836:09f7f23dc83a

[gaim-migrate @ 6267] I think I've fixed the negative online time for real, now. Or, at least reduced the frequency of it happening. Also added the ability to see iChat's "available" messages. Sean, I ended up changing more than I thought I would have to, but that's partially because I like to change things a lot. If it conflicts or whatever feel free to back it out and I can re-patch it back in when you're done with your stuff. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Thu, 12 Jun 2003 03:27:58 +0000
parents 8ab1875e6d09
children 0878caaef952
line wrap: on
line diff
--- a/src/protocols/oscar/im.c	Wed Jun 11 22:46:38 2003 +0000
+++ b/src/protocols/oscar/im.c	Thu Jun 12 03:27:58 2003 +0000
@@ -1919,16 +1919,15 @@
 	 * with the TLVs read below, they are two different pieces.  The
 	 * userinfo block contains the number of TLVs that contain user
 	 * information, the rest are not even though there is no seperation.
-	 * aim_extractuserinfo() returns the number of bytes used by the
-	 * userinfo tlvs, so you can start reading the rest of them right
-	 * afterward.  
+	 * You can start reading the message TLVs after aim_info_extract() 
+	 * parses out the standard userinfo block.
 	 *
 	 * That also means that TLV types can be duplicated between the
 	 * userinfo block and the rest of the message, however there should
 	 * never be two TLVs of the same type in one block.
 	 * 
 	 */
-	aim_extractuserinfo(sess, bs, &userinfo);
+	aim_info_extract(sess, bs, &userinfo);
 
 	/*
 	 * From here on, its depends on what channel we're on.
@@ -1962,11 +1961,10 @@
 		aim_freetlvchain(&tlvlist);
 
 	} else {
-
-		faimdprintf(sess, 0, "icbm: ICBM received on an unsupported channel.  Ignoring.\n (chan = %04x)", channel);
+		faimdprintf(sess, 0, "icbm: ICBM received on an unsupported channel.  Ignoring.  (chan = %04x)\n", channel);
+	}
 
-		return 0;
-	}
+	aim_info_free(&userinfo);
 
 	return ret;
 }
@@ -2014,12 +2012,14 @@
 	while (aim_bstream_empty(bs)) {	
 
 		channel = aimbs_get16(bs);
-		aim_extractuserinfo(sess, bs, &userinfo);
+		aim_info_extract(sess, bs, &userinfo);
 		nummissed = aimbs_get16(bs);
 		reason = aimbs_get16(bs);
 
 		if ((userfunc = aim_callhandler(sess, rx->conn, snac->family, snac->subtype)))
 			 ret = userfunc(sess, rx, channel, &userinfo, nummissed, reason);
+
+		aim_info_free(&userinfo);
 	}
 
 	return ret;