mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
Possible bug fixed.
This commit is contained in:
parent
3c78aefce0
commit
beff2b6de6
|
@ -694,9 +694,8 @@ static void receive_crypto(Net_Crypto *c)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (id_packet(c->lossless_udp,
|
} else if (id_packet(c->lossless_udp,
|
||||||
c->crypto_connections[i].number) != -1) { // This should not happen, kill the connection if it does.
|
c->crypto_connections[i].number) != -1) { // This should not happen, timeout the connection if it does.
|
||||||
crypto_kill(c, i);
|
c->crypto_connections[i].status = CONN_TIMED_OUT;
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -717,14 +716,12 @@ static void receive_crypto(Net_Crypto *c)
|
||||||
c->crypto_connections[i].shared_key);
|
c->crypto_connections[i].shared_key);
|
||||||
c->crypto_connections[i].status = CONN_ESTABLISHED;
|
c->crypto_connections[i].status = CONN_ESTABLISHED;
|
||||||
} else {
|
} else {
|
||||||
/* This should not happen, kill the connection if it does. */
|
/* This should not happen, timeout the connection if it does. */
|
||||||
crypto_kill(c, i);
|
c->crypto_connections[i].status = CONN_TIMED_OUT;
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
} else if (id_packet(c->lossless_udp, c->crypto_connections[i].number) != -1) {
|
} else if (id_packet(c->lossless_udp, c->crypto_connections[i].number) != -1) {
|
||||||
/* This should not happen, kill the connection if it does. */
|
/* This should not happen, timeout the connection if it does. */
|
||||||
crypto_kill(c, i);
|
c->crypto_connections[i].status = CONN_TIMED_OUT;
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user