diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-01-24 12:31:24 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-01-24 12:31:24 +0000 |
commit | aa1edde6f111b908c6c8d9a7b5c4444655577e5b (patch) | |
tree | 9800eeb21299e0ad37995537b80dd6d7109a2fb9 /src/fs | |
parent | 25e533959af4f98e80576e14a04f26424fb4eaa4 (diff) | |
download | gnunet-aa1edde6f111b908c6c8d9a7b5c4444655577e5b.tar.gz gnunet-aa1edde6f111b908c6c8d9a7b5c4444655577e5b.zip |
fix simulation option
Diffstat (limited to 'src/fs')
-rw-r--r-- | src/fs/fs_publish.c | 11 |
1 files changed, 11 insertions, 0 deletions
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, | |||
838 | p->filename, | 838 | p->filename, |
839 | GNUNET_h2s (res)); | 839 | GNUNET_h2s (res)); |
840 | #endif | 840 | #endif |
841 | if (0 != (sc->options & GNUNET_FS_PUBLISH_OPTION_SIMULATE_ONLY)) | ||
842 | { | ||
843 | p->data.file.file_id = *res; | ||
844 | p->data.file.have_hash = GNUNET_YES; | ||
845 | p->data.file.index_start_confirmed = GNUNET_YES; | ||
846 | GNUNET_FS_file_information_sync_ (p); | ||
847 | publish_content (sc); | ||
848 | GNUNET_free (fn); | ||
849 | return; | ||
850 | } | ||
841 | client = GNUNET_CLIENT_connect ("fs", | 851 | client = GNUNET_CLIENT_connect ("fs", |
842 | sc->h->cfg); | 852 | sc->h->cfg); |
843 | if (NULL == client) | 853 | if (NULL == client) |
@@ -1261,6 +1271,7 @@ GNUNET_FS_publish_start (struct GNUNET_FS_Handle *h, | |||
1261 | ret->h = h; | 1271 | ret->h = h; |
1262 | ret->fi = fi; | 1272 | ret->fi = fi; |
1263 | ret->namespace = namespace; | 1273 | ret->namespace = namespace; |
1274 | ret->options = options; | ||
1264 | if (namespace != NULL) | 1275 | if (namespace != NULL) |
1265 | { | 1276 | { |
1266 | namespace->rc++; | 1277 | namespace->rc++; |