mirror of
https://git.wownero.com/wownero/wownero-puddle.git
synced 2024-08-15 01:03:20 +00:00
fix hash item moved iteration
This commit is contained in:
parent
e4b6d1ffa2
commit
ff323609b9
1 changed files with 6 additions and 0 deletions
|
@ -1399,7 +1399,10 @@ accounts_moved(const void *items, size_t count)
|
||||||
e = s + count;
|
e = s + count;
|
||||||
pthread_rwlock_wrlock(&rwlock_acc);
|
pthread_rwlock_wrlock(&rwlock_acc);
|
||||||
while (s<e)
|
while (s<e)
|
||||||
|
{
|
||||||
HASH_REPLACE_STR(accounts, address, s, r);
|
HASH_REPLACE_STR(accounts, address, s, r);
|
||||||
|
s++;
|
||||||
|
}
|
||||||
pthread_rwlock_unlock(&rwlock_acc);
|
pthread_rwlock_unlock(&rwlock_acc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1411,7 +1414,10 @@ clients_moved(const void *items, size_t count)
|
||||||
e = s + count;
|
e = s + count;
|
||||||
pthread_rwlock_wrlock(&rwlock_cfd);
|
pthread_rwlock_wrlock(&rwlock_cfd);
|
||||||
while (s<e)
|
while (s<e)
|
||||||
|
{
|
||||||
HASH_REPLACE_INT(clients_by_fd, fd, s, r);
|
HASH_REPLACE_INT(clients_by_fd, fd, s, r);
|
||||||
|
s++;
|
||||||
|
}
|
||||||
pthread_rwlock_unlock(&rwlock_cfd);
|
pthread_rwlock_unlock(&rwlock_cfd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue