]> andersk Git - libfaim.git/commitdiff
- Tue Apr 24 17:36:03 PDT 2001
authormid <mid>
Wed, 25 Apr 2001 00:42:30 +0000 (00:42 +0000)
committermid <mid>
Wed, 25 Apr 2001 00:42:30 +0000 (00:42 +0000)
  - Let Eric generate the hash if he wants.

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

diff --git a/CHANGES b/CHANGES
index 5488d4b64543af3ccac73267547e2fd07c52cae6..263256313e1316ea2bad793533e59dea7b626143 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,9 @@
 
 No release numbers
 ------------------
+ - Tue Apr 24 17:36:03 PDT 2001
+  - Let Eric generate the hash if he wants.
+
  - Mon Apr 23 15:58:11 PDT 2001
   - On a clear day, you can see forever.
 
index 885dce620319772e693fe25e6b974534d27af724..5fd09ed560a20770b7b2a1bc18e3cc333db005f5 100644 (file)
@@ -659,7 +659,11 @@ faim_export int aim_oft_getfile_end(struct aim_session_t *sess, struct aim_conn_
 #define AIM_CAPS_SAVESTOCKS 0x80
 
 faim_export int aim_0002_000b(struct aim_session_t *sess, struct aim_conn_t *conn, const char *sn);
-faim_export int aim_sendmemblock(struct aim_session_t *sess, struct aim_conn_t *conn, unsigned long offset, unsigned long len, const unsigned char *buf);
+
+#define AIM_SENDMEMBLOCK_FLAG_ISREQUEST  0
+#define AIM_SENDMEMBLOCK_FLAG_ISHASH     1
+
+faim_export int aim_sendmemblock(struct aim_session_t *sess, struct aim_conn_t *conn, unsigned long offset, unsigned long len, const unsigned char *buf, unsigned char flag);
 
 #define AIM_GETINFO_GENERALINFO 0x00001
 #define AIM_GETINFO_AWAYMESSAGE 0x00003
index 7b36b97712df6d1f4fa549a40ed5eb35140da07a..e7c1f6657f09124b97b73a4c22896600552171f3 100644 (file)
@@ -763,7 +763,7 @@ static void dumpbox(struct aim_session_t *sess, unsigned char *buf, int len)
   return;
 }
 
-faim_export int aim_sendmemblock(struct aim_session_t *sess, struct aim_conn_t *conn, unsigned long offset, unsigned long len, const unsigned char *buf)
+faim_export int aim_sendmemblock(struct aim_session_t *sess, struct aim_conn_t *conn, unsigned long offset, unsigned long len, const unsigned char *buf, unsigned char flag)
 {
   struct command_tx_struct *tx;
   int i = 0;
@@ -779,7 +779,13 @@ faim_export int aim_sendmemblock(struct aim_session_t *sess, struct aim_conn_t *
   i = aim_putsnac(tx->data, 0x0001, 0x0020, 0x0000, sess->snac_nextid++);
   i += aimutil_put16(tx->data+i, 0x0010); /* md5 is always 16 bytes */
 
-  if (buf && (len > 0)) { /* use input buffer */
+  if ((flag == AIM_SENDMEMBLOCK_FLAG_ISHASH) &&
+      buf && (len == 0x10)) { /* we're getting a hash */
+
+    memcpy(tx->data+i, buf, 0x10);
+    i += 0x10;
+
+  } else if (buf && (len > 0)) { /* use input buffer */
     md5_state_t state;
 
     md5_init(&state);  
index b5d90767c359578d25a538ab4814ee3bd4215fca..f01d265a6840630f90204e0968c16c0e98af2feb 100644 (file)
@@ -881,13 +881,13 @@ static int faimtest_memrequest(struct aim_session_t *sess, struct command_rx_str
 
   if (aimbinarypath && (getaimdata(buf, len, offset, modname) == len)) {
 
-    aim_sendmemblock(sess, command->conn, offset, len, buf);
+    aim_sendmemblock(sess, command->conn, offset, len, buf, AIM_SENDMEMBLOCK_FLAG_ISREQUEST);
 
   } else {
 
     dvprintf("memrequest: unable to use AIM binary (\"%s/%s\"), sending defaults...\n", aimbinarypath, modname);
 
-    aim_sendmemblock(sess, command->conn, offset, len, NULL);
+    aim_sendmemblock(sess, command->conn, offset, len, NULL, AIM_SENDMEMBLOCK_FLAG_ISREQUEST);
 
   }
 
This page took 0.128585 seconds and 5 git commands to generate.