-check return value
[oweals/gnunet.git] / src / gns / gnunet-service-gns.c
index 5ad992b779f8cdeee5e8da9f4e0f208080516325..50b370264939d9535f5c23e1dc20691ba334bdb4 100644 (file)
@@ -469,6 +469,8 @@ perform_dht_put (const struct GNUNET_CRYPTO_EcdsaPrivateKey *key,
                                         label,
                                         rd_public,
                                         rd_public_count);
+  if (NULL == block)
+    return NULL; /* whoops */
   block_size = ntohl (block->purpose.size)
     + sizeof (struct GNUNET_CRYPTO_EcdsaSignature)
     + sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey);
@@ -788,7 +790,7 @@ handle_lookup (void *cls,
                                     ntohl (sh_msg->type),
                                     name,
                                     key,
-                                    ntohl (sh_msg->only_cached),
+                                    (enum GNUNET_GNS_LocalOptions) ntohs (sh_msg->options),
                                     &send_lookup_response, clh);
   GNUNET_STATISTICS_update (statistics,
                             "Lookup attempts",