Mercurial > pidgin.yaz
changeset 4763:c050edba7b83
[gaim-migrate @ 5081]
Yeah... I dunno. I guess this is some kind of improvement.
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Fri, 14 Mar 2003 06:13:48 +0000 |
parents | d3afaf6ce177 |
children | b0367d56b608 |
files | src/protocols/oscar/aim.h src/protocols/oscar/ft.c src/protocols/oscar/oscar.c |
diffstat | 3 files changed, 29 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/protocols/oscar/aim.h Fri Mar 14 04:47:37 2003 +0000 +++ b/src/protocols/oscar/aim.h Fri Mar 14 06:13:48 2003 +0000 @@ -996,7 +996,7 @@ struct aim_fileheader_t fh; }; -faim_export fu32_t aim_oft_checksum_chunk(const unsigned char *buffer, int bufferlen, fu32_t prevcheck); +faim_export fu32_t aim_oft_checksum_chunk(const fu8_t *buffer, int bufferlen, fu32_t prevcheck); faim_export fu32_t aim_oft_checksum_file(char *filename); faim_export int aim_handlerendconnect(aim_session_t *sess, aim_conn_t *cur); faim_export int aim_odc_send_typing(aim_session_t *sess, aim_conn_t *conn, int typing);
--- a/src/protocols/oscar/ft.c Fri Mar 14 04:47:37 2003 +0000 +++ b/src/protocols/oscar/ft.c Fri Mar 14 06:13:48 2003 +0000 @@ -113,7 +113,7 @@ * @param bufsize Size of buffer. * @param prevcheck Previous checksum. */ -faim_export fu32_t aim_oft_checksum_chunk(const unsigned char *buffer, int bufferlen, fu32_t prevcheck) +faim_export fu32_t aim_oft_checksum_chunk(const fu8_t *buffer, int bufferlen, fu32_t prevcheck) { fu32_t check = (prevcheck >> 16) & 0xffff, oldcheck; int i; @@ -144,7 +144,7 @@ if ((fd = fopen(filename, "rb"))) { int bytes; - char buffer[1024]; + fu8_t buffer[1024]; while ((bytes = fread(buffer, 1, 1024, fd))) checksum = aim_oft_checksum_chunk(buffer, bytes, checksum);
--- a/src/protocols/oscar/oscar.c Fri Mar 14 04:47:37 2003 +0000 +++ b/src/protocols/oscar/oscar.c Fri Mar 14 06:13:48 2003 +0000 @@ -833,6 +833,31 @@ static void oscar_xfer_cancel_send(struct gaim_xfer *xfer) { + struct gaim_connection *gc; + struct oscar_data *od; + struct oscar_xfer_data *xfer_data; + aim_conn_t *conn; + + debug_printf("AAA - in oscar_xfer_cancel_send\n"); + if (!(xfer_data = xfer->data)) + return; + + if ((conn = xfer_data->conn)) { + aim_session_t *sess; + if ((sess = conn->sessv)) + if (xfer_data->cookie && xfer->who) + aim_im_sendch2_sendfile_cancel(sess, xfer_data->cookie, xfer->who, AIM_CAPS_SENDFILE); + } + + g_free(xfer_data->clientip); + g_free(xfer_data->clientip2); + + if ((gc = xfer_data->gc)) + if ((od = gc->proto_data)) + od->file_transfers = g_slist_remove(od->file_transfers, xfer); + + g_free(xfer_data); + xfer->data = NULL; } static void @@ -843,7 +868,7 @@ struct oscar_xfer_data *xfer_data; aim_conn_t *conn; - debug_printf("AAA - in oscar_xfer_cancel\n"); + debug_printf("AAA - in oscar_xfer_cancel_recv\n"); if (!(xfer_data = xfer->data)) return;