thrasherbird.pl: Detect or configure Thrasher Perl library path.
[thrasher.git] / libpurple-patches / 01-oscar_xfer.patch
blobb71cae02d3556c239ede715d1fd5c9780f925cf3
1 libpurple/protocols/oscar: If file can't be OFT checksummed, do the FT anyway with broken resume.
3 diff a/pidgin/libpurple/protocols/oscar/oft.c b/pidgin/libpurple/protocols/oscar/oft.c
4 --- a/pidgin/libpurple/protocols/oscar/oft.c
5 +++ b/pidgin/libpurple/protocols/oscar/oft.c
6 @@ -77,7 +77,8 @@ void
7 peer_oft_checksum_destroy(ChecksumData *checksum_data)
9 checksum_data->conn->checksum_data = NULL;
10 - fclose(checksum_data->file);
11 + if (checksum_data->file)
12 + fclose(checksum_data->file);
13 if (checksum_data->timer > 0)
14 purple_timeout_remove(checksum_data->timer);
15 g_free(checksum_data);
16 @@ -207,6 +208,20 @@ peer_oft_checksum_file(PeerConnection *conn, PurpleXfer *xfer, GSourceFunc callb
17 checksum_data->callback = callback;
18 checksum_data->size = size;
19 checksum_data->checksum = 0xffff0000;
21 + if (xfer->dest_fp == NULL)
22 + {
23 + purple_debug_warning("oscar",
24 + "Checksumming UI-moderated stream"
25 + " not implemented: %s\n",
26 + purple_xfer_get_local_filename(xfer));
27 + checksum_data->file = NULL;
28 + if (checksum_data->callback != NULL)
29 + checksum_data->callback(checksum_data);
30 + peer_oft_checksum_destroy(checksum_data);
31 + return;
32 + }
34 checksum_data->file = fopen(purple_xfer_get_local_filename(xfer), "rb");
36 if (checksum_data->file == NULL)