]> andersk Git - libfaim.git/commitdiff
- Fri Mar 23 01:45:28 UTC 2001
authormid <mid>
Fri, 23 Mar 2001 01:52:38 +0000 (01:52 +0000)
committermid <mid>
Fri, 23 Mar 2001 01:52:38 +0000 (01:52 +0000)
  - Add AIM_CLIENTINFO_KNOWNGOOD
  - Fix a few details in aim_send_login (thanks temas)
  - Prevent aim_rxhandlers from being called recursively
     - This is something that has been in my PENDING_AIM mailbox for over
       a year now.  I figured it was trivial enough to throw in.  EveryBuddy
       wanted it, but I don't remember why.  It should never happen anyway.
  - Use AIM_CLIENTINFO_KNOWNGOOD
     - This lets faimtest log in after today's round of AOL being mean.

CHANGES
include/aim.h
src/login.c
src/rxhandlers.c
utils/faimtest/faimtest.c

diff --git a/CHANGES b/CHANGES
index e58e4ac471a868b93c045d1691efd70a84a9e5d0..a0ab8aac50c63892a731488a76dd27b25717f6b6 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,16 @@
 
 No release numbers
 ------------------
+ - Fri Mar 23 01:45:28 UTC 2001
+  - Add AIM_CLIENTINFO_KNOWNGOOD
+  - Fix a few details in aim_send_login (thanks temas)
+  - Prevent aim_rxhandlers from being called recursively
+     - This is something that has been in my PENDING_AIM mailbox for over
+       a year now.  I figured it was trivial enough to throw in.  EveryBuddy
+       wanted it, but I don't remember why.  It should never happen anyway.
+  - Use AIM_CLIENTINFO_KNOWNGOOD
+     - This lets faimtest log in after today's round of AOL being mean.
+
  - Fri Mar 16 23:12:58 UTC 2001
   - Remove one level from aim_rxdispatch()
 
index 3cf4f13c243a32b972cedde59e3b31b421f985df..bad2b544d769b0093839fb1b2b05323e5bcf21a8 100644 (file)
@@ -169,6 +169,18 @@ struct client_info_s {
   long unknown;
 };
 
+#define AIM_CLIENTINFO_KNOWNGOOD { \
+  "AOL Instant Messenger (SM), version 3.5.1670/WIN32", \
+  0x0003, \
+  0x0005, \
+  0x0686, \
+  "us", \
+  "en", \
+  0x0004, \
+  0x0000, \
+  0x0000002a, \
+}
+
 #ifndef TRUE
 #define TRUE 1
 #define FALSE 0
index 392efe75677bc516a9c34c38e6d91c4026e135e0..6b06863dda35791bdf2398922919546f75c103a5 100644 (file)
@@ -137,6 +137,16 @@ faim_export int aim_request_login(struct aim_session_t *sess,
  *   lang = "en"
  *   country = "us"
  *   unknown4a = 0x01
+ *
+ * Latest WinAIM that libfaim can emulate without server-side buddylists:
+ *   clientstring = "AOL Instant Messenger (SM), version 3.5.1670/WIN32"
+ *   major2 = 0x0004
+ *   major =  0x0003
+ *   minor =  0x0005
+ *   minor2 = 0x0000
+ *   build =  0x0686
+ *   unknown =0x0000002a
+ *
  */
 faim_export int aim_send_login (struct aim_session_t *sess,
                                struct aim_conn_t *conn, 
@@ -185,6 +195,7 @@ faim_export int aim_send_login (struct aim_session_t *sess,
     curbyte += aim_puttlv_str(newpacket->data+curbyte, 0x0003, strlen(clientinfo->clientstring), clientinfo->clientstring);
 
   if (sess->flags & AIM_SESS_FLAGS_SNACLOGIN) {
+
     curbyte += aim_puttlv_16(newpacket->data+curbyte, 0x0016, (unsigned short)clientinfo->major2);
     curbyte += aim_puttlv_16(newpacket->data+curbyte, 0x0017, (unsigned short)clientinfo->major);
     curbyte += aim_puttlv_16(newpacket->data+curbyte, 0x0018, (unsigned short)clientinfo->minor);
@@ -193,7 +204,7 @@ faim_export int aim_send_login (struct aim_session_t *sess,
   
     curbyte += aim_puttlv_32(newpacket->data+curbyte, 0x0014, clientinfo->unknown);
     curbyte += aim_puttlv_16(newpacket->data+curbyte, 0x0009, 0x0015);
-    curbyte += aim_puttlv_8(newpacket->data+curbyte, 0x004a, 0x00);
+
   } else {
     /* Use very specific version numbers, to further indicate the hack. */
     curbyte += aim_puttlv_16(newpacket->data+curbyte, 0x0016, 0x010a);
@@ -205,14 +216,14 @@ faim_export int aim_send_login (struct aim_session_t *sess,
   }
 
   if (strlen(clientinfo->country))
-    curbyte += aim_puttlv_str(newpacket->data+curbyte, 0x000e, strlen(clientinfo->country), clientinfo->country);
+    curbyte += aim_puttlv_str(newpacket->data+curbyte, 0x000f, strlen(clientinfo->country), clientinfo->country);
   else
-    curbyte += aim_puttlv_str(newpacket->data+curbyte, 0x000e, 2, "us");
+    curbyte += aim_puttlv_str(newpacket->data+curbyte, 0x000f, 2, "us");
 
   if (strlen(clientinfo->lang))
-    curbyte += aim_puttlv_str(newpacket->data+curbyte, 0x000f, strlen(clientinfo->lang), clientinfo->lang);
+    curbyte += aim_puttlv_str(newpacket->data+curbyte, 0x000e, strlen(clientinfo->lang), clientinfo->lang);
   else
-    curbyte += aim_puttlv_str(newpacket->data+curbyte, 0x000f, 2, "en");
+    curbyte += aim_puttlv_str(newpacket->data+curbyte, 0x000e, 2, "en");
   
   newpacket->commandlen = curbyte;
 
index c0f09562fa81754db721df000271f8f6fa5b436b..2241f711bd38f462d32b73e52431f69b1e7a97d7 100644 (file)
@@ -308,10 +308,15 @@ faim_export int aim_rxdispatch(struct aim_session_t *sess)
 {
   int i = 0;
   struct command_rx_struct *workingPtr = NULL;
+  static int critical = 0;
   
+  if (critical)
+    return 0; /* don't call recursively! */
+
+  critical = 1;
+
   if (sess->queue_incoming == NULL) {
     faimdprintf(sess, 1, "parse_generic: incoming packet queue empty.\n");
-    return 0;
   } else {
     workingPtr = sess->queue_incoming;
     for (i = 0; workingPtr != NULL; workingPtr = workingPtr->next, i++) {
@@ -507,11 +512,6 @@ faim_export int aim_rxdispatch(struct aim_session_t *sess)
        workingPtr->handled = aim_callhandler_noparam(sess, workingPtr->conn, family, subtype, workingPtr);
 
       }
-
-      /* Try it raw and see if we can get it to happen... */
-      if (!workingPtr->handled) /* XXX this is probably bad. */
-       workingPtr->handled = aim_callhandler_noparam(sess, workingPtr->conn, family, subtype, workingPtr);
-
     }
   }
 
@@ -522,6 +522,8 @@ faim_export int aim_rxdispatch(struct aim_session_t *sess)
    * you'll have :)
    */
   aim_purge_rxqueue(sess);
+
+  critical = 0;
   
   return 0;
 }
index b43cb23d4c0379bb0c60dc4801be92568d449028..bccad2b92173fa4ba3241d19cb4a9ca7216ae949 100644 (file)
@@ -1570,7 +1570,7 @@ int faimtest_parse_misses(struct aim_session_t *sess, struct command_rx_struct *
 
 int faimtest_parse_login(struct aim_session_t *sess, struct command_rx_struct *command, ...)
 {
-  struct client_info_s info = {"faimtest (with SNAC login)", 4, 1, 2010, "us", "en", 0x0004, 0x0000, 0x0000004b}; /* 4.1.2010 */
+  struct client_info_s info = AIM_CLIENTINFO_KNOWNGOOD;
   char *key;
   va_list ap;
   
This page took 0.126601 seconds and 5 git commands to generate.