From: Nathan S. Evans Date: Wed, 5 Jan 2011 12:15:08 +0000 (+0000) Subject: Check for missing type, set to TEST block type if so (ANY should not be used) X-Git-Tag: initial-import-from-subversion-38251~19370 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=6d3e206b41bee6ed6443c81874c39b872b1f04bc;p=oweals%2Fgnunet.git Check for missing type, set to TEST block type if so (ANY should not be used) --- diff --git a/src/dht/gnunet-dht-get.c b/src/dht/gnunet-dht-get.c index 593009fa2..8bedc269e 100644 --- a/src/dht/gnunet-dht-get.c +++ b/src/dht/gnunet-dht-get.c @@ -171,6 +171,9 @@ run (void *cls, else if (verbose) fprintf (stderr, "Connected to DHT service!\n"); + if (query_type == GNUNET_BLOCK_TYPE_ANY) /* Type of data not set */ + query_type = GNUNET_BLOCK_TYPE_TEST; + GNUNET_CRYPTO_hash (query_key, strlen (query_key), &key); timeout = diff --git a/src/dht/gnunet-dht-put.c b/src/dht/gnunet-dht-put.c index 54c915c15..6bd9f9045 100644 --- a/src/dht/gnunet-dht-put.c +++ b/src/dht/gnunet-dht-put.c @@ -136,6 +136,9 @@ run (void *cls, fprintf (stderr, _("Connected to %s service!\n"), "DHT"); + if (query_type == GNUNET_BLOCK_TYPE_ANY) /* Type of data not set */ + query_type = GNUNET_BLOCK_TYPE_TEST; + GNUNET_CRYPTO_hash (query_key, strlen (query_key), &key); timeout =