From: Christian Grothoff Date: Mon, 24 Jan 2011 12:31:24 +0000 (+0000) Subject: fix simulation option X-Git-Tag: initial-import-from-subversion-38251~19275 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=aa1edde6f111b908c6c8d9a7b5c4444655577e5b;p=oweals%2Fgnunet.git fix simulation option --- diff --git a/src/fs/fs_publish.c b/src/fs/fs_publish.c index 6c933a37d..ac69c94a1 100644 --- a/src/fs/fs_publish.c +++ b/src/fs/fs_publish.c @@ -838,6 +838,16 @@ hash_for_index_cb (void *cls, p->filename, GNUNET_h2s (res)); #endif + if (0 != (sc->options & GNUNET_FS_PUBLISH_OPTION_SIMULATE_ONLY)) + { + p->data.file.file_id = *res; + p->data.file.have_hash = GNUNET_YES; + p->data.file.index_start_confirmed = GNUNET_YES; + GNUNET_FS_file_information_sync_ (p); + publish_content (sc); + GNUNET_free (fn); + return; + } client = GNUNET_CLIENT_connect ("fs", sc->h->cfg); if (NULL == client) @@ -1261,6 +1271,7 @@ GNUNET_FS_publish_start (struct GNUNET_FS_Handle *h, ret->h = h; ret->fi = fi; ret->namespace = namespace; + ret->options = options; if (namespace != NULL) { namespace->rc++;