aboutsummaryrefslogtreecommitdiff
path: root/xmpp-vala/src/module
diff options
context:
space:
mode:
authorhrxi <hrrrxi@gmail.com>2019-08-06 16:45:48 +0200
committerhrxi <hrrrxi@gmail.com>2019-08-06 16:46:45 +0200
commite1c98a0fd94d0536c231ce79c2af63d891bf4c16 (patch)
treef3e420a1c7bf5d7ca4a676e199162b8a0c51067f /xmpp-vala/src/module
parent1b1fac0bb567d7e51423ac384fa37c2c0a41bc33 (diff)
downloaddino-e1c98a0fd94d0536c231ce79c2af63d891bf4c16.tar.gz
dino-e1c98a0fd94d0536c231ce79c2af63d891bf4c16.zip
Forgot to add outgoing Jingle SOCKS5 transfer
Diffstat (limited to 'xmpp-vala/src/module')
-rw-r--r--xmpp-vala/src/module/xep/0260_jingle_socks5_bytestreams.vala9
1 files changed, 8 insertions, 1 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 abe5e0a9..78f47cfb 100644
--- a/xmpp-vala/src/module/xep/0260_jingle_socks5_bytestreams.vala
+++ b/xmpp-vala/src/module/xep/0260_jingle_socks5_bytestreams.vala
@@ -159,6 +159,7 @@ class Parameters : Jingle.TransportParameters, Object {
public Gee.List<Candidate> local_candidates = new ArrayList<Candidate>();
public Gee.List<Candidate> remote_candidates = new ArrayList<Candidate>();
+ Jid local_full_jid;
Jid peer_full_jid;
bool remote_sent_selected_candidate = false;
@@ -182,6 +183,7 @@ class Parameters : Jingle.TransportParameters, Object {
this.local_dstaddr = calculate_dstaddr(sid, local_full_jid, peer_full_jid);
this.remote_dstaddr = remote_dstaddr ?? calculate_dstaddr(sid, peer_full_jid, local_full_jid);
+ this.local_full_jid = local_full_jid;
this.peer_full_jid = peer_full_jid;
}
public Parameters.create(Jid local_full_jid, Jid peer_full_jid, string sid) {
@@ -224,7 +226,12 @@ class Parameters : Jingle.TransportParameters, Object {
return transport;
}
public void on_transport_accept(StanzaNode transport) throws Jingle.IqError {
- throw new Jingle.IqError.BAD_REQUEST("blurb");
+ Parameters other = Parameters.parse(local_full_jid, peer_full_jid, transport);
+ if (other.sid != sid) {
+ throw new Jingle.IqError.BAD_REQUEST("invalid sid");
+ }
+ remote_candidates = other.remote_candidates;
+ remote_dstaddr = other.remote_dstaddr;
}
public void on_transport_info(StanzaNode transport) throws Jingle.IqError {
StanzaNode? candidate_error = transport.get_subnode("candidate-error", NS_URI);