From a55b2de0863937cfe9c0fcbf41882b81f4c82c9c Mon Sep 17 00:00:00 2001 From: Matthias Wachs Date: Thu, 28 Mar 2013 15:24:59 +0000 Subject: [PATCH] change type --- src/hello/hello.c | 6 +++--- src/include/gnunet_hello_lib.h | 17 ++++++++--------- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/src/hello/hello.c b/src/hello/hello.c index 066c03d87..3f0f9dd54 100644 --- a/src/hello/hello.c +++ b/src/hello/hello.c @@ -111,11 +111,11 @@ struct GNUNET_HELLO_ParseUriContext */ uint16_t -GNUNET_HELLO_get_type (const struct GNUNET_MessageHeader *h) +GNUNET_HELLO_get_type (const struct GNUNET_HELLO_Message *h) { - if (GNUNET_MESSAGE_TYPE_HELLO == ntohs(h->type)) + if (GNUNET_MESSAGE_TYPE_HELLO == ntohs(h->header.type)) return GNUNET_MESSAGE_TYPE_HELLO; - if (GNUNET_MESSAGE_TYPE_FRIEND_HELLO == ntohs(h->type)) + if (GNUNET_MESSAGE_TYPE_FRIEND_HELLO == ntohs(h->header.type)) return GNUNET_MESSAGE_TYPE_FRIEND_HELLO; return 0; } diff --git a/src/include/gnunet_hello_lib.h b/src/include/gnunet_hello_lib.h index 897b84274..d62638c14 100644 --- a/src/include/gnunet_hello_lib.h +++ b/src/include/gnunet_hello_lib.h @@ -82,15 +82,6 @@ struct GNUNET_HELLO_Address }; -/** - * Return HELLO type - * - * @param h HELLO Message to test - * @param GNUNET_MESSAGE_TYPE_HELLO or GNUNET_MESSAGE_TYPE_FRIEND_HELLO or 0 on error - */ -uint16_t -GNUNET_HELLO_get_type (const struct GNUNET_MessageHeader *h); - /** * Allocate an address struct. * @@ -154,6 +145,14 @@ GNUNET_HELLO_address_get_size (const struct GNUNET_HELLO_Address *address); */ struct GNUNET_HELLO_Message; +/** + * Return HELLO type + * + * @param h HELLO Message to test + * @param GNUNET_MESSAGE_TYPE_HELLO or GNUNET_MESSAGE_TYPE_FRIEND_HELLO or 0 on error + */ +uint16_t +GNUNET_HELLO_get_type (const struct GNUNET_HELLO_Message *h); /** * Copy the given address information into -- 2.25.1