summaryrefslogtreecommitdiff
path: root/toxcore/onion_client.c
diff options
context:
space:
mode:
Diffstat (limited to 'toxcore/onion_client.c')
-rw-r--r--toxcore/onion_client.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/toxcore/onion_client.c b/toxcore/onion_client.c
index cffcb961..3036df8c 100644
--- a/toxcore/onion_client.c
+++ b/toxcore/onion_client.c
@@ -188,9 +188,16 @@ static int send_onion_packet_tcp_udp(const Onion_Client *onion_c, const Onion_Pa
188 return -1; 188 return -1;
189 189
190 return 0; 190 return 0;
191 } else { 191 } else if (path->ip_port1.ip.family == TCP_FAMILY) {
192 uint8_t packet[ONION_MAX_PACKET_SIZE];
193 int len = create_onion_packet_tcp(packet, sizeof(packet), path, dest, data, length);
192 194
193 return -1; //TODO: TCP 195 if (len == -1)
196 return -1;
197
198 return send_tcp_onion_request(onion_c->c, packet, len);
199 } else {
200 return -1;
194 } 201 }
195} 202}
196 203