- Let Eric generate the hash if he wants.
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.
#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
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;
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);
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);
}