diff options
author | irungentoo <irungentoo@gmail.com> | 2013-09-28 17:19:32 -0400 |
---|---|---|
committer | irungentoo <irungentoo@gmail.com> | 2013-09-28 17:19:32 -0400 |
commit | 8adb34e6a9af2fcc48dca995a644bfff1374c283 (patch) | |
tree | 0909847d1b9ecfd3a8ab68755a9adefdbbdb99b3 /toxcore | |
parent | abd4278fc4da11bdcc04778884dc6d755ed53e9a (diff) |
Fixed possible bug.
Diffstat (limited to 'toxcore')
-rw-r--r-- | toxcore/Messenger.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/toxcore/Messenger.c b/toxcore/Messenger.c index 6728231d..c8d69494 100644 --- a/toxcore/Messenger.c +++ b/toxcore/Messenger.c | |||
@@ -1222,14 +1222,14 @@ void doFriends(Messenger *m) | |||
1222 | set_friend_status(m, i, FRIEND_CONFIRMED); | 1222 | set_friend_status(m, i, FRIEND_CONFIRMED); |
1223 | } | 1223 | } |
1224 | 1224 | ||
1225 | break; | 1225 | if (m->friendlist[i].ping_lastrecv + FRIEND_CONNECTION_TIMEOUT < temp_time) { |
1226 | } | 1226 | /* If we stopped recieving ping packets, kill it. */ |
1227 | crypto_kill(m->net_crypto, m->friendlist[i].crypt_connection_id); | ||
1228 | m->friendlist[i].crypt_connection_id = -1; | ||
1229 | set_friend_status(m, i, FRIEND_CONFIRMED); | ||
1230 | } | ||
1227 | 1231 | ||
1228 | if (m->friendlist[i].ping_lastrecv + FRIEND_CONNECTION_TIMEOUT < temp_time) { | 1232 | break; |
1229 | /* If we stopped recieving ping packets, kill it. */ | ||
1230 | crypto_kill(m->net_crypto, m->friendlist[i].crypt_connection_id); | ||
1231 | m->friendlist[i].crypt_connection_id = -1; | ||
1232 | set_friend_status(m, i, FRIEND_CONFIRMED); | ||
1233 | } | 1233 | } |
1234 | } | 1234 | } |
1235 | } | 1235 | } |