mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
Add a check (reported by Coverity)
This commit is contained in:
parent
7eca727ffd
commit
2aed4bb75e
|
@ -835,8 +835,8 @@ static int64_t send_lossless_packet(Net_Crypto *c, int crypt_connection_id, cons
|
||||||
|
|
||||||
if (send_data_packet_helper(c, crypt_connection_id, conn->recv_array.buffer_start, packet_num, data, length) == 0) {
|
if (send_data_packet_helper(c, crypt_connection_id, conn->recv_array.buffer_start, packet_num, data, length) == 0) {
|
||||||
Packet_Data *dt1 = NULL;
|
Packet_Data *dt1 = NULL;
|
||||||
get_data_pointer(&conn->send_array, &dt1, packet_num);
|
if (get_data_pointer(&conn->send_array, &dt1, packet_num) == 1)
|
||||||
dt1->time = temp_time;
|
dt1->time = temp_time;
|
||||||
} else {
|
} else {
|
||||||
conn->maximum_speed_reached = 1;
|
conn->maximum_speed_reached = 1;
|
||||||
LOGGER_ERROR("send_data_packet failed\n");
|
LOGGER_ERROR("send_data_packet failed\n");
|
||||||
|
|
Loading…
Reference in New Issue
Block a user