aboutsummaryrefslogtreecommitdiff
path: root/libdino/src/service/jingle_file_transfers.vala
diff options
context:
space:
mode:
authorfiaxh <git@lightrise.org>2021-03-19 23:07:40 +0100
committerfiaxh <git@lightrise.org>2021-03-21 12:41:39 +0100
commitcdb4d77259e6c361aaca64a483a43d7441f4803d (patch)
tree6db053f9f0875f54261f3f7e7d6830612076e29d /libdino/src/service/jingle_file_transfers.vala
parentef2e3c774cab82a94a5e34399f2013d64c3cf03b (diff)
downloaddino-cdb4d77259e6c361aaca64a483a43d7441f4803d.tar.gz
dino-cdb4d77259e6c361aaca64a483a43d7441f4803d.zip
Add support for unencrypted RTP calls to libdino
Co-authored-by: Marvin W <git@larma.de>
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;
}