mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
Don't send -1 bytes. There is such check everythere. But if we add it in side funciton the logic will change
This commit is contained in:
parent
69c9f68573
commit
7eca727ffd
|
@ -178,6 +178,9 @@ int send_data_request(Networking_Core *net, const Onion_Path *path, IP_Port dest
|
|||
uint8_t packet[ONION_MAX_PACKET_SIZE];
|
||||
len = create_onion_packet(packet, sizeof(packet), path, dest, request, len);
|
||||
|
||||
if (len == -1)
|
||||
return -1;
|
||||
|
||||
if (sendpacket(net, path->ip_port1, packet, len) != len)
|
||||
return -1;
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user