diff options
author | fiaxh <git@lightrise.org> | 2021-12-23 00:44:51 +0100 |
---|---|---|
committer | fiaxh <git@lightrise.org> | 2021-12-23 00:46:58 +0100 |
commit | d02c5bc55d4325de308a592e8980139aa0634215 (patch) | |
tree | 9cb91f86056dd29f863bd8e54580cccc625af60e /xmpp-vala/src/module/xep/0166_jingle/content.vala | |
parent | 1378224444b1862ac95783ac2bae7d25a0a8862d (diff) | |
parent | f0c7dd0682fec8d72c644d8e54896de7bdc40ddb (diff) | |
download | dino-d02c5bc55d4325de308a592e8980139aa0634215.tar.gz dino-d02c5bc55d4325de308a592e8980139aa0634215.zip |
Merge branch groupcalls
Diffstat (limited to 'xmpp-vala/src/module/xep/0166_jingle/content.vala')
-rw-r--r-- | xmpp-vala/src/module/xep/0166_jingle/content.vala | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/xmpp-vala/src/module/xep/0166_jingle/content.vala b/xmpp-vala/src/module/xep/0166_jingle/content.vala index b51bb26d..31d8f9fc 100644 --- a/xmpp-vala/src/module/xep/0166_jingle/content.vala +++ b/xmpp-vala/src/module/xep/0166_jingle/content.vala @@ -95,16 +95,27 @@ public class Xmpp.Xep.Jingle.Content : Object { } public void accept() { + if (state != State.PENDING) { + warning("accepting a non-pending content"); + return; + } state = State.WANTS_TO_BE_ACCEPTED; - session.accept_content(this); } public void reject() { + if (state != State.PENDING) { + warning("rejecting a non-pending content"); + return; + } session.reject_content(this); } public void terminate(bool we_terminated, string? reason_name, string? reason_text) { + if (state == State.PENDING) { + warning("terminating a pending call"); + return; + } content_params.terminate(we_terminated, reason_name, reason_text); transport_params.dispose(); @@ -137,7 +148,7 @@ public class Xmpp.Xep.Jingle.Content : Object { this.content_params.handle_accept(stream, this.session, this, content_node.description); } - private async void select_new_transport() { + public async void select_new_transport() { XmppStream stream = session.stream; Transport? new_transport = yield stream.get_module(Module.IDENTITY).select_transport(stream, transport.type_, transport_params.components, peer_full_jid, tried_transport_methods); if (new_transport == null) { |