]> andersk Git - libfaim.git/blobdiff - aim_rxhandlers.c
- Fri Dec 15 21:51:32 UTC 2000
[libfaim.git] / aim_rxhandlers.c
index c0a8c72d06aca1c7f35004a308ccbdc697cf5223..076f99bb0b1ad4778baa7f1e58f843aacf7dc073 100644 (file)
@@ -700,25 +700,22 @@ faim_internal int aim_parse_ratechange_middle(struct aim_session_t *sess, struct
 faim_internal int aim_parse_evilnotify_middle(struct aim_session_t *sess, struct command_rx_struct *command)
 {
   rxcallback_t userfunc = NULL;
-  int ret = 1, pos;
-  char *sn = NULL;
-
-  if(command->commandlen < 12) /* a warning level dec sends this */
-    return 1;
-
-  if ((pos = aimutil_get8(command->data+ 12)) > MAXSNLEN)
-    return 1;
+  int ret = 1;
+  int i;
+  unsigned short newevil;
+  struct aim_userinfo_s userinfo;
 
-  if(!(sn = (char *)calloc(1, pos+1)))
-    return 1;
+  i = 10;
+  newevil = aimutil_get16(command->data+10);
+  i += 2;
 
-  memcpy(sn, command->data+13, pos);
+  memset(&userinfo, 0, sizeof(struct aim_userinfo_s));
+  if (command->commandlen-i)
+    i += aim_extractuserinfo(command->data+i, &userinfo);
 
   if ((userfunc = aim_callhandler(command->conn, 0x0001, 0x0010)))
-    ret = userfunc(sess, command, sn);
+    ret = userfunc(sess, command, newevil, &userinfo);
   
-  free(sn);
-
   return ret;
 }
 
This page took 0.043081 seconds and 4 git commands to generate.