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

Ensure save data unchanged after save and load #1215

Merged
merged 1 commit into from
Oct 16, 2018

Conversation

zugz
Copy link

@zugz zugz commented Sep 29, 2018

This change is Reviewable

@codecov
Copy link

codecov bot commented Sep 29, 2018

Codecov Report

Merging #1215 into master will increase coverage by 0.1%.
The diff coverage is 98.6%.

Impacted file tree graph

@@           Coverage Diff            @@
##           master   #1215     +/-   ##
========================================
+ Coverage    82.9%     83%   +0.1%     
========================================
  Files          82      82             
  Lines       14647   14692     +45     
========================================
+ Hits        12146   12200     +54     
+ Misses       2501    2492      -9
Impacted Files Coverage Δ
toxcore/onion_client.c 96% <100%> (ø) ⬆️
toxcore/DHT.c 76.7% <100%> (+0.1%) ⬆️
toxcore/Messenger.c 87% <100%> (+0.4%) ⬆️
auto_tests/save_load_test.c 98% <97.9%> (-0.6%) ⬇️
auto_tests/network_test.c 90.3% <0%> (-9.7%) ⬇️
toxcore/friend_connection.c 93.4% <0%> (-1.5%) ⬇️
toxcore/net_crypto.c 93.5% <0%> (-0.9%) ⬇️
toxcore/group.c 76% <0%> (-0.4%) ⬇️
toxcore/TCP_client.c 64.3% <0%> (-0.4%) ⬇️
... and 6 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 605dfe8...4dd86f1. Read the comment docs.

tox_get_savedata(*tox, buffer + extra);
tox_kill(*tox);

for (size_t i = 0; i < extra; i++) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

++i

auto_tests/save_load_test.c Show resolved Hide resolved
@@ -419,17 +419,6 @@ static bool client_add_priority(TCP_Client_Connection *con, const uint8_t *packe
return 1;
}

static void wipe_priority_list(TCP_Client_Connection *con)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs rebase on master?

@zugz
Copy link
Author

zugz commented Oct 10, 2018 via email

toxcore/DHT.c Outdated
@@ -2803,6 +2803,11 @@ uint32_t dht_size(const DHT *dht)
uint32_t numv4 = 0;
uint32_t numv6 = 0;

for (uint32_t i = 0; i < dht->loaded_num_nodes; ++i) {
numv4 += (net_family_is_ipv4(dht->loaded_nodes_list[i].ip_port.ip.family));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove extra () around function call.

auto_tests/save_load_test.c Show resolved Hide resolved
@iphydf iphydf merged commit 4dd86f1 into TokTok:master Oct 16, 2018
@robinlinden robinlinden modified the milestones: v0.2.x, v0.2.9 Jan 3, 2019
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants