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: do proper groupchat cleanup on exit #2608

Closed
wants to merge 1 commit into from
Closed
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 @@
7dfcf534fb80fbd8337337f5aa9eaa120febc72386046c7ab0d5c7545e900657 /usr/local/bin/tox-bootstrapd
b6d4d3db464ec5bbc8b43b4f1186f6ffd1caf477c3bab0b2d61d3fe0788d1ebc /usr/local/bin/tox-bootstrapd
8 changes: 3 additions & 5 deletions toxcore/group_chats.c
Original file line number Diff line number Diff line change
Expand Up @@ -8270,7 +8270,7 @@
c->chats_index = i;

if (!realloc_groupchats(c, c->chats_index)) {
LOGGER_ERROR(chat->log, "Failed to reallocate groupchats array");
LOGGER_ERROR(c->messenger->log, "Failed to reallocate groupchats array");

Check warning on line 8273 in toxcore/group_chats.c

View check run for this annotation

Codecov / codecov/patch

toxcore/group_chats.c#L8273

Added line #L8273 was not covered by tests
}
}
}
Expand All @@ -8295,11 +8295,9 @@
continue;
}

if (group_can_handle_packets(chat)) {
send_gc_self_exit(chat, nullptr, 0);
if (gc_group_exit(c, chat, nullptr, 0) != 0) {
LOGGER_WARNING(c->messenger->log, "Failed to send group exit packet");

Check warning on line 8299 in toxcore/group_chats.c

View check run for this annotation

Codecov / codecov/patch

toxcore/group_chats.c#L8299

Added line #L8299 was not covered by tests
}

group_cleanup(c, chat);
}

networking_registerhandler(c->messenger->net, NET_PACKET_GC_LOSSY, nullptr, nullptr);
Expand Down
Loading