Skip to content

Instantly share code, notes, and snippets.

@zoff99
Created May 16, 2022 17:27
Show Gist options
  • Save zoff99/53bdb139df19493b92c05e7a0f86c362 to your computer and use it in GitHub Desktop.
Save zoff99/53bdb139df19493b92c05e7a0f86c362 to your computer and use it in GitHub Desktop.
void gc_save_pack_group(const GC_Chat *chat, Bin_Pack *bp)
{
if (chat->numpeers == 0) {
LOGGER_ERROR(chat->log, "Failed to pack group: numpeers is 0");
return;
}
bin_pack_array(bp, 7);
// --------------------------------------
// HINT: dump chat struct with data
__builtin_dump_struct(chat, &printf);
// HINT: dump chat struct with data
// --------------------------------------
save_pack_state_values(chat, bp); // 1
save_pack_state_bin(chat, bp); // 2
save_pack_topic_info(chat, bp); // 3
save_pack_mod_list(chat, bp); // 4
save_pack_keys(chat, bp); // 5
save_pack_self_info(chat, bp); // 6
save_pack_saved_peers(chat, bp); // 7
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment