summaryrefslogtreecommitdiff
path: root/toxcore/Messenger.c
diff options
context:
space:
mode:
authorirungentoo <irungentoo@gmail.com>2013-09-21 19:27:53 -0400
committerirungentoo <irungentoo@gmail.com>2013-09-21 19:27:53 -0400
commite36f6c46d199164b52ee2b818c54a672394e71a9 (patch)
tree1aa9baa342a6d430e493df25cb0eff4070bda628 /toxcore/Messenger.c
parenta6abf007cbb62f0147dd136bffaa9197736b280f (diff)
Fixed bug.
Diffstat (limited to 'toxcore/Messenger.c')
-rw-r--r--toxcore/Messenger.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/toxcore/Messenger.c b/toxcore/Messenger.c
index e468a60a..f79d0891 100644
--- a/toxcore/Messenger.c
+++ b/toxcore/Messenger.c
@@ -1231,6 +1231,11 @@ void doInbound(Messenger *m)
1231 int friend_id = getfriend_id(m, public_key); 1231 int friend_id = getfriend_id(m, public_key);
1232 1232
1233 if (friend_id != -1) { 1233 if (friend_id != -1) {
1234 if (m_get_friend_connectionstatus(m, friend_id) == 1) {
1235 crypto_kill(m->net_crypto, inconnection);
1236 return;
1237 }
1238
1234 crypto_kill(m->net_crypto, m->friendlist[friend_id].crypt_connection_id); 1239 crypto_kill(m->net_crypto, m->friendlist[friend_id].crypt_connection_id);
1235 m->friendlist[friend_id].crypt_connection_id = 1240 m->friendlist[friend_id].crypt_connection_id =
1236 accept_crypto_inbound(m->net_crypto, inconnection, public_key, secret_nonce, session_key); 1241 accept_crypto_inbound(m->net_crypto, inconnection, public_key, secret_nonce, session_key);
@@ -1263,8 +1268,8 @@ void doMessenger(Messenger *m)
1263 1268
1264 do_DHT(m->dht); 1269 do_DHT(m->dht);
1265 do_net_crypto(m->net_crypto); 1270 do_net_crypto(m->net_crypto);
1266 doInbound(m);
1267 doFriends(m); 1271 doFriends(m);
1272 doInbound(m);
1268 do_allgroupchats(m); 1273 do_allgroupchats(m);
1269 LANdiscovery(m); 1274 LANdiscovery(m);
1270 1275