Index: GNUnet/src/include/gnunet_dht.h =================================================================== --- GNUnet/src/include/gnunet_dht.h (revision 506) +++ GNUnet/src/include/gnunet_dht.h (revision 535) @@ -75,8 +75,6 @@ DHT_TableId table; - unsigned long long timeout; /* nbo */ - } DHT_CS_REQUEST_LEAVE; Index: GNUnet/src/include/gnunet_dht_lib.h =================================================================== --- GNUnet/src/include/gnunet_dht_lib.h (revision 506) +++ GNUnet/src/include/gnunet_dht_lib.h (revision 535) @@ -69,8 +69,7 @@ * implies 'use value from gnunet.conf'). * @return SYSERR on error, OK on success */ -int DHT_LIB_leave(DHT_TableId * table, - cron_t timeout); +int DHT_LIB_leave(DHT_TableId * table); /** Index: GNUnet/src/include/gnunet_ecrs_lib.h =================================================================== --- GNUnet/src/include/gnunet_ecrs_lib.h (revision 506) +++ GNUnet/src/include/gnunet_ecrs_lib.h (revision 535) @@ -238,6 +238,12 @@ void ECRS_freeUri(struct ECRS_URI * uri); /** + * How many keywords are ANDed in this keyword URI? + * @return 0 if this is not a keyword URI + */ +unsigned int ECRS_countKeywordsOfUri(const struct ECRS_URI * uri); + +/** * Duplicate URI. */ struct ECRS_URI * ECRS_dupUri(const struct ECRS_URI * uri); Index: GNUnet/src/include/gnunet_fsui_lib.h =================================================================== --- GNUnet/src/include/gnunet_fsui_lib.h (revision 506) +++ GNUnet/src/include/gnunet_fsui_lib.h (revision 535) @@ -242,10 +242,16 @@ char * main_filename; } UploadComplete; struct { - /* FIXME */ + unsigned long long total; + unsigned long long completed; + cron_t eta; + char * filename; + cron_t start_time; } UnindexProgress; struct { - /* FIXME */ + unsigned long long total; + char * filename; + cron_t start_time; } UnindexComplete; /** * Used for errors. @@ -474,8 +480,8 @@ * @return OK on success (at least we started with it), * SYSERR if the file does not exist */ -void FSUI_unindex(struct FSUI_Context * ctx, - const char * filename); +int FSUI_unindex(struct FSUI_Context * ctx, + const char * filename); /* ***************** recursive FS API ***************** */ Index: GNUnet/src/include/gnunet_dht_service.h =================================================================== --- GNUnet/src/include/gnunet_dht_service.h (revision 506) +++ GNUnet/src/include/gnunet_dht_service.h (revision 535) @@ -78,8 +78,7 @@ * implies 'use value from gnunet.conf'). * @return SYSERR on error, OK on success */ - int (*leave)(const DHT_TableId * table, - cron_t timeout); + int (*leave)(const DHT_TableId * table); /** Index: GNUnet/src/conf/gnunet-setup.c =================================================================== --- GNUnet/src/conf/gnunet-setup.c (revision 506) +++ GNUnet/src/conf/gnunet-setup.c (revision 535) @@ -43,6 +43,10 @@ extern int mconf_main(int ac, char **av); #endif +#if HAVE_GTK +int gconf_main(int ac, char *av[]); +#endif + extern int conf_main(int ac, char **av); #ifdef MINGW extern void InitWinEnv(); Index: GNUnet/src/conf/Makefile.am =================================================================== --- GNUnet/src/conf/Makefile.am (revision 506) +++ GNUnet/src/conf/Makefile.am (revision 535) @@ -43,14 +43,15 @@ if HAVE_GTK gconf_libs = $(GTK_LIBS) @EXT_LIB_PATH@ $(LDADD) @EXT_LIBS@ -lgthread-2.0 - + gconf_src = \ gconf_callbacks.h \ gconf_interface.h \ gconf_support.h \ gconf_interface.c \ gconf_support.c \ - gconf.c + gconf.c \ + images.c endif @@ -74,9 +75,6 @@ gnunet_setup_LDADD = \ $(top_builddir)/src/util/libgnunetutil.la -gnunet_setup_LIBADD = \ - $(top_builddir)/src/util/libgnunetutil.la - gnunet_win_tool_SOURCE = \ gnunet-win-tool.c Index: GNUnet/src/conf/gconf.c =================================================================== --- GNUnet/src/conf/gconf.c (revision 506) +++ GNUnet/src/conf/gconf.c (revision 535) @@ -1636,8 +1636,9 @@ if (((menu != &rootmenu) && !(menu->flags & MENU_ROOT)) || (view_mode == FULL_VIEW) || (view_mode == SPLIT_VIEW))*/ - if ((view_mode == SINGLE_VIEW) && (menu->flags & MENU_ROOT) - || (view_mode == FULL_VIEW) || (view_mode == SPLIT_VIEW)) { + if ( ( (view_mode == SINGLE_VIEW) && (menu->flags & MENU_ROOT)) + || (view_mode == FULL_VIEW) + || (view_mode == SPLIT_VIEW) ) { indent++; display_tree(child); indent--; Index: GNUnet/src/applications/dht/tools/dhttest2.c =================================================================== --- GNUnet/src/applications/dht/tools/dhttest2.c (revision 0) +++ GNUnet/src/applications/dht/tools/dhttest2.c (revision 535) @@ -0,0 +1,300 @@ +/* + This file is part of GNUnet. + (C) 2005 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 + by the Free Software Foundation; either version 2, or (at your + option) any later version. + + GNUnet is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNUnet; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. +*/ + +/** + * @file applications/dht/tools/dhttest.c + * @brief DHT testcase + * @author Christian Grothoff + */ + +#include "platform.h" +#include "gnunet_protocols.h" +#include "gnunet_dht_lib.h" +#include "gnunet_dht_datastore_memory.h" +#include "gnunet_stats_lib.h" +#include + +static int parseOptions(int argc, + char ** argv) { + FREENONNULL(setConfigurationString("GNUNETD", + "LOGFILE", + NULL)); + return OK; +} + +/** + * Identity of peer 2 (hardwired). + */ +static PeerIdentity peer2; + +static int waitForConnect(const char * name, + unsigned long long value, + void * cls) { + if ( (value > 0) && + (0 == strcmp(_("# of connected peers"), + name)) ) + return SYSERR; + return OK; +} + + +#define CHECK(a) do { if (!(a)) { ret = 1; BREAK(); goto FAILURE; } } while(0) +#define CHECK2(a) do { if (!(a)) { ret = 1; BREAK(); goto FAILURE2; } } while(0) + +/** + * Testcase to test gap routing (2 peers only). + * @return 0: ok, -1: error + */ +int main(int argc, char ** argv) { + pid_t daemon1; + pid_t daemon2; + pid_t sto2; + int ret; + int status; + GNUNET_TCP_SOCKET * sock; + int left; + DHT_TableId table; + DHT_TableId key; + DataContainer * value; + Blockstore * store; + + GNUNET_ASSERT(OK == + enc2hash("BV3AS3KMIIBVIFCGEG907N6NTDTH26B7T6FODUSLSGK" + "5B2Q58IEU1VF5FTR838449CSHVBOAHLDVQAOA33O77F" + "OPDA8F1VIKESLSNBO", + &peer2.hashPubKey)); + /* set to 0 if you want to start gnunetd's by hand for debugging */ +#if 0 + daemon1 = fork(); + if (daemon1 == 0) { + if (0 != execlp("gnunetd", /* what binary to execute, must be in $PATH! */ + "gnunetd", /* arg0, path to gnunet binary */ + "-d", /* do not daemonize so we can easily kill you */ + "-c", + "peer1.conf", /* configuration file */ + NULL)) { + fprintf(stderr, + _("'%s' failed: %s\n"), + "execlp", + STRERROR(errno)); + return -1; + } + } + daemon2 = fork(); + if (daemon2 == 0) { + if (0 != execlp("gnunetd", /* what binary to execute, must be in $PATH! */ + "gnunetd", /* arg0, path to gnunet binary */ + "-d", /* do not daemonize so we can easily kill you */ + "-c", + "peer2.conf", /* configuration file */ + NULL)) { + fprintf(stderr, + _("'%s' failed: %s\n"), + "execlp", + STRERROR(errno)); + return -1; + } + } + /* in case existing HELOs have expired */ + sleep(5); + system("cp peer1/data/hosts/* peer2/data/hosts/"); + system("cp peer2/data/hosts/* peer1/data/hosts/"); + if (daemon1 != -1) { + if (0 != kill(daemon1, SIGTERM)) + DIE_STRERROR("kill"); + if (daemon1 != waitpid(daemon1, &status, 0)) + DIE_STRERROR("waitpid"); + } + if (daemon2 != -1) { + if (0 != kill(daemon2, SIGTERM)) + DIE_STRERROR("kill"); + if (daemon2 != waitpid(daemon2, &status, 0)) + DIE_STRERROR("waitpid"); + } + + /* re-start, this time we're sure up-to-date HELOs are available */ + daemon1 = fork(); + if (daemon1 == 0) { + if (0 != execlp("gnunetd", /* what binary to execute, must be in $PATH! */ + "gnunetd", /* arg0, path to gnunet binary */ + "-d", /* do not daemonize so we can easily kill you */ + "-c", + "peer1.conf", /* configuration file */ + NULL)) { + fprintf(stderr, + _("'%s' failed: %s\n"), + "execlp", + STRERROR(errno)); + return -1; + } + } + daemon2 = fork(); + if (daemon2 == 0) { + if (0 != execlp("gnunetd", /* what binary to execute, must be in $PATH! */ + "gnunetd", /* arg0, path to gnunet binary */ + "-d", /* do not daemonize so we can easily kill you */ + "-c", + "peer2.conf", /* configuration file */ + NULL)) { + fprintf(stderr, + _("'%s' failed: %s\n"), + "execlp", + STRERROR(errno)); + return -1; + } + } + sleep(5); + + ret = 0; + left = 5; + /* wait for connection or abort with error */ +#else + daemon1 = -1; + daemon2 = -1; +#endif + CHECK(OK == initUtil(argc, argv, &parseOptions)); + startCron(); + do { + sock = getClientSocket(); + if (sock == NULL) { + printf(_("Waiting for gnunetd to start (%u iterations left)...\n"), + left); + sleep(1); + left--; + CHECK(left > 0); + } + } while (sock == NULL); + + left = 30; /* how many iterations should we wait? */ + while (OK == requestStatistics(sock, + &waitForConnect, + NULL)) { + printf(_("Waiting for peers to connect (%u iterations left)...\n"), + left); + sleep(5); + left--; + CHECK(left > 0); + } + releaseClientSocket(sock); + + memset(&table, 33, sizeof(DHT_TableId)); + DHT_LIB_init(); + store = create_blockstore_memory(65536); + + /* actual test code */ + sto2 = fork(); + if (sto2 == 0) { + /* switch to peer2 */ + setConfigurationInt("NETWORK", + "PORT", + 12087); + DHT_LIB_join(store, + &table); + hash("key", 3, &key); + value = MALLOC(8); + value->size = ntohl(8); + CHECK2(OK == DHT_LIB_put(&table, + &key, + 0, + 5 * cronSECONDS, + value)); + CHECK2(1 == DHT_LIB_get(&table, + 0, + 0, + 1, + &key, + 10 * cronSECONDS, + NULL, + NULL)); + + hash("key2", 4, &key); + CHECK2(1 == DHT_LIB_get(&table, + 0, + 0, + 1, + &key, + 60 * cronSECONDS, + NULL, + NULL)); + FAILURE2: + DHT_LIB_leave(&table); + destroy_blockstore_memory(store); + DHT_LIB_done(); + stopCron(); + doneUtil(); + exit(ret); + } + DHT_LIB_join(store, + &table); + hash("key2", 4, &key); + value = MALLOC(8); + value->size = ntohl(8); + CHECK(OK == DHT_LIB_put(&table, + &key, + 0, + 5 * cronSECONDS, + value)); + CHECK(1 == DHT_LIB_get(&table, + 0, + 0, + 1, + &key, + 10 * cronSECONDS, + NULL, + NULL)); + hash("key", 3, &key); + CHECK(1 == DHT_LIB_get(&table, + 0, + 0, + 1, + &key, + 60 * cronSECONDS, + NULL, + NULL)); + + DHT_LIB_leave(&table); + destroy_blockstore_memory(store); + DHT_LIB_done(); + + if (sto2 != waitpid(sto2, &status, 0)) + DIE_STRERROR("waitpid"); + /* end of actual test code */ + + FAILURE: + stopCron(); + doneUtil(); + + /* also shutdown daemons again */ + if (daemon1 != -1) { + if (0 != kill(daemon1, SIGTERM)) + DIE_STRERROR("kill"); + if (daemon1 != waitpid(daemon1, &status, 0)) + DIE_STRERROR("waitpid"); + } + if (daemon2 != -1) { + if (0 != kill(daemon2, SIGTERM)) + DIE_STRERROR("kill"); + if (daemon2 != waitpid(daemon2, &status, 0)) + DIE_STRERROR("waitpid"); + } + return ret; +} + +/* end of dhytest.c */ Index: GNUnet/src/applications/dht/tools/Makefile.am =================================================================== --- GNUnet/src/applications/dht/tools/Makefile.am (revision 506) +++ GNUnet/src/applications/dht/tools/Makefile.am (revision 535) @@ -30,19 +30,28 @@ -check_PROGRAMS = \ - dhttest +#check_PROGRAMS = \ +# dhttest \ +# dhttest2 -TESTS = $(check_PROGRAMS) +#TESTS = $(check_PROGRAMS) -dhttest_SOURCES = \ - dhttest.c -dhttest_LDADD = \ - $(top_builddir)/src/applications/stats/libgnunetstats_api.la \ - $(top_builddir)/src/applications/dht/tools/libgnunetdht_api.la \ - $(top_builddir)/src/applications/dht/module/libgnunetdht_datastore_memory.la \ - $(top_builddir)/src/util/libgnunetutil.la +#dhttest_SOURCES = \ +# dhttest.c +#dhttest_LDADD = \ +# $(top_builddir)/src/applications/stats/libgnunetstats_api.la \ +# $(top_builddir)/src/applications/dht/tools/libgnunetdht_api.la \ +# $(top_builddir)/src/applications/dht/module/libgnunetdht_datastore_memory.la \ +# $(top_builddir)/src/util/libgnunetutil.la +#dhttest2_SOURCES = \ +# dhttest2.c +#dhttest2_LDADD = \ +# $(top_builddir)/src/applications/stats/libgnunetstats_api.la \ +# $(top_builddir)/src/applications/dht/tools/libgnunetdht_api.la \ +# $(top_builddir)/src/applications/dht/module/libgnunetdht_datastore_memory.la \ +# $(top_builddir)/src/util/libgnunetutil.la + EXTRA_DIST = \ peer1.conf \ peer2.conf \ Index: GNUnet/src/applications/dht/tools/dht_api.c =================================================================== --- GNUnet/src/applications/dht/tools/dht_api.c (revision 506) +++ GNUnet/src/applications/dht/tools/dht_api.c (revision 535) @@ -415,8 +415,6 @@ * * @param datastore the storage callbacks to use for the table * @param table the ID of the table - * @param timeout how long to wait for other peers to respond to - * the join request (has no impact on success or failure) * @return SYSERR on error, OK on success */ int DHT_LIB_join(Blockstore * store, @@ -470,14 +468,9 @@ * * @param datastore the storage callbacks to use for the table * @param table the ID of the table - * @param timeout how long to wait for other peers to respond to - * the leave request (has no impact on success or failure); - * but only timeout time is available for migrating data, so - * pick this value with caution. * @return SYSERR on error, OK on success */ -int DHT_LIB_leave(DHT_TableId * table, - cron_t timeout) { +int DHT_LIB_leave(DHT_TableId * table) { TableList * list; int i; void * unused; @@ -510,7 +503,6 @@ /* send LEAVE message! */ req.header.size = htons(sizeof(DHT_CS_REQUEST_LEAVE)); req.header.type = htons(DHT_CS_PROTO_REQUEST_LEAVE); - req.timeout = htonll(timeout); req.table = *table; ret = SYSERR; Index: GNUnet/src/applications/dht/tools/dht-join.c =================================================================== --- GNUnet/src/applications/dht/tools/dht-join.c (revision 506) +++ GNUnet/src/applications/dht/tools/dht-join.c (revision 535) @@ -43,8 +43,6 @@ gettext_noop("allow SIZE bytes of memory for the local table") }, { 't', "table", "NAME", gettext_noop("join table called NAME") }, - { 'T', "timeout", "VALUE", - gettext_noop("when leaving table, use VALUEs to migrate data") }, HELP_VERSION, HELP_VERBOSE, HELP_END, @@ -99,20 +97,6 @@ "TABLE", GNoptarg)); break; - case 'T': { - unsigned int max; - if (1 != sscanf(GNoptarg, "%ud", &max)) { - LOG(LOG_FAILURE, - _("You must pass a number to the '%s' option.\n"), - "-T"); - return SYSERR; - } else { - setConfigurationInt("DHT-JOIN", - "TIMEOUT", - max); - } - break; - } case 'v': printf("dht-join v0.0.0\n"); return SYSERR; @@ -261,9 +245,7 @@ wait_for_shutdown(); /* shutdown */ - if (OK != DHT_LIB_leave(&table, - getConfigurationInt("DHT-JOIN", - "TIMEOUT") * cronSECONDS)) { + if (OK != DHT_LIB_leave(&table)) { LOG(LOG_WARNING, _("Error leaving DHT.\n")); destroy_blockstore_memory((Blockstore*)myStore.closure); Index: GNUnet/src/applications/dht/module/dht.c =================================================================== --- GNUnet/src/applications/dht/module/dht.c (revision 506) +++ GNUnet/src/applications/dht/module/dht.c (revision 535) @@ -244,7 +244,6 @@ * such an operation was not performed). */ struct DHT_GET_RECORD * async_handle; - Semaphore * async_handle_done; /** * ASYNC RPC handles. @@ -312,7 +311,6 @@ * such an operation was not performed). */ struct DHT_GET_RECORD * async_handle; - Semaphore * async_handle_done; /** * ASYNC RPC handles. @@ -511,16 +509,7 @@ typedef struct { - DHT_TableId table; - cron_t timeout; - unsigned int maxPuts; - DHT_PUT_RECORD ** puts; - unsigned int putsPos; -} MigrationClosure; - -typedef struct { - /** * Number of results currently received (size of the * results-array). @@ -1454,7 +1443,7 @@ } MUTEX_LOCK(&record->lock); if (record->callback != NULL) - record->resultCallback(&record->keys[0], + record->resultCallback(record->keys, value, record->resultClosure); MUTEX_UNLOCK(&record->lock); @@ -1488,7 +1477,7 @@ #endif if (isNotCloserThanMe(&record->table, peer, - &record->keys[0])) + record->keys)) return; /* refuse! */ cronTime(&now); if (record->timeout > now) @@ -1505,7 +1494,7 @@ RPC_paramAdd(param, "keys", sizeof(HashCode512) * record->keyCount, - &record->keys); + record->keys); RPC_paramAdd(param, "timeout", sizeof(unsigned long long), @@ -1803,11 +1792,7 @@ return OK; } -static void findnodes_dht_master_complete_callback(FindNodesContext * fnc) { - SEMAPHORE_UP(fnc->async_handle_done); -} - /** * In the induced sub-structure for the given 'table', find the ALPHA * nodes closest to the given key. The code first tries to find ALPHA @@ -1910,8 +1895,6 @@ #endif /* try finding peers responsible for this table using the master table */ - fnc->async_handle_done - = SEMAPHORE_NEW(0); fnc->async_handle = dht_get_async_start(&masterTableId, 0, /* type */ @@ -1920,8 +1903,8 @@ timeout, (DataProcessor) &findnodes_dht_master_get_callback, fnc, - (DHT_OP_Complete) &findnodes_dht_master_complete_callback, - fnc); + NULL, + NULL); } } return fnc; @@ -1944,9 +1927,7 @@ ENTER(); /* stop async DHT get */ if (fnc->async_handle != NULL) { - SEMAPHORE_DOWN(fnc->async_handle_done); dht_get_async_stop(fnc->async_handle); - SEMAPHORE_FREE(fnc->async_handle_done); fnc->async_handle = NULL; } @@ -2024,10 +2005,6 @@ } } -static void find_k_nodes_dht_master_get_complete(FindKNodesContext * fnc) { - SEMAPHORE_UP(fnc->async_handle_done); -} - /** * In the induced sub-structure for the given 'table', find k nodes * close to the given key that participate in that table. Any node in @@ -2132,8 +2109,6 @@ #endif /* try finding peers responsible for this table using the master table */ - fnc->async_handle_done - = SEMAPHORE_NEW(0); fnc->async_handle = dht_get_async_start(&masterTableId, 0, /* type */ @@ -2142,8 +2117,8 @@ timeout, (DataProcessor)&find_k_nodes_dht_master_get_callback, fnc, - (DHT_OP_Complete) &find_k_nodes_dht_master_get_complete, - fnc); + NULL, + NULL); } return fnc; } @@ -2160,8 +2135,6 @@ /* stop async DHT get */ ENTER(); if (fnc->async_handle != NULL) { - SEMAPHORE_DOWN(fnc->async_handle_done); - SEMAPHORE_FREE(fnc->async_handle_done); dht_get_async_stop(fnc->async_handle); fnc->async_handle = NULL; } @@ -2740,57 +2713,21 @@ return OK; } - /** - * Callback function to migrate content to other peers. - */ -static int dht_migrate(const HashCode512 * key, - const DataContainer * value, - MigrationClosure * cls) { - ENTER(); - if (cls->puts[cls->putsPos] != NULL) - dht_put_async_stop(cls->puts[cls->putsPos]); - cls->puts[cls->putsPos] - = dht_put_async_start(&cls->table, - key, - cls->timeout, - value, - NULL, - NULL); - cls->putsPos = (cls->putsPos + 1) % cls->maxPuts; - gnunet_util_sleep(cls->timeout / cls->maxPuts); - return OK; -} - - -/** * Leave a table (stop storing data for the table). Leave * fails if the node is not joint with the table. Blocks * for at most timeout ms to migrate content elsewhere. * * @param datastore the storage callbacks to use for the table * @param table the ID of the table - * @param timeout how long to wait for other peers to respond to - * the leave request (has no impact on success or failure); - * but only timeout time is available for migrating data, so - * pick this value with caution. * @return SYSERR on error, OK on success */ -static int dht_leave(const DHT_TableId * table, - cron_t timeout) { +static int dht_leave(const DHT_TableId * table) { int i; int idx; LocalTableData old; - MigrationClosure cls; DHT_REMOVE_RECORD * remRec; - unsigned int count; - if (timeout > 1 * cronHOURS) { - LOG(LOG_WARNING, - _("'%s' called with timeout above 1 hour (bug?)\n"), - __FUNCTION__); - timeout = 1 * cronHOURS; - } ENTER(); MUTEX_LOCK(lock); idx = -1; @@ -2825,42 +2762,12 @@ sizeof(PeerIdentity)); remRec = dht_remove_async_start(&masterTableId, table, - timeout, + 0, value, NULL, NULL); - } else { - remRec = NULL; - } - - /* migrate content if applicable! */ - count = old.store->iterate(old.store->closure, - NULL, NULL); - cls.table = *table; - cls.maxPuts = getConfigurationInt("DHT", - "MAX-MIGRATION-PARALLELISM"); - if (cls.maxPuts == 0) - cls.maxPuts = 16; - /* migration time for each entry: - total time times parallelism by count */ - if ( (count > 0) && (timeout > 0) ) { - cls.timeout = timeout * cls.maxPuts / count; - cls.puts = MALLOC(sizeof(DHT_PUT_RECORD*)*cls.maxPuts); - memset(cls.puts, 0, sizeof(DHT_PUT_RECORD*)*cls.maxPuts); - cls.putsPos = 0; - old.store->iterate(old.store->closure, - (DataProcessor) &dht_migrate, - &cls); - for (i=0;isize) != sizeof(DHT_CS_REQUEST_LEAVE)) return SYSERR; req = (DHT_CS_REQUEST_LEAVE*) message; LOG(LOG_EVERYTHING, "Client leaving request received!\n"); - MUTEX_LOCK(&csLock); + MUTEX_LOCK(&csLock); for (i=0;itable, + ptr = csHandlers[i]; + if ( (equalsHashCode512(&ptr->table, &req->table)) ) { - if (OK != dhtAPI->leave(&req->table, - ntohll(req->timeout))) { - LOG(LOG_WARNING, - _("'%s' failed!\n"), - "CS_DHT_LEAVE"); - } - ptr = csHandlers[i]; csHandlers[i] = csHandlers[csHandlersCount-1]; GROW(csHandlers, csHandlersCount, @@ -475,28 +469,23 @@ FREE(record); } -struct CSPutClosure { - ClientHandle client; - DHT_CS_REQUEST_PUT * message; -}; - /** - * Cron job for the CS handler inserting -pair into DHT-table. + * CS handler for inserting -pair into DHT-table. */ -static void csPutJob(struct CSPutClosure * cpc) { - ClientHandle client; +static int csPut(ClientHandle client, + const CS_HEADER * message) { DHT_CS_REQUEST_PUT * req; DataContainer * data; CS_PUT_RECORD * ptr; unsigned int size; - req = cpc->message; - client = cpc->client; - FREE(cpc); + if (ntohs(message->size) < sizeof(DHT_CS_REQUEST_PUT)) + return SYSERR; + req = (DHT_CS_REQUEST_PUT*) message; size = ntohs(req->header.size) - sizeof(DHT_CS_REQUEST_PUT) + sizeof(DataContainer); - GNUNET_ASSERT(size < 0xFFFF); + GNUNET_ASSERT(size < MAX_BUFFER_SIZE); if (size == 0) { data = NULL; } else { @@ -525,28 +514,6 @@ (DHT_OP_Complete) &cs_put_abort, ptr); FREE(data); - FREE(req); -} - -/** - * CS handler for inserting -pair into DHT-table. - */ -static int csPut(ClientHandle client, - const CS_HEADER * message) { - struct CSPutClosure * cpc; - - if (ntohs(message->size) < sizeof(DHT_CS_REQUEST_PUT)) - return SYSERR; - cpc = MALLOC(sizeof(struct CSPutClosure)); - cpc->message = MALLOC(ntohs(message->size)); - memcpy(cpc->message, - message, - ntohs(message->size)); - cpc->client = client; - addCronJob((CronJob)&csPutJob, - 0, - 0, - cpc); return OK; } @@ -803,11 +770,11 @@ "DHT_CS_REPLY_ACK"); MUTEX_LOCK(&csLock); for (i=0;ihandler == client) && - (equalsHashCode512(&csHandlers[i]->table, + ptr = csHandlers[i]; + if ( (ptr->handler == client) && + (equalsHashCode512(&ptr->table, &req->table)) ) { SEMAPHORE_DOWN(ptr->postreply); - ptr = csHandlers[i]; ptr->status = ntohl(req->status); SEMAPHORE_UP(ptr->prereply); MUTEX_UNLOCK(&csLock); @@ -892,7 +859,6 @@ message.header.size = ntohs(sizeof(DHT_CS_REQUEST_LEAVE)); message.header.type = ntohs(DHT_CS_PROTO_REQUEST_LEAVE); - message.timeout = ntohll(0); message.table = csHandlers[i]->table; csLeave(client, &message.header); Index: GNUnet/src/applications/rpc/rpc.c =================================================================== --- GNUnet/src/applications/rpc/rpc.c (revision 506) +++ GNUnet/src/applications/rpc/rpc.c (revision 535) @@ -901,8 +901,11 @@ } if (calls != NULL) { PeerInfo * pi = getPeerInfo(sender); - if (pi->averageResponseTime < MAX_RPC_TIMEOUT / 2) - pi->averageResponseTime *= 2; + + if (pi != NULL) { + if (pi->averageResponseTime < MAX_RPC_TIMEOUT / 2) + pi->averageResponseTime *= 2; + } RPC_STATUS("", "received duplicate request", calls); calls->expirationTime = cronTime(NULL) + MAX_RPC_TIMEOUT; LOG(LOG_DEBUG, Index: GNUnet/src/applications/identity/identity.c =================================================================== --- GNUnet/src/applications/identity/identity.c (revision 506) +++ GNUnet/src/applications/identity/identity.c (revision 535) @@ -289,8 +289,7 @@ } fullname = MALLOC(strlen(filename) + strlen(networkIdDirectory) + 1); - fullname[0] = '\0'; - strcat(fullname, networkIdDirectory); + strcpy(fullname, networkIdDirectory); strcat(fullname, filename); if (0 == UNLINK(fullname)) LOG(LOG_WARNING, Index: GNUnet/src/applications/fs/tools/Makefile.am =================================================================== --- GNUnet/src/applications/fs/tools/Makefile.am (revision 506) +++ GNUnet/src/applications/fs/tools/Makefile.am (revision 535) @@ -9,16 +9,16 @@ gnunet-pseudonym \ gnunet-search \ gnunet-insert \ - gnunet-download -# gnunet-delete + gnunet-download \ + gnunet-unindex gnunet_insert_SOURCES = \ gnunet-insert.c -#gnunet_delete_SOURCES = \ -# gnunet-delete.c +gnunet_unindex_SOURCES = \ + gnunet-unindex.c gnunet_directory_SOURCES = \ gnunet-directory.c Index: GNUnet/src/applications/fs/tools/gnunet-unindex.c =================================================================== --- GNUnet/src/applications/fs/tools/gnunet-unindex.c (revision 0) +++ GNUnet/src/applications/fs/tools/gnunet-unindex.c (revision 535) @@ -0,0 +1,204 @@ +/* + This file is part of GNUnet. + (C) 2001, 2002, 2003, 2004, 2005 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 + by the Free Software Foundation; either version 2, or (at your + option) any later version. + + GNUnet is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNUnet; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. +*/ + +/** + * @file applications/fs/tools/gnunet-unindex.c + * @brief Tool to unindex files. + * @author Christian Grothoff + * @author Krista Bennett + * @author James Blackwell + * @author Igor Wronsky + */ + +#include "platform.h" +#include "gnunet_fsui_lib.h" + +static Semaphore * exitSignal; + +static int errorCode; + +static struct FSUI_Context * ctx; + +/** + * Print progess message. + */ +static void printstatus(int * verboselevel, + const FSUI_Event * event) { + unsigned long long delta; + + switch(event->type) { + case unindex_progress: + if (*verboselevel == YES) { + delta = event->data.UploadProgress.eta - cronTime(NULL); + PRINTF(_("%16llu of %16llu bytes unindexed (estimating %llu seconds to completion) "), + event->data.UploadProgress.main_completed, + event->data.UploadProgress.main_total, + delta / cronSECONDS); + printf("\r"); + } + break; + case unindex_complete: + if (*verboselevel == YES) { + delta = event->data.UploadComplete.eta - event->data.UploadComplete.start_time; + PRINTF( + _("\nUnindexing of '%s' complete, %llu bytes took %llu seconds (%8.3f kbps).\n"), + event->data.UploadComplete.filename, + event->data.UploadComplete.total, + delta / cronSECONDS, + (delta == 0) + ? (double) (-1.0) + : (double) (event->data.UploadComplete.total / 1024.0 * cronSECONDS / delta)); + } + break; + case unindex_error: + printf(_("\nError unindexing file: %s\n"), + event->data.message); + errorCode = 1; + SEMAPHORE_UP(exitSignal); /* always exit main? */ + break; + default: + BREAK(); + break; + } +} + +/** + * Prints the usage information for this command if the user errs. + * Aborts the program. + */ +static void printhelp() { + static Help help[] = { + HELP_HELP, + HELP_HOSTNAME, + HELP_LOGLEVEL, + HELP_VERSION, + HELP_VERBOSE, + HELP_END, + }; + formatHelp("gnunet-unindex [OPTIONS] FILENAME*", + _("Unindex files."), + help); +} + +static int parseOptions(int argc, + char ** argv) { + int c; + + FREENONNULL(setConfigurationString("GNUNET-INSERT", + "INDEX-CONTENT", + "YES")); + while (1) { + int option_index=0; + static struct GNoption long_options[] = { + LONG_DEFAULT_OPTIONS, + { "verbose", 0, 0, 'V' }, + { 0,0,0,0 } + }; + c = GNgetopt_long(argc, + argv, + "hHLvV", + long_options, + &option_index); + if (c == -1) + break; /* No more flags to process */ + if (YES == parseDefaultOptions(c, GNoptarg)) + continue; + switch(c) { + case 'h': + printhelp(); + return SYSERR; + case 'V': + FREENONNULL(setConfigurationString("GNUNET-INSERT", + "VERBOSE", + "YES")); + break; + case 'v': + printf("GNUnet v%s, gnunet-unindex v%s\n", + VERSION, + AFS_VERSION); + return SYSERR; + default: + LOG(LOG_FAILURE, + _("Use --help to get a list of options.\n")); + return SYSERR; + } /* end of parsing commandline */ + } /* while (1) */ + if (argc == GNoptind) { + printf(_("You must specify a list of files to insert.\n")); + return SYSERR; + } + if (argc - GNoptind != 1) { + printf(_("You must specify one and only one file to unindex.\n")); + return SYSERR; + } + setConfigurationString("GNUNET-INSERT", + "MAIN-FILE", + argv[GNoptind]); + return OK; +} + +/** + * The main function to unindex files. + * + * @param argc number of arguments from the command line + * @param argv command line arguments + * @return return 0 for ok, -1 on error + */ +int main(int argc, char ** argv) { + char * filename; + int verbose; + char * tmp; + + if (SYSERR == initUtil(argc, argv, &parseOptions)) + return 0; + + verbose = testConfigurationString("GNUNET-INSERT", + "VERBOSE", + "YES"); + exitSignal = SEMAPHORE_NEW(0); + /* fundamental init */ + ctx = FSUI_start("gnunet-unindex", + NO, + (FSUI_EventCallback) &printstatus, + &verbose); + + /* first insert all of the top-level files or directories */ + tmp = getConfigurationString("GNUNET-INSERT", + "MAIN-FILE"); + filename = expandFileName(tmp); + FREE(tmp); + if (OK != FSUI_unindex(ctx, + filename)) { + printf(_("'%s' failed. Is '%s' a file?\n"), + "FSUI_unindex", + filename); + errorCode = 1; + } else { + /* wait for completion */ + SEMAPHORE_DOWN(exitSignal); + SEMAPHORE_FREE(exitSignal); + } + FREE(filename); + FSUI_stop(ctx); + doneUtil(); + return errorCode; +} + +/* end of gnunet-unindex.c */ Index: GNUnet/src/applications/fs/ecrs_core.c =================================================================== --- GNUnet/src/applications/fs/ecrs_core.c (revision 506) +++ GNUnet/src/applications/fs/ecrs_core.c (revision 535) @@ -116,6 +116,7 @@ GNUNET_ASSERT(len >= sizeof(DBlock)); data = (const char*) &db[1]; len -= sizeof(DBlock); + GNUNET_ASSERT(len < MAX_BUFFER_SIZE); hash(data, len, &hc); hashToKey(&hc, &skey, Index: GNUnet/src/applications/fs/module/ondemand.c =================================================================== --- GNUnet/src/applications/fs/module/ondemand.c (revision 506) +++ GNUnet/src/applications/fs/module/ondemand.c (revision 535) @@ -466,14 +466,17 @@ CLOSE(fileHandle); return SYSERR; } + CLOSE(fileHandle); ret = fileBlockEncode(db, ntohl(odb->blockSize) + sizeof(DBlock), query, enc); FREE(db); FREE(fn); - if (ret == SYSERR) + if (ret == SYSERR) { + BREAK(); return SYSERR; + } (*enc)->anonymityLevel = dbv->anonymityLevel; (*enc)->expirationTime = dbv->expirationTime; Index: GNUnet/src/applications/fs/module/fs.c =================================================================== --- GNUnet/src/applications/fs/module/fs.c (revision 506) +++ GNUnet/src/applications/fs/module/fs.c (revision 535) @@ -993,7 +993,7 @@ capi->releaseService(datastore); return SYSERR; } - // dht = capi->requestService("dht"); + /* dht = capi->requestService("dht"); */ dht = NULL; coreAPI = capi; @@ -1056,8 +1056,7 @@ if (dht != NULL) { LOG(LOG_INFO, "Leaving DHT (this may take a while)."); - dht->leave(&dht_table, - 15 * cronSECONDS); + dht->leave(&dht_table); LOG(LOG_INFO, "Leaving DHT complete."); Index: GNUnet/src/applications/fs/fsui/helper.c =================================================================== --- GNUnet/src/applications/fs/fsui/helper.c (revision 506) +++ GNUnet/src/applications/fs/fsui/helper.c (revision 535) @@ -1,6 +1,6 @@ /* This file is part of GNUnet. - (C) 2001, 2002, 2003, 2004 Christian Grothoff (and other contributing authors) + (C) 2001, 2002, 2003, 2004, 2005 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 @@ -113,13 +113,15 @@ for (i=0;i 0) && (0 == strcmp(keywords[i], _("AND"))) ) { strcat(uriString, "+"); + if (i == num_keywords-1) + strcat(uriString, _("AND")); /* last keyword 'AND'? keep it! */ uriLen += 1; } else { if ( (i > 0) && Index: GNUnet/src/applications/fs/fsui/check.conf =================================================================== --- GNUnet/src/applications/fs/fsui/check.conf (revision 0) +++ GNUnet/src/applications/fs/fsui/check.conf (revision 535) @@ -0,0 +1,53 @@ +# This is the configuration for the GNUnet daemon when running +# the test in this directory (make check). + +GNUNETD_HOME = /tmp/gnunet-check-ecrs + +[GNUNETD] +# VALGRIND = 300 +HELOEXPIRES = 60 +LOGLEVEL = NOTHING +LOGFILE = $GNUNETD_HOME/logs +KEEPLOG = 0 +PIDFILE = $GNUNETD_HOME/gnunetd.pid +HOSTS = $GNUNETD_HOME/data/hosts/ +APPLICATIONS = "fs getoption" +# TRANSPORTS = -- no transports! + +[MODULES] +sqstore = "sqstore_sqlite" +# you can also use sqstore_mysql here if +# that DB is available... +topology = "topology_default" + +[NETWORK] +PORT = 2087 +INTERFACE = eth0 +HELOEXCHANGE = NO +TRUSTED = 127.0.0.0/8; + +[LOAD] +INTERFACES = eth0 +BASICLIMITING = YES +MAXNETUPBPSTOTAL = 50000 +MAXNETDOWNBPSTOTAL = 50000 +MAXCPULOAD = 100 + +[FS] +QUOTA = 1024 +ACTIVEMIGRATION = NO +DIR = /tmp/gnunet-ecrs-test/ +INDEX-DIRECTORY = $GNUNETD_HOME/data/shared/ +INDEX-QUOTA = 8192 + +[MYSQL] +DELAYED = NO +DATABASE = gnunetcheck + +[GAP] +TABLESIZE = 65536 + +[DHT] +BUCKETCOUNT = 160 +MASTER-TABLE-SIZE = 65536 + Index: GNUnet/src/applications/fs/fsui/upload.c =================================================================== --- GNUnet/src/applications/fs/fsui/upload.c (revision 506) +++ GNUnet/src/applications/fs/fsui/upload.c (revision 535) @@ -484,7 +484,7 @@ MUTEX_LOCK(&ctx->lock); tl->next = ctx->activeThreads; - ctx->activeThreads = tl->next; + ctx->activeThreads = tl; MUTEX_UNLOCK(&ctx->lock); cleanupFSUIThreadList(ctx); return OK; @@ -551,7 +551,7 @@ MUTEX_LOCK(&ctx->lock); tl->next = ctx->activeThreads; - ctx->activeThreads = tl->next; + ctx->activeThreads = tl; MUTEX_UNLOCK(&ctx->lock); cleanupFSUIThreadList(ctx); return OK; Index: GNUnet/src/applications/fs/fsui/search.c =================================================================== --- GNUnet/src/applications/fs/fsui/search.c (revision 506) +++ GNUnet/src/applications/fs/fsui/search.c (revision 535) @@ -66,8 +66,9 @@ FSUI_trackURI(fi); for (i=0;isizeResultsReceived;i++) if (ECRS_equalsUri(fi->uri, - pos->resultsReceived[i].uri)) + pos->resultsReceived[i].uri)) { return OK; /* seen before */ + } if (pos->numberOfURIKeys > 1) { if (key == NULL) { BREAK(); @@ -79,9 +80,10 @@ rp->fi.uri)) { for (j=0;jmatchingKeyCount;j++) if (equalsHashCode512(key, - &rp->matchingKeys[j])) + &rp->matchingKeys[j])) { return OK; - if (rp->matchingKeyCount + 1 < pos->numberOfURIKeys) { + } + if (rp->matchingKeyCount + 1 == pos->numberOfURIKeys) { GROW(rp->matchingKeys, rp->matchingKeyCount, 0); @@ -163,7 +165,7 @@ pos = MALLOC(sizeof(FSUI_SearchList)); pos->signalTerminate = NO; pos->uri = ECRS_dupUri(uri); - pos->numberOfURIKeys = 1; /* FIXME! */ + pos->numberOfURIKeys = ECRS_countKeywordsOfUri(uri); pos->sizeResultsReceived = 0; pos->resultsReceived = NULL; pos->sizeUnmatchedResultsReceived = 0; Index: GNUnet/src/applications/fs/fsui/fsuitest.c =================================================================== --- GNUnet/src/applications/fs/fsui/fsuitest.c (revision 0) +++ GNUnet/src/applications/fs/fsui/fsuitest.c (revision 535) @@ -0,0 +1,210 @@ +/* + This file is part of GNUnet. + (C) 2004, 2005 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 + by the Free Software Foundation; either version 2, or (at your + option) any later version. + + GNUnet is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNUnet; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. +*/ + +/** + * @file applications/fs/fsui/fsuitest.c + * @brief testcase for fsui (upload-download) + * @author Christian Grothoff + */ + +#include "platform.h" +#include "gnunet_util.h" +#include "gnunet_fsui_lib.h" +#include + +#define CHECK(a) if (!(a)) { ok = NO; BREAK(); goto FAILURE; } + +static int parseCommandLine(int argc, + char * argv[]) { + FREENONNULL(setConfigurationString("GNUNETD", + "_MAGIC_", + "NO")); + FREENONNULL(setConfigurationString("GNUNETD", + "LOGFILE", + NULL)); + FREENONNULL(setConfigurationString("GNUNET", + "LOGLEVEL", + "WARNING")); + return OK; +} + +static char * makeName(unsigned int i) { + char * name; + char * fn; + + fn = STRDUP("/tmp/gnunet-fsuitest"); + name = expandFileName(fn); + mkdirp(name); + FREE(fn); + fn = MALLOC(strlen(name) + 40); + SNPRINTF(fn, + strlen(name) + 40, + "%s%sFSUITEST%u", + DIR_SEPARATOR_STR, + name, + i); + FREE(name); + return fn; +} + +static volatile enum FSUI_EventType lastEvent; +static struct FSUI_Context * ctx; + +static void eventCallback(void * cls, + const FSUI_Event * event) { + char * fn; + + switch(event->type) { + case search_result: + printf("Received search result\n"); + break; + case upload_complete: + printf("Upload complete.\n"); + break; + case download_complete: + printf("Download complete.\n"); + break; + case unindex_complete: + printf("Unindex complete.\n"); + break; + default: + break; + } + if (lastEvent == download_complete) + return; /* ignore all other events */ + lastEvent = event->type; + if (event->type == search_result) { + fn = makeName(43); + FSUI_startDownload(ctx, + 0, + event->data.SearchResult.fi.uri, + fn); + FREE(fn); + } +} + + +int main(int argc, char * argv[]){ + pid_t daemon; + int status; + int ok; + struct ECRS_URI * uri; + char * fn; + char * keywords[] = { + "foo", + "AND", + "bar", + NULL, + }; + int prog; + struct ECRS_MetaData * meta; + + daemon = fork(); + if (daemon == 0) { + if (0 != execlp("gnunetd", /* what binary to execute, must be in $PATH! */ + "gnunetd", /* arg0, path to gnunet binary */ + "-d", /* do not daemonize so we can easily kill you */ + "-c", + "check.conf", /* configuration file */ + NULL)) { + fprintf(stderr, + _("'%s' failed: %s\n"), + "execlp", + STRERROR(errno)); + return -1; + } + } + ok = YES; + initUtil(argc, argv, &parseCommandLine); + startCron(); + gnunet_util_sleep(5 * cronSECONDS); /* give gnunetd time to start */ + + /* ACTUAL TEST CODE */ + ctx = FSUI_start("fsuitest", + NO, + &eventCallback, + NULL); + CHECK(ctx != NULL); + fn = makeName(42); + writeFile(fn, + "foo bar test!", + strlen("foo bar test!"), + "600"); + meta = ECRS_createMetaData(); + CHECK(OK == + FSUI_upload(ctx, + fn, + 0, + YES, + meta, + 3, + (const char**) keywords)); + ECRS_freeMetaData(meta); + prog = 0; + while (lastEvent != upload_complete) { + prog++; + CHECK(prog < 10000) + + gnunet_util_sleep(50 * cronMILLIS); + } + uri = FSUI_parseCharKeywordURI("foo AND bar"); + CHECK(OK == FSUI_startSearch(ctx, + 0, + uri)); + prog = 0; + while (lastEvent != download_complete) { + prog++; + CHECK(prog < 10000); + gnunet_util_sleep(50 * cronMILLIS); + } + FSUI_stopSearch(ctx, + uri); + CHECK(OK == FSUI_unindex(ctx, fn)); + + /* END OF TEST CODE */ + FAILURE: + if (ctx != NULL) + FSUI_stop(ctx); + UNLINK(fn); + FREE(fn); + fn = makeName(43); + /* TODO: verify file 'fn(42)' == file 'fn(43)' */ + UNLINK(fn); + FREE(fn); + + stopCron(); + doneUtil(); + if (daemon != -1) { + if (0 != kill(daemon, SIGTERM)) + DIE_STRERROR("kill"); + if (daemon != waitpid(daemon, &status, 0)) + DIE_STRERROR("waitpid"); + + if ( (WEXITSTATUS(status) == 0) && + (ok == YES) ) + return 0; + else + return 1; + } else { + return 0; + } +} + +/* end of fsuitest.c */ Index: GNUnet/src/applications/fs/fsui/Makefile.am =================================================================== --- GNUnet/src/applications/fs/fsui/Makefile.am (revision 506) +++ GNUnet/src/applications/fs/fsui/Makefile.am (revision 535) @@ -12,6 +12,7 @@ helper.c \ namespace_info.c \ search.c \ + unindex.c \ upload.c libgnunetfsui_la_LIBADD = \ -lextractor \ @@ -19,14 +20,14 @@ $(top_builddir)/src/util/libgnunetutil.la -#check_PROGRAMS = \ -# footest -# -#TESTS = $(check_PROGRAMS) -# -#footest_SOURCES = \ -# footest.c -#footest_LDADD = \ -# $(top_builddir)/src/applications/fs/ecrs/libgnunetecrs.la \ -# $(top_builddir)/src/applications/fs/fsui/libgnunetfsui.la \ -# $(top_builddir)/src/util/libgnunetutil.la +check_PROGRAMS = \ + fsuitest + +TESTS = $(check_PROGRAMS) + +fsuitest_SOURCES = \ + fsuitest.c +fsuitest_LDADD = \ + $(top_builddir)/src/applications/fs/ecrs/libgnunetecrs.la \ + $(top_builddir)/src/applications/fs/fsui/libgnunetfsui.la \ + $(top_builddir)/src/util/libgnunetutil.la Index: GNUnet/src/applications/fs/ecrs/tree.c =================================================================== --- GNUnet/src/applications/fs/ecrs/tree.c (revision 506) +++ GNUnet/src/applications/fs/ecrs/tree.c (revision 535) @@ -18,6 +18,8 @@ Boston, MA 02111-1307, USA. */ +#include "platform.h" +#include "gnunet_util.h" #include "tree.h" /** @@ -29,6 +31,8 @@ unsigned int treeDepth; unsigned long long fl; + GNUNET_ASSERT(DBLOCK_SIZE < MAX_BUFFER_SIZE); + GNUNET_ASSERT(IBLOCK_SIZE < MAX_BUFFER_SIZE); treeDepth = 0; fl = DBLOCK_SIZE; while (fl < flen) { Index: GNUnet/src/applications/fs/ecrs/uri.c =================================================================== --- GNUnet/src/applications/fs/ecrs/uri.c (revision 506) +++ GNUnet/src/applications/fs/ecrs/uri.c (revision 535) @@ -441,7 +441,19 @@ return uri->type == ksk; } + /** + * How many keywords are ANDed in this keyword URI? + * @return 0 if this is not a keyword URI + */ +unsigned int ECRS_countKeywordsOfUri(const struct ECRS_URI * uri) { + if (uri->type != ksk) + return 0; + else + return uri->data.ksk.keywordCount; +} + +/** * Is this a file (or directory) URI? */ int ECRS_isFileURI(const struct ECRS_URI * uri) { Index: GNUnet/src/applications/fs/ecrs/directory.c =================================================================== --- GNUnet/src/applications/fs/ecrs/directory.c (revision 506) +++ GNUnet/src/applications/fs/ecrs/directory.c (revision 535) @@ -69,6 +69,7 @@ &data[8 + sizeof(unsigned int)], mdSize)) { *md = NULL; + BREAK(); return SYSERR; /* malformed !*/ } pos = 8 + sizeof(unsigned int); @@ -87,8 +88,10 @@ while ( (epos < len) && (data[epos] != '\0') ) epos++; - if (epos == len) + if (epos == len) { + BREAK(); return SYSERR; /* malformed */ + } fi.uri = ECRS_stringToUri(&data[pos]); pos = epos+1; @@ -96,6 +99,7 @@ return SYSERR; /* malformed! */ if (ECRS_isKeywordURI(fi.uri)) { ECRS_freeUri(fi.uri); + BREAK(); return SYSERR; /* illegal in directory! */ } @@ -105,6 +109,7 @@ pos += sizeof(unsigned int); if (pos + mdSize > len) { ECRS_freeUri(fi.uri); + BREAK(); return SYSERR; /* malformed! */ } @@ -112,6 +117,7 @@ &data[pos], mdSize)) { ECRS_freeUri(fi.uri); + BREAK(); return SYSERR; /* malformed !*/ } pos += mdSize; Index: GNUnet/src/applications/fs/ecrs/tree.h =================================================================== --- GNUnet/src/applications/fs/ecrs/tree.h (revision 506) +++ GNUnet/src/applications/fs/ecrs/tree.h (revision 535) @@ -26,16 +26,24 @@ /** * Size of a DBlock. Currently set for debugging. * Should be a multiple of 8 and larger than - * sizeof(CHK). [ 32768? ] + * sizeof(CHK). */ -#define DBLOCK_SIZE (sizeof(CHK) * 2 + 8) +#define DBLOCK_SIZE 32768 /** * Pick a multiple of 2 here to achive 8-byte alignment! * We also probably want DBlocks to have (roughly) the - * same size as IBlocks. [ 819? ] + * same size as IBlocks. With SHA-512, the optimal + * value is 32768 byte / 128 byte = 256 + * (128 byte = 2 * 512 bits). */ -#define CHK_PER_INODE 2 +#define CHK_PER_INODE 256 + +/** + * You cannot change this one (directly). Ideally + * CHK_PER_INODE is chosen such that + * IBLOCK_SIZE == DBLOCK_SIZE. + */ #define IBLOCK_SIZE (CHK_PER_INODE * sizeof(CHK)) /** Index: GNUnet/src/applications/fs/ecrs/search.c =================================================================== --- GNUnet/src/applications/fs/ecrs/search.c (revision 506) +++ GNUnet/src/applications/fs/ecrs/search.c (revision 535) @@ -176,34 +176,34 @@ break; } case ksk: { - HashCode512 hc; - HashCode512 query; - struct PrivateKey * pk; - PublicKey pub; - int i; - - LOG(LOG_DEBUG, - "Computing queries (this may take a while).\n"); - for (i=0;idata.ksk.keywordCount;i++) { - hash(uri->data.ksk.keywords[i], - strlen(uri->data.ksk.keywords[i]), - &hc); - pk = makeKblockKey(&hc); - getPublicKey(pk, - &pub); - hash(&pub, - sizeof(PublicKey), - &query); - addPS(ANY_BLOCK, /* K_BLOCK, N_BLOCK or KN_BLOCK ok */ - 1, - &query, - &hc, - sqc); - freePrivateKey(pk); - } - LOG(LOG_DEBUG, - "Queries ready.\n"); - break; + HashCode512 hc; + HashCode512 query; + struct PrivateKey * pk; + PublicKey pub; + int i; + + LOG(LOG_DEBUG, + "Computing queries (this may take a while).\n"); + for (i=0;idata.ksk.keywordCount;i++) { + hash(uri->data.ksk.keywords[i], + strlen(uri->data.ksk.keywords[i]), + &hc); + pk = makeKblockKey(&hc); + getPublicKey(pk, + &pub); + hash(&pub, + sizeof(PublicKey), + &query); + addPS(ANY_BLOCK, /* K_BLOCK, N_BLOCK or KN_BLOCK ok */ + 1, + &query, + &hc, + sqc); + freePrivateKey(pk); + } + LOG(LOG_DEBUG, + "Queries ready.\n"); + break; } case loc: LOG(LOG_ERROR, Index: GNUnet/src/applications/fs/ecrs/upload.c =================================================================== --- GNUnet/src/applications/fs/ecrs/upload.c (revision 506) +++ GNUnet/src/applications/fs/ecrs/upload.c (revision 535) @@ -55,7 +55,11 @@ CHK ichk; EncName enc; - size = ntohl(iblocks[level]->size) - sizeof(Datastore_Value); + size = ntohl(iblocks[level]->size); + GNUNET_ASSERT(size < MAX_BUFFER_SIZE); + GNUNET_ASSERT(size > sizeof(Datastore_Value)); + size -= sizeof(Datastore_Value); + GNUNET_ASSERT(size - sizeof(DBlock) <= IBLOCK_SIZE); present = (size - sizeof(DBlock)) / sizeof(CHK); db = (DBlock*) &iblocks[level][1]; if (present == CHK_PER_INODE) { @@ -103,9 +107,10 @@ memcpy(&((char*)db)[size], chk, sizeof(CHK)); - iblocks[level]->size = htonl(size + - sizeof(CHK) + - sizeof(Datastore_Value)); + size += sizeof(CHK) + sizeof(Datastore_Value); + GNUNET_ASSERT(size < MAX_BUFFER_SIZE); + iblocks[level]->size = htonl(size); + return OK; } @@ -231,6 +236,7 @@ 0, DBLOCK_SIZE); } + GNUNET_ASSERT(sizeof(Datastore_Value) + size + sizeof(DBlock) < MAX_BUFFER_SIZE); dblock->size = htonl(sizeof(Datastore_Value) + size + sizeof(DBlock)); if (size != READ(fd, &db[1], @@ -296,6 +302,7 @@ treedepth); for (i=0;isize) - sizeof(Datastore_Value); + GNUNET_ASSERT(size < MAX_BUFFER_SIZE); if (size == sizeof(DBlock)) { LOG(LOG_DEBUG, "Level %u is empty\n", Index: GNUnet/src/applications/fs/ecrs/ecrstest.c =================================================================== --- GNUnet/src/applications/fs/ecrs/ecrstest.c (revision 506) +++ GNUnet/src/applications/fs/ecrs/ecrstest.c (revision 535) @@ -243,9 +243,6 @@ DBLOCK_SIZE * CHK_PER_INODE - 1, DBLOCK_SIZE * CHK_PER_INODE, DBLOCK_SIZE * CHK_PER_INODE + 1, - DBLOCK_SIZE * CHK_PER_INODE * CHK_PER_INODE - 1, - DBLOCK_SIZE * CHK_PER_INODE * CHK_PER_INODE, - DBLOCK_SIZE * CHK_PER_INODE * CHK_PER_INODE + 1, 1, 2, 4, Index: GNUnet/doc/man/gnunet-pseudonym.1 =================================================================== --- GNUnet/doc/man/gnunet-pseudonym.1 (revision 506) +++ GNUnet/doc/man/gnunet-pseudonym.1 (revision 535) @@ -54,6 +54,9 @@ \fB\-r NAME\fR, \fB\-\-realname=NAME\fR Claim that the name of the author of the content in the namespace in 'real' life is NAME (use with \-C). .TP +\fB\-R IDENTIFIER\fR, \fB\-\-root=IDENTIFIER\fR +Specify the identifier for the root of the namespace. Used in the namespace advertisement to tell users that find the namespace advertisement about an entry-point into the namespace (use with \-C). +.TP \fB\-s ID:VALUE\fR, \fB\-\-set-rating=ID:VALUE\fR Change the rating for the namespace identified by ID by VALUE. For example, "\-s test:-3" decrements the rating of the pseudonym "test" by 3. Note that ratings are purely local. Each user has his own independent rating of namespaces. The rating is merely a way for each user to keep track of his own experience with a given namespace. .TP Index: GNUnet/doc/man/gnunet-unindex.1 =================================================================== --- GNUnet/doc/man/gnunet-unindex.1 (revision 0) +++ GNUnet/doc/man/gnunet-unindex.1 (revision 535) @@ -0,0 +1,35 @@ +.TH GNUNET-UNINDEX "1" "30 Mar 2005" "GNUnet" +.SH NAME +gnunet\-unindex \- a command line interface for deleting indexed files from GNUnet +.SH SYNOPSIS +.B gnunet\-unindex +[\fIOPTIONS\fR] FILENAME +.SH DESCRIPTION +.PP +gnunet\-unindex is used for deleting indexed files from GNUnet. +.TP +\fB\-h\fR, \fB\-\-help\fR +print help page +.TP +\fB\-c \fIFILENAME\fR, \fB\-\-config=FILENAME\fR +use config file (defaults: ~/.gnunet/gnunet.conf) +.TP +\fB\-v\fR, \fB\-\-version\fR +print the version number +.TP +\fB\-V\fR, \fB\-\-verbose\fR +be berbose; prints progress information and the hash-pair, CRC and filesize that can be used to download the file +.TP +\fB\-L \fILOGLEVEL\fR, \fB\-\-loglevel=LOGLEVEL\fR +change the loglevel. Possible values for LOGLEVEL are NOTHING, FATAL, ERROR, FAILURE, WARNING, MESSAGE, INFO, DEBUG, CRON and EVERYTHING. +.SH NOTES +You can only unindex files that you indexed and that you still have available locally in full. You should use gnunet\-unindex on files that you indexed (not inserted) and that you are going to delete or move locally. +.TP +.SH FILES +.TP +~/.gnunet/gnunet.conf +GNUnet configuration file +.SH "REPORTING BUGS" +Report bugs by using mantis or by sending electronic mail to +.SH "SEE ALSO" +\fBgnunet\-gtk\fP(1), \fBgnunet\-insert\fP(1), \fBgnunet\-gtk\fP(1), \fBgnunet\-search\fP(1), \fBgnunet\-download\fP(1), \fBgnunet.conf\fP(5), \fBgnunetd\fP(1) Index: GNUnet/doc/man/Makefile.am =================================================================== --- GNUnet/doc/man/Makefile.am (revision 506) +++ GNUnet/doc/man/Makefile.am (revision 535) @@ -3,22 +3,22 @@ endif man_MANS = $(gdmpage) \ +gnunet-chat.1\ gnunet-directory.1 \ gnunet-download.1 \ gnunet-gtk.1 \ gnunet-insert.1 \ -gnunet-delete.1 \ gnunet-search.1 \ -gnunet-chat.1\ -gnunetd.1 \ -gnunet-pseudonym.1 \ gnunet-stats.1 \ -gnunet-transport-check.1 \ gnunet-tbench.1 \ gnunet-testbed.1 \ gnunet-tracekit.1 \ +gnunet-transport-check.1 \ +gnunet-peer-info.1 \ +gnunet-pseudonym.1 \ +gnunet-unindex.1 \ gnunet-update.1 \ -gnunet-peer-info.1 \ +gnunetd.1 \ gnunet.conf.5 EXTRA_DIST = $(man_MANS) \ Index: GNUnet/doc/man/gnunet-delete.1 =================================================================== --- GNUnet/doc/man/gnunet-delete.1 (revision 506) +++ GNUnet/doc/man/gnunet-delete.1 (revision 535) @@ -1,40 +0,0 @@ -.TH GNUNET-DELETE "1" "05 Apr 2003" "GNUnet" -.SH NAME -gnunet-delete \- a command line interface for deleting indexed files from GNUnet -.SH SYNOPSIS -.B gnunet\-delete -[\fIOPTIONS\fR] \-f FILENAME -.SH DESCRIPTION -.PP -gnunet-delete is used for deleting indexed files from GNUnet. -.TP -\fB\-h\fR, \fB\-\-help\fR -print help page -.TP -\fB\-c \fIFILENAME\fR, \fB\-\-config=FILENAME\fR -use config file (defaults: ~/.gnunet/gnunet.conf) -.TP -\fB\-v\fR, \fB\-\-version\fR -print the version number -.TP -\fB\-V\fR, \fB\-\-verbose\fR -be berbose; prints progress information and the hash-pair, CRC and filesize that can be used to download the file -.TP -\fB\-f \fIFILENAME\fR, \fB\-\-file=FILENAME\fR -delete FILENAME (obligatory) -.TP -\fB\-L \fILOGLEVEL\fR, \fB\-\-loglevel=LOGLEVEL\fR -change the loglevel. Possible values for LOGLEVEL are NOTHING, FATAL, ERROR, FAILURE, WARNING, MESSAGE, INFO, DEBUG, CRON and EVERYTHING. -.SH NOTES -The option -f is used to specify the name of the file that should be deleted. -.TP -You can only delete files that you indexed (or inserted?? FIXME!) and that you still have available locally in full. You should use gnunet-delete on files that you indexed (not inserted) and that you are going to delete locally. -.TP -.SH FILES -.TP -~/.gnunet/gnunet.conf -GNUnet configuration file -.SH "REPORTING BUGS" -Report bugs by using mantis or by sending electronic mail to -.SH "SEE ALSO" -\fBgnunet\-gtk\fP(1), \fBgnunet\-insert\fP(1), \fBgnunet\-gtk\fP(1), \fBgnunet\-search\fP(1), \fBgnunet\-download\fP(1), \fBgnunet.conf\fP(5), \fBgnunetd\fP(1) Index: GNUnet/todo =================================================================== --- GNUnet/todo (revision 506) +++ GNUnet/todo (revision 535) @@ -1,11 +1,8 @@ 0.7.0pre1 [4'05] (aka "preview"): -Testing: -- multi-peer: - * fix dhttest (currently fails) - * extend dht test to actually test get/put/del -- FSUI +* directorytest (ECRS) also fails +* package & re-run final tests -0.7.0 [5'05] (aka "compatibility? what's that?"): +0.7.0 [6'05?] (aka "compatibility? what's that?"): - Features removed but to be revived: * gnunet-gtk - Missing Features: @@ -14,29 +11,36 @@ * read 'friends' list for topology_f2f * #593 (gnunet-setup) * #770? (use freedback (LOG) in gnunet-gtk via show-messages) -- Optimizations: - * spread out scanning done in topology_*.c? - * fsui download: limit parallelism (currently unlimited, old gnunet-download allowed - user to specify maximum amount of parallelism) [ tricky ] -- Additional testing: +- Additional (automated, make check-style) testing: * gnunet-tracekit * gap and economy - * DHT - * FSUI (in particular persistence) + * FSUI: + + persistence + + collections + + recursive uploads and downloads + + namespaces + + URI tracking - Documentation: * ECRS block format changes (dramatic!) * gnunet-directory (no more categories) and gnunet-pseudonym (no passwords) * Hacking GNUnet - * LJ article 0.7.x (aka "stabilization"): +- Optimizations: + * spread out scanning done in topology_*.c? + * fsui download: limit parallelism (currently unlimited, old gnunet-download allowed + user to specify maximum amount of parallelism) [ tricky ] - gnunet-chat -- XFS [ location URIs ] +- DHT: + * make dht tests work + * XFS [ location URIs ] - DHT optimizations [ use additional optional fields (HELOs) ] - #747 (sharing stats for gnunet-gtk) - insert meta-data under hash (md5? sha1? sha-512? GNUnet-URI?) as keyword (to allow getting meta-data from URI only) - #678 (directory browser) +- Documentation: + * LJ article 1.0.0 (aka "userfriendly"): - implement testbed for profiling Index: Extractor-docs/WWW/i18nhtml.inc =================================================================== --- Extractor-docs/WWW/i18nhtml.inc (revision 506) +++ Extractor-docs/WWW/i18nhtml.inc (revision 535) @@ -119,9 +119,9 @@ if ($xlang) $lang = $xlang; $lang = ucfirst(strtolower($lang)); +$editor = $_REQUEST['editor']; - $htmlin = array("’", ">", """, "′", "&"); $htmlout = array("’" , ">", """ , "′" , "&"); @@ -441,7 +441,7 @@ DD($b); } function LILI($a,$b) { - echo "
  • " . TRANSLATE_($b) . "" . translateLink_($b) . "
  • "; + echo "
  • " . translateLink_($b) . "
  • "; } function IMG($src, $alt, $align="CENTER", $width, $height, $border=0, $hspace=0, $vspace=0) { echo IMG_($src, $alt, $align, $width, $height, $border, $hspace, $vspace); Index: i18nHTML/src/i18nhtml.inc =================================================================== --- i18nHTML/src/i18nhtml.inc (revision 506) +++ i18nHTML/src/i18nhtml.inc (revision 535) @@ -119,9 +119,9 @@ if ($xlang) $lang = $xlang; $lang = ucfirst(strtolower($lang)); +$editor = $_REQUEST['editor']; - $htmlin = array("’", ">", """, "′", "&"); $htmlout = array("’" , ">", """ , "′" , "&"); Index: GNUnet-docs/WWW/hacking_testcases.php3 =================================================================== --- GNUnet-docs/WWW/hacking_testcases.php3 (revision 0) +++ GNUnet-docs/WWW/hacking_testcases.php3 (revision 535) @@ -0,0 +1,88 @@ +test."); +W("Typically it is desireable to have testcases both for low-level functions and high-level abstractions."); +W("For example, while the cryptographic functions would be tested as part of the session key exchange, they should also still be tested independently."); +P(); +H3("Integration with GNU autotools"); +P(); +W("Testcases in GNUnet should be integrated with the autotools build system."); +W("This way, developers and anyone building binary packages will be able to run all testcases simply by running make check."); +W("The final testcases shipped with the distribution should output at most some brief progress information and not display debug messages."); +W("The success or failure of a testcase must be indicated by returning zero (success) or non-zero (failure) from the main method of the testcase."); +W("The integration with the autotools is relatively straightforward and only requires modifications to the Makefile.am in the directory containing the testcase."); +W("For three testcases testing the code in foo.c, bar.c and etc.c, the Makefile.am would contain the following lines:"); +PRE("check_PROGRAMS = footest bartest etctest\n" . + "TESTS = $(check_PROGRAMS)\n" . + "footest_SOURCES = footest.c\n" . + "footest_LDADD = $(top_builddir)/src/util/libgnunetutil.la\n" . + "bartest_SOURCES = bartest.c\n" . + "bartest_LDADD = $(top_builddir)/src/util/libgnunetutil.la\n" . + "etctest_SOURCES = etctest.c\n" . + "etctest_LDADD = $(top_builddir)/src/util/libgnunetutil.la\n"); +W("Naturally, other libraries used by the testcase may be specified in the LDADD directive as necessary."); +BR(); +W("Often testcases depend on additional input files, such as a configuration file."); +W("These support files have to be listed using the EXTRA_DIST directive in order to ensure that they are included in the distribution."); +W("Example:"); +PRE("EXTRA_DIST = check.conf\n"); +P(); +W("Executing make check will run all testcases in the current directory and all subdirectories."); +W("Testcases can be compiled individually by running make footest and then invoked directly using ./footest."); +W("Note that due to the use of plugins in GNUnet, it is typically necessary to run make install before running any testcases."); +W("Thus the canonical command make check install has to be changed to make install check for GNUnet."); +P(); +H3("Common problems and solutions"); +W("When testing GNUnet, the splitting of the code into a daemon and clients often complicates testing."); +W("The solution to this is to have the testcase fork a gnunetd process and then execute appropriate client actions (to test the client APIs or the core module or both)."); +W("If necessary, multiple daemons can be forked using different ports (!) to simulate a network."); +W("However, most of the time only one gnunetd process is needed."); +W("Also note that some client libraries were not written to communicate with multiple daemons over multiple trusted TCP connections at the same time, which may complicate testing in such situations."); +W("Note that on exit, the testcase should shutdown gnunetd with a kill signal."); +W("The following code illustrates spawning and killing a gnunetd process from a testcase:"); +PRE("pid_t daemon; \n" . + "daemon = fork();\n" . + "if (daemon == 0) {\n" . + " if (0 != execlp(\"gnunetd\",\n" . + " \"gnunetd\",\n" . + " \"-d\",\n" . + " \"-c\", \"check.conf\",\n" . + " NULL)) {\n" . + " fprintf(stderr,\n" . + " _(\"'%s' failed: %s\\n\"),\n" . + " \"execlp\",\n" . + " STRERROR(errno));\n" . + " return -1;\n" . + " }\n" . + "}\n" . + "/* put actual testcode here */\n" . + "if (daemon != -1) {\n" . + " if (0 != kill(daemon, SIGTERM))\n" . + " DIE_STRERROR(\"kill\");\n" . + " if (daemon != waitpid(daemon, &status, 0))\n" . + " DIE_STRERROR(\"waitpid\");\n" . + " if (WEXITSTATUS(status) == 0)\n" . + " return -1; /* server had error */\n" . + "}\n"); +P(); +W("An alternative way to just test modules (in particular if there is no client API to start with) is to implement a mock-version of the GNUnet core API and emulate a gnunetd environment for the module."); +W("An example for this is the %s.", + extlink_("doxygen/html/fragmentationtest_8c.html", "fragmentationtest.c")); +BR(); +W("Another uncommonly used alternative is to have the testcase process itself load the modules by initiating the full gnunetd startup sequence."); +W("For that, the testcase must link against libgnunetcore."); +W("For an example see %s.", + extlink_("doxygen/html/gnunet-transport-check_8c.html", "gnunet-transport-check.c")); + +include("html_footer.php3"); +?> + Index: GNUnet-docs/WWW/i18nhtml.inc =================================================================== --- GNUnet-docs/WWW/i18nhtml.inc (revision 506) +++ GNUnet-docs/WWW/i18nhtml.inc (revision 535) @@ -119,9 +119,9 @@ if ($xlang) $lang = $xlang; $lang = ucfirst(strtolower($lang)); +$editor = $_REQUEST['editor']; - $htmlin = array("’", ">", """, "′", "&"); $htmlout = array("’" , ">", """ , "′" , "&"); @@ -440,6 +440,9 @@ DT($a); DD($b); } +function LILI($a,$b) { + echo "
  • " . translateLink_($b) . "
  • "; +} function IMG($src, $alt, $align="CENTER", $width, $height, $border=0, $hspace=0, $vspace=0) { echo IMG_($src, $alt, $align, $width, $height, $border, $hspace, $vspace); } Index: GNUnet-docs/WWW/download.php3 =================================================================== --- GNUnet-docs/WWW/download.php3 (revision 506) +++ GNUnet-docs/WWW/download.php3 (revision 535) @@ -26,7 +26,7 @@ gtk+ >= 2.4
  • GNU gettext (>= 0.14.1)
  • -
  • +
  • autoconf (>= 2.59) automake (>= 1.7.6) libtool (>= 1.5.6) @@ -34,8 +34,8 @@ \n"; P(); -H2("CVS access"); -W("You can access the current CVS version of GNUnet using"); +H2("SVN access"); +W("You can access the current SVN version of GNUnet using"); PRE("$ svn checkout https://gnunet.org/svn/GNUnet/"); W("For access to the GNUnet 0.6.x branch use:"); PRE("$ svn checkout https://gnunet.org/svn/branches/GNUnet06/"); Index: GNUnet-docs/WWW/papers/herbivore-esigops.pdf =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Property changes on: GNUnet-docs/WWW/papers/herbivore-esigops.pdf ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Index: GNUnet-docs/WWW/news_20050401.inc =================================================================== --- GNUnet-docs/WWW/news_20050401.inc (revision 0) +++ GNUnet-docs/WWW/news_20050401.inc (revision 535) @@ -0,0 +1,43 @@ +not your usual GNUnet release."); +W("You are strongly encouraged to read this before trying to use it."); +W("This release primarily fixes a large number of bugs from 0.7.0pre0 and (hopefully) finalizes the protocol and formats for a while."); +W("As such, it breaks compatibility with all previous releases."); +W("The advertising of the usual set of new features will be done for 0.7.0."); +W("Instead, here is the list of things (in order of importance) that are missing to make the 0.7.0 milestone:"); + +echo "
      "; +LI("gnunet-gtk"); +LI("gnunet-setup"); +LI("documentation of changes"); +LI("FSUI core persistence"); +LI("(more) automated testcases for tracekit, gap, FSUI"); +LI("F2F topology configuration"); +echo "
    "; +BR(); +W("Also, some features have already been deferred for later in the 0.7.x series:"); +echo "
      "; +LI("gnunet-chat"); +LI("DHT"); +LI("meta-data finder"); +LI("directory browser"); +LI("various optimizations"); +echo "
    "; +P(); +W("The goals for this pre-release are to:"); +echo "
      "; +LI("bootstrap the network"); +LI("see if there are any problems with the code if the size of the network goes beyond the small testbeds that individual developers can run"); +LI("give packagers a chance to test their build-process"); +LI("give developers an opportunity to test (graphical) user interfaces"); +echo "
    "; +W("In summary, please try to run this code, even if it maybe not super-stable and lacks a graphical user interface."); +W("Please report any bugs you find to %s.", + extlink_("https://gnunet.org/mantis/", "mantis")); +W("Note that all protocols and storage formats have changed, so you may want to make sure that when trying 0.7.0 you do not accidentially overwrite or use files from 0.6.x."); +W("Migrating data from 0.6.x is not possible."); +W("However, you can run 0.7.x and 0.6.x in parallel if you use different ports and directories."); +?> Index: GNUnet-docs/WWW/hacking_index.inc =================================================================== --- GNUnet-docs/WWW/hacking_index.inc (revision 506) +++ GNUnet-docs/WWW/hacking_index.inc (revision 535) @@ -3,6 +3,7 @@
  • +
  • Index: GNUnet-docs/WWW/download/win/libwimp.zip =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Property changes on: GNUnet-docs/WWW/download/win/libwimp.zip ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Index: GNUnet-docs/WWW/download/win/libwimp.zip.asc =================================================================== --- GNUnet-docs/WWW/download/win/libwimp.zip.asc (revision 0) +++ GNUnet-docs/WWW/download/win/libwimp.zip.asc (revision 535) @@ -0,0 +1,7 @@ +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1.2.5 (MingW32) + +iD8DBQBCSCJcRoCmKAbQIS4RAlLIAJ94u7bd+cNrGPSYPPJqBzYcWG8UCwCghJB7 +sUPNeyLCu9Erjc/CE2Umosc= +=HcAc +-----END PGP SIGNATURE----- Index: i18nHTML-docs/WWW/i18nhtml.inc =================================================================== --- i18nHTML-docs/WWW/i18nhtml.inc (revision 506) +++ i18nHTML-docs/WWW/i18nhtml.inc (revision 535) @@ -119,9 +119,9 @@ if ($xlang) $lang = $xlang; $lang = ucfirst(strtolower($lang)); +$editor = $_REQUEST['editor']; - $htmlin = array("’", ">", """, "′", "&"); $htmlout = array("’" , ">", """ , "′" , "&"); @@ -440,6 +440,9 @@ DT($a); DD($b); } +function LILI($a,$b) { + echo "
  • " . translateLink_($b) . "
  • "; +} function IMG($src, $alt, $align="CENTER", $width, $height, $border=0, $hspace=0, $vspace=0) { echo IMG_($src, $alt, $align, $width, $height, $border, $hspace, $vspace); } Index: doodle-docs/WWW/i18nhtml.inc =================================================================== --- doodle-docs/WWW/i18nhtml.inc (revision 506) +++ doodle-docs/WWW/i18nhtml.inc (revision 535) @@ -119,9 +119,9 @@ if ($xlang) $lang = $xlang; $lang = ucfirst(strtolower($lang)); +$editor = $_REQUEST['editor']; - $htmlin = array("’", ">", """, "′", "&"); $htmlout = array("’" , ">", """ , "′" , "&"); @@ -440,6 +440,9 @@ DT($a); DD($b); } +function LILI($a,$b) { + echo "
  • " . translateLink_($b) . "
  • "; +} function IMG($src, $alt, $align="CENTER", $width, $height, $border=0, $hspace=0, $vspace=0) { echo IMG_($src, $alt, $align, $width, $height, $border, $hspace, $vspace); }