summaryrefslogtreecommitdiff
path: root/src/dht/gnunet-service-dht.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/dht/gnunet-service-dht.c')
-rw-r--r--src/dht/gnunet-service-dht.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/dht/gnunet-service-dht.c b/src/dht/gnunet-service-dht.c
index a2e0f4db7..c918a808a 100644
--- a/src/dht/gnunet-service-dht.c
+++ b/src/dht/gnunet-service-dht.c
@@ -779,10 +779,27 @@ void handle_core_connect (void *cls,
779 struct GNUNET_TIME_Relative latency, 779 struct GNUNET_TIME_Relative latency,
780 uint32_t distance) 780 uint32_t distance)
781{ 781{
782 int ret;
783 char *data;
784 size_t data_size = 42;
785 data = GNUNET_malloc (data_size);
786 memset (data, 43, data_size);
787
782#if DEBUG_DHT 788#if DEBUG_DHT
783 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 789 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
784 "%s:%s Receives core connect message for peer %s distance %d!\n", my_short_id, "dht", GNUNET_i2s(peer), distance); 790 "%s:%s Receives core connect message for peer %s distance %d!\n", my_short_id, "dht", GNUNET_i2s(peer), distance);
785#endif 791#endif
792 if (datacache != NULL)
793 {
794 ret = GNUNET_DATACACHE_put (datacache, &peer->hashPubKey, data_size,
795 data, 130,
796 GNUNET_TIME_absolute_add (GNUNET_TIME_absolute_get(),
797 GNUNET_TIME_UNIT_MINUTES));
798#if DEBUG_DHT
799 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
800 "%s Inserting data %s, type %d into datacache, return value was %d\n", my_short_id, GNUNET_h2s(&peer->hashPubKey), 130, ret);
801#endif
802 }
786} 803}
787 804
788/** 805/**