diff options
author | alek900 <alek900@gmail.com> | 2013-08-11 13:02:02 +0200 |
---|---|---|
committer | alek900 <alek900@gmail.com> | 2013-08-11 13:02:02 +0200 |
commit | 851c52571f5024000ee17b7b41fb5ce69960104a (patch) | |
tree | 2b0d93824fa6085a5a3d6a863ec02e14a1975683 | |
parent | 6c2b2806d10881a4c44a47e877898e9de1cc63c9 (diff) |
m_addfriend triggerd m_callback_friendstatus with a friendid thats not returned yet from m_addfriend
-rw-r--r-- | core/Messenger.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/Messenger.c b/core/Messenger.c index 37ab5e2d..d340f5f8 100644 --- a/core/Messenger.c +++ b/core/Messenger.c | |||
@@ -138,7 +138,7 @@ int m_addfriend(uint8_t *client_id, uint8_t *data, uint16_t length) | |||
138 | for (i = 0; i <= numfriends; ++i) { | 138 | for (i = 0; i <= numfriends; ++i) { |
139 | if (friendlist[i].status == NOFRIEND) { | 139 | if (friendlist[i].status == NOFRIEND) { |
140 | DHT_addfriend(client_id); | 140 | DHT_addfriend(client_id); |
141 | set_friend_status(i, FRIEND_ADDED); | 141 | friendlist[i].status = FRIEND_ADDED; |
142 | friendlist[i].crypt_connection_id = -1; | 142 | friendlist[i].crypt_connection_id = -1; |
143 | friendlist[i].friend_request_id = -1; | 143 | friendlist[i].friend_request_id = -1; |
144 | memcpy(friendlist[i].client_id, client_id, CLIENT_ID_SIZE); | 144 | memcpy(friendlist[i].client_id, client_id, CLIENT_ID_SIZE); |