Skip to content

Commit

Permalink
src/message_client: fix resuming session: retrieve alice's device_id
Browse files Browse the repository at this point in the history
  • Loading branch information
fbrausse committed Jul 28, 2019
1 parent 9ba4bb4 commit 4187e64
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/message_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ int main(void) {
axc_cleanup(ctx_b_p);
return EXIT_FAILURE;
}

addr_a.device_id = alice_id;

axc_buf * pt_buf_p;
Expand Down Expand Up @@ -183,6 +182,13 @@ int main(void) {
printf("session created on each side\n");
} else {
printf("session exists.\n");
uint32_t alice_id;
if (axc_get_device_id(ctx_a_p, &alice_id)) {
fprintf(stderr, "failed to retrieve alice's device_id\n");
axc_cleanup(ctx_b_p);
return EXIT_FAILURE;
}
addr_a.device_id = alice_id;
}
printf("now trying to ready to 'send' and 'receive' messages\n");

Expand Down

0 comments on commit 4187e64

Please sign in to comment.