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:
xor2003 2014-10-24 16:03:29 +04:00
parent 69c9f68573
commit 7eca727ffd

View File

@ -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;