From ba1a6724a6da40090b9cc08a6dcccf61a246926e Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Mon, 18 Jan 2010 14:25:47 +0000 Subject: [PATCH] docu --- BUGS | 4 ++++ TODO | 24 +++++++++++++++++++++--- src/core/Makefile.am | 3 ++- src/fs/gnunet-directory.c | 1 + src/fs/gnunet-publish.c | 2 ++ src/include/gnunet_core_service.h | 23 ++++++++++++++++++++++- src/include/gnunet_transport_service.h | 2 +- src/topology/gnunet-daemon-topology.c | 3 +-- src/transport/gnunet-service-transport.c | 3 --- src/util/pseudonym.c | 3 ++- 10 files changed, 56 insertions(+), 12 deletions(-) diff --git a/BUGS b/BUGS index 9c2b20398..f5dd633a5 100644 --- a/BUGS +++ b/BUGS @@ -100,3 +100,7 @@ sane end-user should care about this codebase yet anyway. * TESTING: - consider changing API for peer-group termination to call continuation when done + +* HOSTLIST: + - 'server' uses 'GNUNET_PEERINFO_iterate', should probably switch to notification API + (for more instant / up-to-date hostlists at lower cost) [OPTIMIZATION] diff --git a/TODO b/TODO index 6f01259c2..02ba1ee1f 100644 --- a/TODO +++ b/TODO @@ -13,10 +13,28 @@ away), in order in which they will likely be done: Urgent items (before announcing ng.gnunet.org): * topology - - HELLO advertising does not work (no solicitation!) + - valgrind crash (in topology test case): +==31107== Invalid read of size 8 +==31107== at 0x401DA1: free_peer (gnunet-daemon-topology.c:480) +==31107== by 0x4030A2: cleaning_task (gnunet-daemon-topology.c:1212) +==31107== by 0x545DCBD: run_ready (scheduler.c:482) +==31107== by 0x545E0CD: GNUNET_SCHEDULER_run (scheduler.c:609) +==31107== by 0x545B00F: GNUNET_PROGRAM_run (program.c:223) +==31107== by 0x403477: main (gnunet-daemon-topology.c:1346) +==31107== Address 0x737e828 is 8 bytes inside a block of size 144 free'd +==31107== at 0x4C21DBC: free (vg_replace_malloc.c:325) +==31107== by 0x544240B: GNUNET_xfree_ (common_allocation.c:144) +==31107== by 0x401E13: free_peer (gnunet-daemon-topology.c:487) +==31107== by 0x4030A2: cleaning_task (gnunet-daemon-topology.c:1212) +==31107== by 0x545DCBD: run_ready (scheduler.c:482) +==31107== by 0x545E0CD: GNUNET_SCHEDULER_run (scheduler.c:609) +==31107== by 0x545B00F: GNUNET_PROGRAM_run (program.c:223) +==31107== by 0x403477: main (gnunet-daemon-topology.c:1346) +==31107== - considers peers 'connected' well before they actually are - (since core notifies about it too early?) - - needs testing + (since core notifies about it too early?); + - (forced) disconnect does not work (also CORE API issue) + - needs testing (not sure the current testcase does much...) * hostlist - test fails (looks like it works, but that's because of a bad connectivity notification; somehow core is unable to send diff --git a/src/core/Makefile.am b/src/core/Makefile.am index 3dccb2dbd..605b8d2ce 100644 --- a/src/core/Makefile.am +++ b/src/core/Makefile.am @@ -15,7 +15,8 @@ lib_LTLIBRARIES = \ libgnunetcore_la_SOURCES = \ core_api.c core.h \ - core_api_peer_get_info.c + core_api_peer_get_info.c \ + core_api_peer_request.c libgnunetcore_la_LIBADD = \ $(top_builddir)/src/arm/libgnunetarm.la \ $(top_builddir)/src/util/libgnunetutil.la \ diff --git a/src/fs/gnunet-directory.c b/src/fs/gnunet-directory.c index fe2ae8af6..de4ccdd3f 100644 --- a/src/fs/gnunet-directory.c +++ b/src/fs/gnunet-directory.c @@ -31,6 +31,7 @@ static int ret; * Print a meta data entry. * * @param cls closure (unused) + * @param plugin_name name of the plugin that generated the meta data * @param type type of the keyword * @param format format of data * @param data_mime_type mime type of data diff --git a/src/fs/gnunet-publish.c b/src/fs/gnunet-publish.c index 226877b15..d063b73c7 100644 --- a/src/fs/gnunet-publish.c +++ b/src/fs/gnunet-publish.c @@ -138,6 +138,7 @@ progress_cb (void *cls, * metadata and the filename). * * @param cls closure + * @param plugin_name name of the plugin that generated the meta data * @param type type of the meta data * @param format format of data * @param data_mime_type mime type of data @@ -171,6 +172,7 @@ meta_printer (void *cls, * Merge metadata entries. * * @param cls closure, target metadata structure + * @param plugin_name name of the plugin that generated the meta data * @param type type of the meta data * @param format format of data * @param data_mime_type mime type of data diff --git a/src/include/gnunet_core_service.h b/src/include/gnunet_core_service.h index 3ee2f102f..afe762772 100644 --- a/src/include/gnunet_core_service.h +++ b/src/include/gnunet_core_service.h @@ -1,6 +1,6 @@ /* This file is part of GNUnet. - (C) 2009 Christian Grothoff (and other contributing authors) + (C) 2009, 2010 Christian Grothoff (and other contributing authors) GNUnet is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published @@ -175,6 +175,27 @@ GNUNET_CORE_connect (struct GNUNET_SCHEDULER_Handle *sched, void GNUNET_CORE_disconnect (struct GNUNET_CORE_Handle *handle); +struct GNUNET_CORE_PeerRequestHandle; + +struct GNUNET_CORE_PeerRequestHandle * +struct GNUNET_CORE_peer_request_connect (struct GNUNET_SCHEDULER_Handle *sched, + const struct GNUNET_CONFIGURATION_Handle *cfg, + const struct GNUNET_PeerIdentity * peer, + GNUNET_SCHEDULER_Task cont, + void *cont_cls); + + +struct GNUNET_CORE_PeerRequestHandle * +struct GNUNET_CORE_peer_request_disconnect (struct GNUNET_SCHEDULER_Handle *sched, + const struct GNUNET_CONFIGURATION_Handle *cfg, + const struct GNUNET_PeerIdentity * peer, + GNUNET_SCHEDULER_Task cont, + void *cont_cls); + +void +GNUNET_CORE_peer_request_cancel (struct GNUNET_CORE_PeerRequestHandle *req); + + /** * Function called with statistics about the given peer. * diff --git a/src/include/gnunet_transport_service.h b/src/include/gnunet_transport_service.h index a705d3e10..726e03a95 100644 --- a/src/include/gnunet_transport_service.h +++ b/src/include/gnunet_transport_service.h @@ -238,7 +238,7 @@ GNUNET_TRANSPORT_offer_hello (struct GNUNET_TRANSPORT_Handle *handle, * Convert a binary address into a human * readable address. * - * @param handle connection to transport service + * @param sched scheduler to use * @param cfg configuration to use * @param address address to convert (binary format) * @param addressLen number of bytes in address diff --git a/src/topology/gnunet-daemon-topology.c b/src/topology/gnunet-daemon-topology.c index 5c581fd42..0e4bbffc9 100644 --- a/src/topology/gnunet-daemon-topology.c +++ b/src/topology/gnunet-daemon-topology.c @@ -347,8 +347,7 @@ ready_callback (void *cls, /** * Try to connect to the specified peer. * - * @param peer who we should try to connect to - * @param pos entry in our friend list; NULL if not in friend list yet + * @param pos peer to connect to */ static void attempt_connect (struct PeerList *pos) diff --git a/src/transport/gnunet-service-transport.c b/src/transport/gnunet-service-transport.c index 8196dd45a..6b8e0e7dd 100644 --- a/src/transport/gnunet-service-transport.c +++ b/src/transport/gnunet-service-transport.c @@ -840,9 +840,6 @@ try_transmission_to_peer (struct NeighbourList *neighbour); * @param cls closure, identifies the entry on the * message queue that was transmitted and the * client responsible for queueing the message - * @param rl identifies plugin used for the transmission for - * this neighbour; needs to be re-enabled for - * future transmissions * @param target the peer receiving the message * @param result GNUNET_OK on success, if the transmission * failed, we should not tell the client to transmit diff --git a/src/util/pseudonym.c b/src/util/pseudonym.c index 07c05b9e6..dfacbdcd8 100644 --- a/src/util/pseudonym.c +++ b/src/util/pseudonym.c @@ -540,11 +540,12 @@ GNUNET_PSEUDONYM_rank (const struct GNUNET_CONFIGURATION_Handle *cfg, * Insert metadata into existing MD record (passed as cls). * * @param cls metadata to add to + * @param plugin_name name of the plugin that generated the meta data * @param type type of entry to insert * @param format format of data * @param data_mime_type mime type of data * @param data value of the meta data - * @param data_size number of bytes in data + * @param data_len number of bytes in data * @return always 0 */ static int -- 2.25.1