mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
merge onion.c changes from new groupchats fork
This commit is contained in:
parent
5c1796d3c4
commit
f45807a0f2
|
@ -466,8 +466,9 @@ static int handle_send_2(void *object, IP_Port source, const uint8_t *packet, ui
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (plain[SIZE_IPPORT] != NET_PACKET_ANNOUNCE_REQUEST &&
|
const uint8_t packet_id = plain[SIZE_IPPORT];
|
||||||
plain[SIZE_IPPORT] != NET_PACKET_ONION_DATA_REQUEST) {
|
|
||||||
|
if (packet_id != NET_PACKET_ANNOUNCE_REQUEST && packet_id != NET_PACKET_ONION_DATA_REQUEST) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -514,8 +515,9 @@ static int handle_recv_3(void *object, IP_Port source, const uint8_t *packet, ui
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (packet[1 + RETURN_3] != NET_PACKET_ANNOUNCE_RESPONSE &&
|
const uint8_t packet_id = packet[1 + RETURN_3];
|
||||||
packet[1 + RETURN_3] != NET_PACKET_ONION_DATA_RESPONSE) {
|
|
||||||
|
if (packet_id != NET_PACKET_ANNOUNCE_RESPONSE && packet_id != NET_PACKET_ONION_DATA_RESPONSE) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -560,8 +562,9 @@ static int handle_recv_2(void *object, IP_Port source, const uint8_t *packet, ui
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (packet[1 + RETURN_2] != NET_PACKET_ANNOUNCE_RESPONSE &&
|
const uint8_t packet_id = packet[1 + RETURN_2];
|
||||||
packet[1 + RETURN_2] != NET_PACKET_ONION_DATA_RESPONSE) {
|
|
||||||
|
if (packet_id != NET_PACKET_ANNOUNCE_RESPONSE && packet_id != NET_PACKET_ONION_DATA_RESPONSE) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -606,8 +609,9 @@ static int handle_recv_1(void *object, IP_Port source, const uint8_t *packet, ui
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (packet[1 + RETURN_1] != NET_PACKET_ANNOUNCE_RESPONSE &&
|
const uint8_t packet_id = packet[1 + RETURN_1];
|
||||||
packet[1 + RETURN_1] != NET_PACKET_ONION_DATA_RESPONSE) {
|
|
||||||
|
if (packet_id != NET_PACKET_ANNOUNCE_RESPONSE && packet_id != NET_PACKET_ONION_DATA_RESPONSE) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user