aboutsummaryrefslogtreecommitdiff
path: root/xmpp-vala/src
diff options
context:
space:
mode:
authorfiaxh <git@lightrise.org>2021-04-09 19:04:24 +0200
committerfiaxh <git@lightrise.org>2021-04-09 22:23:56 +0200
commit5e11986838057a5cdbdf9d271316513da1bd4764 (patch)
treecca129e6de5250f9f9bca15c0cc0ea01ac467cb0 /xmpp-vala/src
parent09dc38f169745cb7697fdb969b9d4eb5e021e07a (diff)
downloaddino-5e11986838057a5cdbdf9d271316513da1bd4764.tar.gz
dino-5e11986838057a5cdbdf9d271316513da1bd4764.zip
Fix dtls pull_timeout_function, fix cyclic references
Diffstat (limited to 'xmpp-vala/src')
-rw-r--r--xmpp-vala/src/module/xep/0166_jingle/content.vala1
-rw-r--r--xmpp-vala/src/module/xep/0166_jingle/session.vala4
-rw-r--r--xmpp-vala/src/module/xep/0167_jingle_rtp/content_parameters.vala14
3 files changed, 11 insertions, 8 deletions
diff --git a/xmpp-vala/src/module/xep/0166_jingle/content.vala b/xmpp-vala/src/module/xep/0166_jingle/content.vala
index bce03a7b..67510c36 100644
--- a/xmpp-vala/src/module/xep/0166_jingle/content.vala
+++ b/xmpp-vala/src/module/xep/0166_jingle/content.vala
@@ -107,6 +107,7 @@ public class Xmpp.Xep.Jingle.Content : Object {
public void terminate(bool we_terminated, string? reason_name, string? reason_text) {
content_params.terminate(we_terminated, reason_name, reason_text);
+ transport_params.dispose();
foreach (ComponentConnection connection in component_connections.values) {
connection.terminate(we_terminated, reason_name, reason_text);
diff --git a/xmpp-vala/src/module/xep/0166_jingle/session.vala b/xmpp-vala/src/module/xep/0166_jingle/session.vala
index 2d359f01..5fe89415 100644
--- a/xmpp-vala/src/module/xep/0166_jingle/session.vala
+++ b/xmpp-vala/src/module/xep/0166_jingle/session.vala
@@ -210,9 +210,7 @@ public class Xmpp.Xep.Jingle.Session : Object {
}
public async void add_content(Content content) {
- content.session = this;
- this.contents_map[content.content_name] = content;
- contents.add(content);
+ insert_content(content);
StanzaNode content_add_node = new StanzaNode.build("jingle", NS_URI)
.add_self_xmlns()
diff --git a/xmpp-vala/src/module/xep/0167_jingle_rtp/content_parameters.vala b/xmpp-vala/src/module/xep/0167_jingle_rtp/content_parameters.vala
index c37c19cc..d6f1acd2 100644
--- a/xmpp-vala/src/module/xep/0167_jingle_rtp/content_parameters.vala
+++ b/xmpp-vala/src/module/xep/0167_jingle_rtp/content_parameters.vala
@@ -84,30 +84,34 @@ public class Xmpp.Xep.JingleRtp.Parameters : Jingle.ContentParameters, Object {
Jingle.DatagramConnection rtcp_datagram = (Jingle.DatagramConnection) content.get_transport_connection(2);
ulong rtcp_ready_handler_id = 0;
- rtcp_ready_handler_id = rtcp_datagram.notify["ready"].connect(() => {
+ rtcp_ready_handler_id = rtcp_datagram.notify["ready"].connect((rtcp_datagram, _) => {
this.stream.on_rtcp_ready();
- rtcp_datagram.disconnect(rtcp_ready_handler_id);
+ ((Jingle.DatagramConnection)rtcp_datagram).disconnect(rtcp_ready_handler_id);
rtcp_ready_handler_id = 0;
});
ulong rtp_ready_handler_id = 0;
- rtp_ready_handler_id = rtp_datagram.notify["ready"].connect(() => {
+ rtp_ready_handler_id = rtp_datagram.notify["ready"].connect((rtp_datagram, _) => {
this.stream.on_rtp_ready();
if (rtcp_mux) {
this.stream.on_rtcp_ready();
}
connection_ready();
- rtp_datagram.disconnect(rtp_ready_handler_id);
+ ((Jingle.DatagramConnection)rtp_datagram).disconnect(rtp_ready_handler_id);
rtp_ready_handler_id = 0;
});
- session.notify["state"].connect((obj, _) => {
+ ulong session_state_handler_id = 0;
+ session_state_handler_id = session.notify["state"].connect((obj, _) => {
Jingle.Session session2 = (Jingle.Session) obj;
if (session2.state == Jingle.Session.State.ENDED) {
if (rtcp_ready_handler_id != 0) rtcp_datagram.disconnect(rtcp_ready_handler_id);
if (rtp_ready_handler_id != 0) rtp_datagram.disconnect(rtp_ready_handler_id);
+ if (session_state_handler_id != 0) {
+ session2.disconnect(session_state_handler_id);
+ }
}
});