#define DEFAULT_NUM_PEERS 2
/* test records to resolve */
-#define TEST_DOMAIN "www.alicewonderland.bobbuilder.gnunet"
+#define TEST_DOMAIN "www.alicewonderland.bobbuilder.gads"
#define TEST_IP "127.0.0.1"
#define TEST_RECORD_NAME "www"
#define TEST_AUTHORITY_BOB "bobbuilder"
#define TEST_AUTHORITY_ALICE "alicewonderland"
#define TEST_PSEU_ALICE "carol"
-#define TEST_EXPECTED_RESULT "www.carol.short.private.gnunet"
+#define TEST_EXPECTED_RESULT "www.carol.short.private.gads"
#define DHT_OPERATION_TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 30)
die_task = GNUNET_SCHEDULER_add_now (&end_badly, NULL);
}
+static void shutdown_task (void *cls,
+ const struct GNUNET_SCHEDULER_TaskContext *tc)
+{
+ GNUNET_GNS_disconnect(gns_handle);
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Shutting down peer!\n");
+ GNUNET_SCHEDULER_shutdown ();
+}
+
/**
* Called when gns shorten finishes
*/
die_task = GNUNET_SCHEDULER_NO_TASK;
}
- if (NULL != gns_handle)
- {
- GNUNET_GNS_disconnect(gns_handle);
- gns_handle = NULL;
- }
-
if (NULL != dht_handle)
{
GNUNET_DHT_disconnect (dht_handle);
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "shorten test succeeded!\n");
}
- GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Shutting down peer!\n");
- GNUNET_SCHEDULER_shutdown ();
+ GNUNET_SCHEDULER_add_now (&shutdown_task, NULL);
}
GNUNET_DHT_put (dht_handle, &xor_hash,
0,
- GNUNET_DHT_RO_NONE,
+ GNUNET_DHT_RO_DEMULTIPLEX_EVERYWHERE,
GNUNET_BLOCK_TYPE_GNS_NAMERECORD,
rd_payload_length,
(char*)nrb,
GNUNET_DHT_put (dht_handle, &xor_hash,
0,
- GNUNET_DHT_RO_NONE,
+ GNUNET_DHT_RO_DEMULTIPLEX_EVERYWHERE,
GNUNET_BLOCK_TYPE_GNS_NAMERECORD,
rd_payload_length,
(char*)nrb,
strlen(TEST_AUTHORITY_ALICE) + 1;
GNUNET_DHT_put (dht_handle, &xor_hash,
0,
- GNUNET_DHT_RO_NONE,
+ GNUNET_DHT_RO_DEMULTIPLEX_EVERYWHERE,
GNUNET_BLOCK_TYPE_GNS_NAMERECORD,
rd_payload_length,
(char*)nrb,