summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2010-04-16 11:58:00 +0000
committerChristian Grothoff <christian@grothoff.org>2010-04-16 11:58:00 +0000
commit3c717abed1c6fb4bc82bc7855e0fe75f4ffdf849 (patch)
treeb44ac20bc16edac7f6e20ee6c37cc5ef220c5a9f
parent86fe7ccb1f18a3bd9f086e0f127062a073ae8601 (diff)
fs fix
-rw-r--r--contrib/defaults.conf1
-rw-r--r--src/fs/fs_download.c2
-rw-r--r--src/fs/fs_publish.c4
-rw-r--r--src/fs/fs_tree.c4
4 files changed, 8 insertions, 3 deletions
diff --git a/contrib/defaults.conf b/contrib/defaults.conf
index 3c7f57bf2..080c87e1d 100644
--- a/contrib/defaults.conf
+++ b/contrib/defaults.conf
@@ -163,6 +163,7 @@ BINARY = gnunet-daemon-topology
HTTPPORT = 8080
HOSTNAME = localhost
HOME = $SERVICEHOME
+HOSTLISTFILE = $SERVICEHOME/hostlist/learned.data
CONFIG = $DEFAULTCONFIG
BINARY = gnunet-daemon-hostlist
# consider having "-e" as default as well once implemented
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 @@
#include "fs.h"
#include "fs_tree.h"
-#define DEBUG_DOWNLOAD GNUNET_YES
+#define DEBUG_DOWNLOAD GNUNET_NO
/**
* 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 @@
#include "fs.h"
#include "fs_tree.h"
-#define DEBUG_PUBLISH GNUNET_YES
+#define DEBUG_PUBLISH GNUNET_NO
/**
* Main function that performs the upload.
@@ -129,6 +129,8 @@ publish_cleanup (struct GNUNET_FS_PublishContext *sc)
GNUNET_free_non_null (sc->nid);
GNUNET_free_non_null (sc->nuid);
GNUNET_DATASTORE_disconnect (sc->dsh, GNUNET_NO);
+ if (sc->client != NULL)
+ GNUNET_CLIENT_disconnect (sc->client, GNUNET_NO);
GNUNET_free (sc);
}
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 @@
#include "platform.h"
#include "fs_tree.h"
-#define DEBUG_TREE GNUNET_YES
+#define DEBUG_TREE GNUNET_NO
/**
* Context for an ECRS-based file encoder that computes
@@ -251,6 +251,8 @@ compute_chk_offset (unsigned int height,
corresponds to */
for (i=0;i<height;i++)
bds *= CHK_PER_INODE;
+ if (height > 0)
+ offset--; /* round down since for height > 0 offset is at the END of the block */
ret = offset / bds;
return ret % CHK_PER_INODE;
}