-fix uint16/uint32 confusion
authorChristian Grothoff <christian@grothoff.org>
Thu, 26 Sep 2013 09:32:18 +0000 (09:32 +0000)
committerChristian Grothoff <christian@grothoff.org>
Thu, 26 Sep 2013 09:32:18 +0000 (09:32 +0000)
src/gns/gns_api.c
src/gns/gnunet-service-gns.c

index 49d2246215aba693c71ce781259f6cab9a21d859..0963bdc5a86991cd35e7f5531d20ba1a8a9ce259 100644 (file)
@@ -572,7 +572,7 @@ GNUNET_GNS_lookup (struct GNUNET_GNS_Handle *handle,
   lookup_msg->type = htonl (type);
   if (NULL != shorten_zone_key)
   {
-    lookup_msg->have_key = htonl (GNUNET_YES);
+    lookup_msg->have_key = htons (GNUNET_YES);
     lookup_msg->shorten_key = *shorten_zone_key;
   }
   memcpy (&lookup_msg[1], name, strlen (name) + 1);
index 5838dc740a1e9efea0ae211f344e821a54a997ab..26000e9d4752f529b20455219e8c57e3b30cfb0c 100644 (file)
@@ -549,7 +549,7 @@ handle_lookup (void *cls,
   }
   sh_msg = (const struct GNUNET_GNS_ClientLookupMessage *) message;
   GNUNET_SERVER_notification_context_add (nc, client);
-  if (GNUNET_YES == ntohl (sh_msg->have_key))
+  if (GNUNET_YES == ntohs (sh_msg->have_key))
     key = &sh_msg->shorten_key;
   else
     key = NULL;