]> andersk Git - libfaim.git/commitdiff
- Mon Mar 26 16:08:45 PST 2001
authormid <mid>
Tue, 27 Mar 2001 00:17:47 +0000 (00:17 +0000)
committermid <mid>
Tue, 27 Mar 2001 00:17:47 +0000 (00:17 +0000)
  - Why didn't anyone tell me buddy-offgoing wasn't working?
    - *** REQUIRES CLIENT CHANGES... buddy-offgoing now passes a userinfo
          struct (its now identical to buddy-oncoming)

Also fixed mfaim..."fix" is a relative term...

CHANGES
src/buddylist.c
utils/faimtest/faimtest.c

diff --git a/CHANGES b/CHANGES
index 285949918c490f263a5d6ce6c6440884da61f8f1..c5fd6baa0cd734ee90118d5f49ab674032b9b532 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,11 @@
 
 No release numbers
 ------------------
+ -  Mon Mar 26 16:08:45 PST 2001
+  - Why didn't anyone tell me buddy-offgoing wasn't working?
+    - *** REQUIRES CLIENT CHANGES... buddy-offgoing now passes a userinfo
+          struct (its now identical to buddy-oncoming)
+
  - Mon Mar 26 15:57:41 PST 2001
   - Hrmph.
   - Debuglevel wasn't getting set properly by aim_session_init
index 6e3ae9c2264ce5cc936f9a52c12e9bf2eb9bb622..2c64a9b9d398b6e943c293d6154551fd99eafe8d 100644 (file)
@@ -7,8 +7,11 @@
  * user information structure.  Its close enough to run
  * through aim_extractuserinfo() however.
  *
+ * Although the offgoing notification contains no information,
+ * it is still in a format parsable by extractuserinfo.
+ *
  */
-static int oncoming(struct aim_session_t *sess, aim_module_t *mod, struct command_rx_struct *rx, aim_modsnac_t *snac, unsigned char *data, int datalen)
+static int buddychange(struct aim_session_t *sess, aim_module_t *mod, struct command_rx_struct *rx, aim_modsnac_t *snac, unsigned char *data, int datalen)
 {
   struct aim_userinfo_s userinfo;
   rxcallback_t userfunc;
@@ -21,24 +24,6 @@ static int oncoming(struct aim_session_t *sess, aim_module_t *mod, struct comman
   return 0;
 }
 
-/*
- * Offgoing Buddy notifications contain no useful
- * information other than the name it applies to.
- *
- */
-static int offgoing(struct aim_session_t *sess, aim_module_t *mod, struct command_rx_struct *rx, aim_modsnac_t *snac, unsigned char *data, int datalen)
-{
-  char sn[MAXSNLEN+1];
-  rxcallback_t userfunc;
-
-  strncpy(sn, (char *)data+1, (int)*data);
-
-  if ((userfunc = aim_callhandler(sess, rx->conn, snac->family, snac->subtype)))
-    return userfunc(sess, rx, sn);
-
-  return 0;
-}
-
 static int rights(struct aim_session_t *sess, aim_module_t *mod, struct command_rx_struct *rx, aim_modsnac_t *snac, unsigned char *data, int datalen)
 {
   rxcallback_t userfunc;
@@ -80,10 +65,8 @@ static int snachandler(struct aim_session_t *sess, aim_module_t *mod, struct com
 
   if (snac->subtype == 0x0003)
     return rights(sess, mod, rx, snac, data, datalen);
-  else if (snac->subtype == 0x000b)
-    return oncoming(sess, mod, rx, snac, data, datalen);
-  else if (snac->subtype == 0x000c)
-    return offgoing(sess, mod, rx, snac, data, datalen);
+  else if ((snac->subtype == 0x000b) || (snac->subtype == 0x000c))
+    return buddychange(sess, mod, rx, snac, data, datalen);
 
   return 0;
 }
index 2875afc1ba9635304a327253a3f02b69bfb374b6..44276c5183c47460747a4df87fd03e5708f1ebe3 100644 (file)
@@ -1472,15 +1472,25 @@ int faimtest_parse_oncoming(struct aim_session_t *sess, struct command_rx_struct
 
 int faimtest_parse_offgoing(struct aim_session_t *sess, struct command_rx_struct *command, ...)
 {
-  char *sn;
+  struct aim_userinfo_s *userinfo;
+   
   va_list ap;
-  
   va_start(ap, command);
-  sn = va_arg(ap, char *);
+  userinfo = va_arg(ap, struct aim_userinfo_s *);
   va_end(ap);
 
-  dvprintf("\n%s has left\n", sn);
-
+  dvprintf("%ld  %s is now offline (flags: %04x = %s%s%s%s%s%s%s%s) (caps = 0x%04x)\n",
+        time(NULL),
+        userinfo->sn, userinfo->flags,
+        (userinfo->flags&AIM_FLAG_UNCONFIRMED)?" UNCONFIRMED":"",
+        (userinfo->flags&AIM_FLAG_ADMINISTRATOR)?" ADMINISTRATOR":"",
+        (userinfo->flags&AIM_FLAG_AOL)?" AOL":"",
+        (userinfo->flags&AIM_FLAG_OSCAR_PAY)?" OSCAR_PAY":"",
+        (userinfo->flags&AIM_FLAG_FREE)?" FREE":"",
+        (userinfo->flags&AIM_FLAG_AWAY)?" AWAY":"",
+        (userinfo->flags&AIM_FLAG_UNKNOWN40)?" UNKNOWN40":"",
+        (userinfo->flags&AIM_FLAG_UNKNOWN80)?" UNKNOWN80":"",
+        userinfo->capabilities);
   return 1;
 }
 
This page took 0.118857 seconds and 5 git commands to generate.