diff options
author | fiaxh <git@lightrise.org> | 2020-09-18 11:51:46 +0200 |
---|---|---|
committer | fiaxh <git@lightrise.org> | 2020-09-19 11:16:22 +0200 |
commit | 6325a98cff72ecf7f58c6b29b5321f534e085766 (patch) | |
tree | 80dd44b6a7d248599cd1917c1000c32a00fcf57a | |
parent | d32d1b91a16178986ecf1edac83bcf7fbc126236 (diff) | |
download | dino-6325a98cff72ecf7f58c6b29b5321f534e085766.tar.gz dino-6325a98cff72ecf7f58c6b29b5321f534e085766.zip |
Fix runtime criticals related to jingle file transfer
-rw-r--r-- | libdino/src/service/jingle_file_transfers.vala | 6 | ||||
-rw-r--r-- | xmpp-vala/src/module/xep/0260_jingle_socks5_bytestreams.vala | 2 |
2 files changed, 6 insertions, 2 deletions
diff --git a/libdino/src/service/jingle_file_transfers.vala b/libdino/src/service/jingle_file_transfers.vala index 016939bf..3b2ca29b 100644 --- a/libdino/src/service/jingle_file_transfers.vala +++ b/libdino/src/service/jingle_file_transfers.vala @@ -218,7 +218,11 @@ public class JingleFileSender : FileSender, Object { throw new FileSendError.ENCRYPTION_FAILED("Should have created a precondition, but did not"); } } - yield stream.get_module(Xep.JingleFileTransfer.Module.IDENTITY).offer_file_stream(stream, full_jid, file_transfer.input_stream, file_transfer.server_file_name, file_meta.size, precondition_name, precondition_options); + try { + yield stream.get_module(Xep.JingleFileTransfer.Module.IDENTITY).offer_file_stream(stream, full_jid, file_transfer.input_stream, file_transfer.server_file_name, file_meta.size, precondition_name, precondition_options); + } catch (Error e) { + throw new FileSendError.UPLOAD_FAILED(@"offer_file_stream failed: $(e.message)"); + } return; } } diff --git a/xmpp-vala/src/module/xep/0260_jingle_socks5_bytestreams.vala b/xmpp-vala/src/module/xep/0260_jingle_socks5_bytestreams.vala index db2cd6a0..ea7ef375 100644 --- a/xmpp-vala/src/module/xep/0260_jingle_socks5_bytestreams.vala +++ b/xmpp-vala/src/module/xep/0260_jingle_socks5_bytestreams.vala @@ -292,7 +292,7 @@ class Parameters : Jingle.TransportParameters, Object { } remote_sent_selected_candidate = true; remote_selected_candidate = candidate; - debug("Remote selected candidate %s", candidate.cid); + debug("Remote selected candidate %s", candidate != null ? candidate.cid : "(null)"); try_completing_negotiation(); } private void handle_activated(string cid) throws Jingle.IqError { |