Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: unlock correct dht_friend #2327

Merged
merged 1 commit into from
Aug 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion other/bootstrap_daemon/docker/tox-bootstrapd.sha256
Original file line number Diff line number Diff line change
@@ -1 +1 @@
02c5926fce8115710fd6493ff3d573c0f9ca218749e231084f846fa98b1172bc /usr/local/bin/tox-bootstrapd
d59fb1fec8d9a8ed4eabd956cfe43bfca70e444420b61ab575b8cb194c409d6e /usr/local/bin/tox-bootstrapd
2 changes: 1 addition & 1 deletion toxcore/DHT.c
Original file line number Diff line number Diff line change
Expand Up @@ -1790,7 +1790,7 @@ static void dht_friend_unlock(DHT_Friend *const dht_friend, uint32_t lock_token)
// find used slot
uint8_t lock_num;
for (lock_num = 0; lock_num < DHT_FRIEND_MAX_LOCKS; ++lock_num) {
if ((dht_friend->lock_flags & lock_token) > 0) {
if (((UINT32_C(1) << lock_num) & lock_token) > 0) {
break;
}
}
Expand Down