mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
m_addfriend triggerd m_callback_friendstatus with a friendid thats not returned yet from m_addfriend
This commit is contained in:
parent
6c2b2806d1
commit
851c52571f
|
@ -138,7 +138,7 @@ int m_addfriend(uint8_t *client_id, uint8_t *data, uint16_t length)
|
|||
for (i = 0; i <= numfriends; ++i) {
|
||||
if (friendlist[i].status == NOFRIEND) {
|
||||
DHT_addfriend(client_id);
|
||||
set_friend_status(i, FRIEND_ADDED);
|
||||
friendlist[i].status = FRIEND_ADDED;
|
||||
friendlist[i].crypt_connection_id = -1;
|
||||
friendlist[i].friend_request_id = -1;
|
||||
memcpy(friendlist[i].client_id, client_id, CLIENT_ID_SIZE);
|
||||
|
|
Loading…
Reference in New Issue
Block a user