diff options
Diffstat (limited to 'toxcore/net_crypto.c')
-rw-r--r-- | toxcore/net_crypto.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/toxcore/net_crypto.c b/toxcore/net_crypto.c index 3049776f..b7e3ced7 100644 --- a/toxcore/net_crypto.c +++ b/toxcore/net_crypto.c | |||
@@ -704,10 +704,17 @@ static void receive_crypto(Net_Crypto *c) | |||
704 | CONN_ESTABLISHED; /* Connection status needs to be 3 for write_cryptpacket() to work. */ | 704 | CONN_ESTABLISHED; /* Connection status needs to be 3 for write_cryptpacket() to work. */ |
705 | write_cryptpacket(c, i, ((uint8_t *)&zero), sizeof(zero)); | 705 | write_cryptpacket(c, i, ((uint8_t *)&zero), sizeof(zero)); |
706 | c->crypto_connections[i].status = CONN_NOT_CONFIRMED; /* Set it to its proper value right after. */ | 706 | c->crypto_connections[i].status = CONN_NOT_CONFIRMED; /* Set it to its proper value right after. */ |
707 | } else { | ||
708 | /* This should not happen, timeout the connection if it does. */ | ||
709 | c->crypto_connections[i].status = CONN_TIMED_OUT; | ||
707 | } | 710 | } |
711 | } else { | ||
712 | /* This should not happen, timeout the connection if it does. */ | ||
713 | c->crypto_connections[i].status = CONN_TIMED_OUT; | ||
708 | } | 714 | } |
709 | } else if (id_packet(c->lossless_udp, | 715 | } else if (id_packet(c->lossless_udp, |
710 | c->crypto_connections[i].number) != -1) { // This should not happen, timeout the connection if it does. | 716 | c->crypto_connections[i].number) != -1) { |
717 | /* This should not happen, timeout the connection if it does. */ | ||
711 | c->crypto_connections[i].status = CONN_TIMED_OUT; | 718 | c->crypto_connections[i].status = CONN_TIMED_OUT; |
712 | } | 719 | } |
713 | } | 720 | } |