aboutsummaryrefslogtreecommitdiff
path: root/xmpp-vala/src/module/xep/0260_jingle_socks5_bytestreams.vala
diff options
context:
space:
mode:
authorMarvin W <git@larma.de>2019-09-10 20:56:00 +0200
committerMarvin W <git@larma.de>2019-09-16 23:31:11 +0200
commite899668213ee8f7d3566bb5754b488d8633c30c7 (patch)
tree30119a9068abed58ad692de8fcf5723c6e441de8 /xmpp-vala/src/module/xep/0260_jingle_socks5_bytestreams.vala
parent87d64524c8e4397515be045901427e71b660134f (diff)
downloaddino-e899668213ee8f7d3566bb5754b488d8633c30c7.tar.gz
dino-e899668213ee8f7d3566bb5754b488d8633c30c7.zip
Add JET support
Diffstat (limited to 'xmpp-vala/src/module/xep/0260_jingle_socks5_bytestreams.vala')
-rw-r--r--xmpp-vala/src/module/xep/0260_jingle_socks5_bytestreams.vala7
1 files changed, 7 insertions, 0 deletions
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 a5eb1250..991ea141 100644
--- a/xmpp-vala/src/module/xep/0260_jingle_socks5_bytestreams.vala
+++ b/xmpp-vala/src/module/xep/0260_jingle_socks5_bytestreams.vala
@@ -287,6 +287,7 @@ class Parameters : Jingle.TransportParameters, Object {
}
remote_sent_selected_candidate = true;
remote_selected_candidate = candidate;
+ debug("Remote selected candidate %s", candidate.cid);
try_completing_negotiation();
}
private void handle_activated(string cid) throws Jingle.IqError {
@@ -353,6 +354,7 @@ class Parameters : Jingle.TransportParameters, Object {
}
}
public async void wait_for_remote_activation(Candidate candidate, SocketConnection conn) {
+ debug("Waiting for remote activation of %s", candidate.cid);
waiting_for_activation_cid = candidate.cid;
waiting_for_activation_callback = wait_for_remote_activation.callback;
yield;
@@ -368,6 +370,7 @@ class Parameters : Jingle.TransportParameters, Object {
}
}
public async void connect_to_local_candidate(Candidate candidate) {
+ debug("Connecting to candidate %s", candidate.cid);
try {
SocketConnection conn = yield connect_to_socks5(candidate, local_dstaddr);
@@ -420,6 +423,7 @@ class Parameters : Jingle.TransportParameters, Object {
SocketClient socket_client = new SocketClient() { timeout=3 };
string address = @"[$(candidate.host)]:$(candidate.port)";
+ debug("Connecting to SOCKS5 server at %s", address);
size_t written;
size_t read;
@@ -500,6 +504,7 @@ class Parameters : Jingle.TransportParameters, Object {
local_determined_selected_candidate = true;
local_selected_candidate = candidate;
local_selected_candidate_conn = conn;
+ debug("Selected candidate %s", candidate.cid);
session.send_transport_info(stream, new StanzaNode.build("transport", NS_URI)
.add_self_xmlns()
.put_attribute("sid", sid)
@@ -522,6 +527,8 @@ class Parameters : Jingle.TransportParameters, Object {
.put_attribute("sid", sid)
.put_node(new StanzaNode.build("candidate-error", NS_URI))
);
+ // Try remote candidates
+ try_completing_negotiation();
}
public void create_transport_connection(XmppStream stream, Jingle.Session session) {
this.session = session;