Author: grothoff Date: 2008-02-24 01:07:49 -0700 (Sun, 24 Feb 2008) New Revision: 6433
Modified: GNUnet/src/applications/dht/tools/dhttest.c GNUnet/src/applications/dht/tools/dhttest2.c Log: compile errors Modified: GNUnet/src/applications/dht/tools/dhttest.c =================================================================== --- GNUnet/src/applications/dht/tools/dhttest.c 2008-02-24 07:59:13 UTC (rev 6432) +++ GNUnet/src/applications/dht/tools/dhttest.c 2008-02-24 08:07:49 UTC (rev 6433) @@ -68,7 +68,7 @@ struct GNUNET_TESTING_DaemonContext *peers; int ret = 0; GNUNET_HashCode key; - GNUNET_DataContainer *value; + char *value; struct GNUNET_GE_Context *ectx; struct GNUNET_GC_Configuration *cfg; struct GNUNET_ClientServerConnection *sock; @@ -140,12 +140,12 @@ GNUNET_hash (buf, 4, &key); value = GNUNET_malloc (8); - value->size = ntohl (8); - memset (&value[1], 'A' + i, 4); + memset (&value[1], 'A' + i, 8); CHECK (GNUNET_OK == GNUNET_DHT_put (cfg, ectx, &key, GNUNET_ECRS_BLOCKTYPE_DHT_STRING2STRING, + 8, value)); GNUNET_free (value); } Modified: GNUnet/src/applications/dht/tools/dhttest2.c =================================================================== --- GNUnet/src/applications/dht/tools/dhttest2.c 2008-02-24 07:59:13 UTC (rev 6432) +++ GNUnet/src/applications/dht/tools/dhttest2.c 2008-02-24 08:07:49 UTC (rev 6433) @@ -62,7 +62,7 @@ #endif int ret = 0; GNUNET_HashCode key; - GNUNET_DataContainer *value; + char *value; struct GNUNET_GE_Context *ectx; struct GNUNET_GC_Configuration *cfg; struct GNUNET_ClientServerConnection *sock; @@ -154,14 +154,14 @@ /* actual test code */ GNUNET_hash ("key2", 4, &key); value = GNUNET_malloc (8); - value->size = ntohl (8); - memset (&value[1], 'A', 4); + memset (&value[1], 'A', 8); printf ("Peer1 stores key2\n"); CHECK (GNUNET_OK == GNUNET_DHT_put (cfg, ectx, &key, GNUNET_ECRS_BLOCKTYPE_DHT_STRING2STRING, - value)); + 8, + value)); printf ("Peer1 gets key2\n"); CHECK (1 == GNUNET_DHT_get (cfg, ectx, @@ -174,13 +174,13 @@ "localhost:12087"); GNUNET_hash ("key", 3, &key); value = GNUNET_malloc (8); - value->size = ntohl (8); - memset (&value[1], 'B', 4); + memset (&value[1], 'B', 8); printf ("Peer2 stores key.\n"); CHECK (GNUNET_OK == GNUNET_DHT_put (cfg, ectx, &key, GNUNET_ECRS_BLOCKTYPE_DHT_STRING2STRING, + 8, value)); printf ("Peer2 gets key.\n"); CHECK (1 == GNUNET_DHT_get (cfg, _______________________________________________ GNUnet-SVN mailing list GNUnet-SVN@gnu.org http://lists.gnu.org/mailman/listinfo/gnunet-svn