Improve logging on jingle file transfer failure
This commit is contained in:
parent
c77d80d7b5
commit
863d66b16e
|
@ -407,6 +407,7 @@ public class Xmpp.Xep.Jingle.Session : Object {
|
|||
|
||||
public void terminate(string? reason_name, string? reason_text, string? local_reason) {
|
||||
if (state == State.ENDED) return;
|
||||
debug("Jingle session %s terminated: %s; %s; %s", this.sid, reason_name ?? "-", reason_text ?? "-", local_reason ?? "-");
|
||||
|
||||
if (state == State.ACTIVE) {
|
||||
string reason_str;
|
||||
|
|
|
@ -105,9 +105,11 @@ public class Module : Jingle.ContentType, XmppStreamModule {
|
|||
yield io_stream.input_stream.close_async();
|
||||
yield io_stream.output_stream.splice_async(input_stream, OutputStreamSpliceFlags.CLOSE_SOURCE|OutputStreamSpliceFlags.CLOSE_TARGET);
|
||||
yield connection.terminate(true);
|
||||
} catch (Jingle.Error e) {
|
||||
session.terminate(Jingle.ReasonElement.FAILED_TRANSPORT, e.message, e.message);
|
||||
throw new Jingle.Error.GENERAL(@"couldn't create Jingle session: $(e.message)");
|
||||
} catch (Error e) {
|
||||
if (session != null) {
|
||||
session.terminate(Jingle.ReasonElement.FAILED_TRANSPORT, e.message, e.message);
|
||||
}
|
||||
throw new Jingle.Error.GENERAL("Couldn't send file via Jingle: %s", e.message);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue