improving code and build system to be in line with gnunet access control model for...
[oweals/gnunet.git] / src / dht / gnunet-service-dht_neighbours.c
index 907de9950728b3bede0664ce0ce68fae2d81c6d9..4ea5dd6f4df0a41077b8b833349f80de36f12ec1 100644 (file)
@@ -1617,6 +1617,10 @@ handle_dht_p2p_put (void *cls, const struct GNUNET_PeerIdentity *peer,
                                pp, payload, payload_size);
   }
   GNUNET_CONTAINER_bloomfilter_free (bf);
+  GDS_CLIENTS_process_monitor (GNUNET_MESSAGE_TYPE_DHT_MONITOR_PUT,
+    GNUNET_TIME_absolute_ntoh (put->expiration_time), &put->key,
+    putlen, put_path, 0, NULL, ntohl(put->desired_replication_level),
+    ntohl (put->type), payload, payload_size);
   return GNUNET_YES;
 }
 
@@ -1822,6 +1826,10 @@ handle_dht_p2p_get (void *cls, const struct GNUNET_PeerIdentity *peer,
                               1, GNUNET_NO);
   }
 
+  GDS_CLIENTS_process_monitor (GNUNET_MESSAGE_TYPE_DHT_MONITOR_GET,
+    GNUNET_TIME_UNIT_FOREVER_ABS, &get->key, 0, NULL, 0, NULL,
+    ntohl (get->desired_replication_level), type, NULL, 0);
+
   /* P2P forwarding */
   if (eval != GNUNET_BLOCK_EVALUATION_OK_LAST)
     GDS_NEIGHBOURS_handle_get (type, options,
@@ -1953,6 +1961,12 @@ handle_dht_p2p_result (void *cls, const struct GNUNET_PeerIdentity *peer,
                          &prm->key, put_path_length, put_path, get_path_length,
                          xget_path, data, data_size);
   }
+
+  GDS_CLIENTS_process_monitor (GNUNET_MESSAGE_TYPE_DHT_MONITOR_GET_RESP,
+    GNUNET_TIME_absolute_ntoh (prm->expiration_time), &prm->key,
+    put_path_length, put_path, get_path_length, get_path,
+    0, type, data, data_size);
+
   return GNUNET_YES;
 }