From cff8dd1f42b259641803eb0a60143ab93a0eaa0c Mon Sep 17 00:00:00 2001 From: Bart Polot Date: Wed, 9 Nov 2011 13:04:35 +0000 Subject: [PATCH] Fixed compilation error with new GNUNET_HELLO_Address --- src/dv/gnunet-service-dv.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/dv/gnunet-service-dv.c b/src/dv/gnunet-service-dv.c index 60745070c..50aac09cd 100644 --- a/src/dv/gnunet-service-dv.c +++ b/src/dv/gnunet-service-dv.c @@ -2452,6 +2452,7 @@ static size_t generate_hello_address (void *cls, size_t max, void *buf) { struct HelloContext *hello_context = cls; + struct GNUNET_HELLO_Address hello_address; char *addr_buffer; size_t offset; size_t size; @@ -2473,11 +2474,14 @@ generate_hello_address (void *cls, size_t max, void *buf) /* Copy the direct peer identity to buffer */ memcpy (&addr_buffer[offset], hello_context->direct_peer, sizeof (struct GNUNET_PeerIdentity)); + memset (&hello_address.peer, 0, sizeof (struct GNUNET_PeerIdentity)); + hello_address.address = addr_buffer; + hello_address.transport_name = "dv"; + hello_address.address_length = size; ret = - GNUNET_HELLO_add_address ("dv", + GNUNET_HELLO_add_address (&hello_address, GNUNET_TIME_relative_to_absolute - (GNUNET_TIME_UNIT_HOURS), addr_buffer, size, - buf, max); + (GNUNET_TIME_UNIT_HOURS), buf, max); hello_context->addresses_to_add--; -- 2.25.1