Fix runtime criticals related to jingle file transfer

This commit is contained in:
fiaxh 2020-09-18 11:51:46 +02:00
parent d32d1b91a1
commit 6325a98cff
2 changed files with 6 additions and 2 deletions

View file

@ -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;
}
}

View file

@ -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 {