diff options
author | Christian Grothoff <christian@grothoff.org> | 2010-04-16 11:58:00 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2010-04-16 11:58:00 +0000 |
commit | 3c717abed1c6fb4bc82bc7855e0fe75f4ffdf849 (patch) | |
tree | b44ac20bc16edac7f6e20ee6c37cc5ef220c5a9f /src/fs | |
parent | 86fe7ccb1f18a3bd9f086e0f127062a073ae8601 (diff) | |
download | gnunet-3c717abed1c6fb4bc82bc7855e0fe75f4ffdf849.tar.gz gnunet-3c717abed1c6fb4bc82bc7855e0fe75f4ffdf849.zip |
fs fix
Diffstat (limited to 'src/fs')
-rw-r--r-- | src/fs/fs_download.c | 2 | ||||
-rw-r--r-- | src/fs/fs_publish.c | 4 | ||||
-rw-r--r-- | src/fs/fs_tree.c | 4 |
3 files changed, 7 insertions, 3 deletions
diff --git a/src/fs/fs_download.c b/src/fs/fs_download.c index 934f3567f..6e215ed27 100644 --- a/src/fs/fs_download.c +++ b/src/fs/fs_download.c | |||
@@ -38,7 +38,7 @@ | |||
38 | #include "fs.h" | 38 | #include "fs.h" |
39 | #include "fs_tree.h" | 39 | #include "fs_tree.h" |
40 | 40 | ||
41 | #define DEBUG_DOWNLOAD GNUNET_YES | 41 | #define DEBUG_DOWNLOAD GNUNET_NO |
42 | 42 | ||
43 | /** | 43 | /** |
44 | * We're storing the IBLOCKS after the DBLOCKS on disk (so that we | 44 | * We're storing the IBLOCKS after the DBLOCKS on disk (so that we |
diff --git a/src/fs/fs_publish.c b/src/fs/fs_publish.c index 79ffd1886..fac75a848 100644 --- a/src/fs/fs_publish.c +++ b/src/fs/fs_publish.c | |||
@@ -40,7 +40,7 @@ | |||
40 | #include "fs.h" | 40 | #include "fs.h" |
41 | #include "fs_tree.h" | 41 | #include "fs_tree.h" |
42 | 42 | ||
43 | #define DEBUG_PUBLISH GNUNET_YES | 43 | #define DEBUG_PUBLISH GNUNET_NO |
44 | 44 | ||
45 | /** | 45 | /** |
46 | * Main function that performs the upload. | 46 | * Main function that performs the upload. |
@@ -129,6 +129,8 @@ publish_cleanup (struct GNUNET_FS_PublishContext *sc) | |||
129 | GNUNET_free_non_null (sc->nid); | 129 | GNUNET_free_non_null (sc->nid); |
130 | GNUNET_free_non_null (sc->nuid); | 130 | GNUNET_free_non_null (sc->nuid); |
131 | GNUNET_DATASTORE_disconnect (sc->dsh, GNUNET_NO); | 131 | GNUNET_DATASTORE_disconnect (sc->dsh, GNUNET_NO); |
132 | if (sc->client != NULL) | ||
133 | GNUNET_CLIENT_disconnect (sc->client, GNUNET_NO); | ||
132 | GNUNET_free (sc); | 134 | GNUNET_free (sc); |
133 | } | 135 | } |
134 | 136 | ||
diff --git a/src/fs/fs_tree.c b/src/fs/fs_tree.c index e8b1f469d..1280548d8 100644 --- a/src/fs/fs_tree.c +++ b/src/fs/fs_tree.c | |||
@@ -31,7 +31,7 @@ | |||
31 | #include "platform.h" | 31 | #include "platform.h" |
32 | #include "fs_tree.h" | 32 | #include "fs_tree.h" |
33 | 33 | ||
34 | #define DEBUG_TREE GNUNET_YES | 34 | #define DEBUG_TREE GNUNET_NO |
35 | 35 | ||
36 | /** | 36 | /** |
37 | * Context for an ECRS-based file encoder that computes | 37 | * Context for an ECRS-based file encoder that computes |
@@ -251,6 +251,8 @@ compute_chk_offset (unsigned int height, | |||
251 | corresponds to */ | 251 | corresponds to */ |
252 | for (i=0;i<height;i++) | 252 | for (i=0;i<height;i++) |
253 | bds *= CHK_PER_INODE; | 253 | bds *= CHK_PER_INODE; |
254 | if (height > 0) | ||
255 | offset--; /* round down since for height > 0 offset is at the END of the block */ | ||
254 | ret = offset / bds; | 256 | ret = offset / bds; |
255 | return ret % CHK_PER_INODE; | 257 | return ret % CHK_PER_INODE; |
256 | } | 258 | } |