aboutsummaryrefslogtreecommitdiff
path: root/libdino/src/service/jingle_file_transfers.vala
diff options
context:
space:
mode:
Diffstat (limited to 'libdino/src/service/jingle_file_transfers.vala')
-rw-r--r--libdino/src/service/jingle_file_transfers.vala7
1 files changed, 5 insertions, 2 deletions
diff --git a/libdino/src/service/jingle_file_transfers.vala b/libdino/src/service/jingle_file_transfers.vala
index a96c716a..e86f923c 100644
--- a/libdino/src/service/jingle_file_transfers.vala
+++ b/libdino/src/service/jingle_file_transfers.vala
@@ -103,7 +103,7 @@ public class JingleFileProvider : FileProvider, Object {
throw new FileReceiveError.DOWNLOAD_FAILED("Transfer data not available anymore");
}
try {
- jingle_file_transfer.accept(stream);
+ yield jingle_file_transfer.accept(stream);
} catch (IOError e) {
throw new FileReceiveError.DOWNLOAD_FAILED("Establishing connection did not work");
}
@@ -202,8 +202,11 @@ public class JingleFileSender : FileSender, Object {
if (stream == null) throw new FileSendError.UPLOAD_FAILED("No stream available");
JingleFileEncryptionHelper? helper = JingleFileHelperRegistry.instance.get_encryption_helper(file_transfer.encryption);
bool must_encrypt = helper != null && yield helper.can_encrypt(conversation, file_transfer);
+ // TODO(hrxi): Prioritization of transports (and resources?).
foreach (Jid full_jid in stream.get_flag(Presence.Flag.IDENTITY).get_resources(conversation.counterpart)) {
- // TODO(hrxi): Prioritization of transports (and resources?).
+ if (full_jid.equals(stream.get_flag(Bind.Flag.IDENTITY).my_jid)) {
+ continue;
+ }
if (!yield stream.get_module(Xep.JingleFileTransfer.Module.IDENTITY).is_available(stream, full_jid)) {
continue;
}