changeset 1959:741842331ceb

[gaim-migrate @ 1969] mickey mouse doesn't wear a shirt, donald duck doesn't wear pants. mickey is dating minnie, donald is dating daisy, and goofy has a kid. committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Mon, 04 Jun 2001 20:13:34 +0000
parents b71494004378
children db6f447a6d91
files doc/CREDITS libfaim/CHANGES libfaim/aim_internal.h libfaim/chatnav.c libfaim/login.c libfaim/misc.c src/oscar.c
diffstat 7 files changed, 100 insertions(+), 21 deletions(-) [+]
line wrap: on
line diff
--- a/doc/CREDITS	Mon Jun 04 19:12:26 2001 +0000
+++ b/doc/CREDITS	Mon Jun 04 20:13:34 2001 +0000
@@ -32,6 +32,10 @@
 
 Sean Egan
 	Lots of IRC things here and there.  Thanks, man =)
+Nathan Walp
+	A healthy amount of patches for the Jabber plugin
+Neil Sanchala
+	Wrote most of the Zephyr plugin
 	
 David Prater    <IM: dRaven43>          draven@tcsx.net   
 	Log and Colour Button Images
--- a/libfaim/CHANGES	Mon Jun 04 19:12:26 2001 +0000
+++ b/libfaim/CHANGES	Mon Jun 04 20:13:34 2001 +0000
@@ -1,6 +1,48 @@
 
 No release numbers
 ------------------
+ - Mon Jun  4 12:57:46 PDT 2001
+  - Fix chatnav.  Whoops.
+
+ - Mon Jun  4 12:45:18 PDT 2001
+  - Don't use snacid's for generic requests (gets around recent blocks)
+  - If they start doing snacid-based blocks again, an audit will have
+      to be done to see what WinAIM requests uses snacids for and what 
+      it leaves it blank for.  That will be tedious and I'm not going to 
+      do it. 
+
+ - Thu May 31 23:00:50 PDT 2001
+  - Store two hardcoded hashes in login.c.  Sigh.
+  - Add prototype for aim_callhandler_noparam in aim_internal.h
+
+ - Sat May 26 03:58:27 PDT 2001
+  - Aha! This is why I could never get icons to work before.
+  - Luckily the checksum is painfully simple.
+
+ - Sat May 26 01:37:39 PDT 2001
+  - So this is my big merge with the ActiveBuddy version...
+    - Remove use of tlvchains from IM parsing for better performance
+    - Add in buddy icon support
+    - Add support for sending UNICODE messages.
+  - Split up the more complicated options to aim_send_im into a structure
+      that is passed to aim_send_im_ext().  This makes it easier to send
+      simple messages, and only slightly harder to send complex ones.
+     - aim_send_im_ext() must be used if you're using buddy icons and/or you
+         are sending UNICODE messages.
+  - UNICODE is fully explained in commentary above aim_send_im_ext() in im.c.
+  - The ISO-8859-1 option is also added.  Use when necessary, to avoid making
+      WinAIM barf.
+  - This removes the msglen parameter to aim_send_im because that was only
+      needed to do UNICODE, which can now only be done by aim_send_im_ext.
+
+ - Wed May 23 18:05:46 PDT 2001
+  - I upgraded libtool.  Which broke the faimtest makefile.
+  - Parse locate rights
+  - You shouldn't ask so many questions, Eric.
+
+ - Wed May 16 12:48:13 PDT 2001
+  - Thanks Rob and Eric
+
  - Thu May 10 17:37:23 PDT 2001
   - I haven't had lunch yet.  What should I have?
 
--- a/libfaim/aim_internal.h	Mon Jun 04 19:12:26 2001 +0000
+++ b/libfaim/aim_internal.h	Mon Jun 04 20:13:34 2001 +0000
@@ -45,6 +45,7 @@
 faim_internal int general_modfirst(struct aim_session_t *sess, aim_module_t *mod);
 
 faim_internal unsigned long aim_genericreq_n(struct aim_session_t *, struct aim_conn_t *conn, u_short family, u_short subtype);
+faim_internal unsigned long aim_genericreq_n_snacid(struct aim_session_t *, struct aim_conn_t *conn, u_short family, u_short subtype);
 faim_internal unsigned long aim_genericreq_l(struct aim_session_t *, struct aim_conn_t *conn, u_short family, u_short subtype, u_long *);
 faim_internal unsigned long aim_genericreq_s(struct aim_session_t *, struct aim_conn_t *conn, u_short family, u_short subtype, u_short *);
 
@@ -61,6 +62,7 @@
 faim_internal int aim_tx_cleanqueue(struct aim_session_t *, struct aim_conn_t *);
 
 faim_internal aim_rxcallback_t aim_callhandler(struct aim_session_t *sess, struct aim_conn_t *conn, u_short family, u_short type);
+faim_internal int aim_callhandler_noparam(struct aim_session_t *sess, struct aim_conn_t *conn, u_short family, u_short type, struct command_rx_struct *ptr);
 
 /*
  * Generic SNAC structure.  Rarely if ever used.
--- a/libfaim/chatnav.c	Mon Jun 04 19:12:26 2001 +0000
+++ b/libfaim/chatnav.c	Mon Jun 04 20:13:34 2001 +0000
@@ -16,9 +16,8 @@
 faim_export unsigned long aim_chatnav_reqrights(struct aim_session_t *sess,
 						struct aim_conn_t *conn)
 {
-  aim_genericreq_n(sess, conn, 0x000d, 0x0002);
 
-  return sess->snac_nextid;
+  return aim_genericreq_n_snacid(sess, conn, 0x000d, 0x0002);
 }
 
 faim_export unsigned long aim_chatnav_clientready(struct aim_session_t *sess,
--- a/libfaim/login.c	Mon Jun 04 19:12:26 2001 +0000
+++ b/libfaim/login.c	Mon Jun 04 20:13:34 2001 +0000
@@ -809,21 +809,36 @@
 
   } else {
 
-    if ((offset != 0x00001004) || (len != 0x00000004))
-      faimdprintf(sess, 0, "sendmemblock: WARNING: sending bad hash... you will be disconnected soon...\n");
-
     /* 
-     * This data is correct for AIM 3.5.1670, offset 0x03ffffff, 
-     * length 0x03ffffff (invalid).
+     * This data is correct for AIM 3.5.1670.
      *
-     * Using this block is as close to "legal" as you can get without
+     * Using these blocks is as close to "legal" as you can get without
      * using an AIM binary.
      *
      */
-    i += aimutil_put32(tx->data+i, 0x1df8cbae);
-    i += aimutil_put32(tx->data+i, 0x5523b839);
-    i += aimutil_put32(tx->data+i, 0xa0e10db3);
-    i += aimutil_put32(tx->data+i, 0xa46d3b39);
+    if ((offset == 0x03ffffff) && (len == 0x03ffffff)) {
+
+#if 1 /* with "AnrbnrAqhfzcd" */
+      i += aimutil_put32(tx->data+i, 0x44a95d26);
+      i += aimutil_put32(tx->data+i, 0xd2490423);
+      i += aimutil_put32(tx->data+i, 0x93b8821f);
+      i += aimutil_put32(tx->data+i, 0x51c54b01);
+#else /* no filename */
+      i += aimutil_put32(tx->data+i, 0x1df8cbae);
+      i += aimutil_put32(tx->data+i, 0x5523b839);
+      i += aimutil_put32(tx->data+i, 0xa0e10db3);
+      i += aimutil_put32(tx->data+i, 0xa46d3b39);
+#endif
+
+    } else if ((offset == 0x00001000) && (len == 0x00000000)) {
+
+      i += aimutil_put32(tx->data+i, 0xd41d8cd9);
+      i += aimutil_put32(tx->data+i, 0x8f00b204);
+      i += aimutil_put32(tx->data+i, 0xe9800998);
+      i += aimutil_put32(tx->data+i, 0xecf8427e);
+
+    } else
+      faimdprintf(sess, 0, "sendmemblock: WARNING: unknown hash request\n");
 
   }
 
--- a/libfaim/misc.c	Mon Jun 04 19:12:26 2001 +0000
+++ b/libfaim/misc.c	Mon Jun 04 20:13:34 2001 +0000
@@ -558,12 +558,31 @@
 
   newpacket->lock = 1;
 
+  aim_putsnac(newpacket->data, family, subtype, 0x0000, 0x00000000);
+
+  aim_tx_enqueue(sess, newpacket);
+
+  return sess->snac_nextid;
+}
+
+faim_internal unsigned long aim_genericreq_n_snacid(struct aim_session_t *sess,
+						    struct aim_conn_t *conn, 
+						    unsigned short family, 
+						    unsigned short subtype)
+{
+  struct command_tx_struct *newpacket;
+
+  if (!(newpacket = aim_tx_new(sess, conn, AIM_FRAMETYPE_OSCAR, 0x0002, 10)))
+    return 0;
+
+  newpacket->lock = 1;
+
   aim_putsnac(newpacket->data, family, subtype, 0x0000, sess->snac_nextid);
-
   aim_cachesnac(sess, family, subtype, 0x0000, NULL, 0);
 
   aim_tx_enqueue(sess, newpacket);
-  return sess->snac_nextid;
+
+  return sess->snac_nextid++;
 }
 
 /*
@@ -587,14 +606,14 @@
 
   newpacket->lock = 1;
 
-  aim_putsnac(newpacket->data, family, subtype, 0x0000, sess->snac_nextid);
-  aim_cachesnac(sess, family, subtype, 0x0000, NULL, 0);
+  aim_putsnac(newpacket->data, family, subtype, 0x0000, 0x00000000);
 
   /* copy in data */
   newlong = htonl(*longdata);
   memcpy(&(newpacket->data[10]), &newlong, sizeof(u_long));
 
   aim_tx_enqueue(sess, newpacket);
+
   return sess->snac_nextid;
 }
 
@@ -615,14 +634,14 @@
 
   newpacket->lock = 1;
 
-  aim_putsnac(newpacket->data, family, subtype, 0x0000, sess->snac_nextid);
-  aim_cachesnac(sess, family, subtype, 0x0000, NULL, 0);
+  aim_putsnac(newpacket->data, family, subtype, 0x0000, 0x00000000);
 
   /* copy in data */
   newshort = htons(*shortdata);
   memcpy(&(newpacket->data[10]), &newshort, sizeof(u_short));
 
   aim_tx_enqueue(sess, newpacket);
+
   return sess->snac_nextid;
 }
 
@@ -664,8 +683,7 @@
   
   newpacket->lock = 1;
 
-  i = aim_putsnac(newpacket->data, 0x0004, 0x0002, 0x0000, sess->snac_nextid);
-  aim_cachesnac(sess, 0x0004, 0x0002, 0x0000, NULL, 0);
+  i = aim_putsnac(newpacket->data, 0x0004, 0x0002, 0x0000, 0x00000000);
 
   i += aimutil_put16(newpacket->data+i, 0x0000); 
   i += aimutil_put16(newpacket->data+i, 0x0000);
--- a/src/oscar.c	Mon Jun 04 19:12:26 2001 +0000
+++ b/src/oscar.c	Mon Jun 04 20:13:34 2001 +0000
@@ -2287,7 +2287,6 @@
 	struct gaim_connection *gc = sess->aux_data;
 	switch (command->conn->type) {
 	case AIM_CONN_TYPE_BOS:
-		sess->snac_nextid = 1;
 		aim_bos_ackrateresp(sess, command->conn);
 		aim_bos_reqpersonalinfo(sess, command->conn);
 		aim_bos_reqlocaterights(sess, command->conn);