mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
If the path is a TCP one, the onion packet is sent with TCP.
This commit is contained in:
parent
bc4fe2c80d
commit
6311bf8747
|
@ -188,9 +188,16 @@ static int send_onion_packet_tcp_udp(const Onion_Client *onion_c, const Onion_Pa
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
} else {
|
} else if (path->ip_port1.ip.family == TCP_FAMILY) {
|
||||||
|
uint8_t packet[ONION_MAX_PACKET_SIZE];
|
||||||
|
int len = create_onion_packet_tcp(packet, sizeof(packet), path, dest, data, length);
|
||||||
|
|
||||||
return -1; //TODO: TCP
|
if (len == -1)
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
return send_tcp_onion_request(onion_c->c, packet, len);
|
||||||
|
} else {
|
||||||
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user