From 4187e64892aacf13c1b0254a42eb0fb37594967c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franz=20Brau=C3=9Fe?= Date: Sun, 28 Jul 2019 21:22:28 +0200 Subject: [PATCH] src/message_client: fix resuming session: retrieve alice's device_id --- src/message_client.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/message_client.c b/src/message_client.c index 7e15ede..0f05ee1 100644 --- a/src/message_client.c +++ b/src/message_client.c @@ -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; @@ -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");