[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r3395 - in GNUnet: . src/applications/fs/ecrs src/util/disk
From: |
grothoff |
Subject: |
[GNUnet-SVN] r3395 - in GNUnet: . src/applications/fs/ecrs src/util/disk |
Date: |
Sun, 10 Sep 2006 22:58:29 -0700 (PDT) |
Author: grothoff
Date: 2006-09-10 22:58:23 -0700 (Sun, 10 Sep 2006)
New Revision: 3395
Modified:
GNUnet/src/applications/fs/ecrs/download.c
GNUnet/src/applications/fs/ecrs/namespace.c
GNUnet/src/applications/fs/ecrs/unindex.c
GNUnet/src/applications/fs/ecrs/upload.c
GNUnet/src/util/disk/storage.c
GNUnet/todo
Log:
ecrs testcases pass
Modified: GNUnet/src/applications/fs/ecrs/download.c
===================================================================
--- GNUnet/src/applications/fs/ecrs/download.c 2006-09-11 05:41:47 UTC (rev
3394)
+++ GNUnet/src/applications/fs/ecrs/download.c 2006-09-11 05:58:23 UTC (rev
3395)
@@ -221,7 +221,7 @@
buf,
len);
MUTEX_UNLOCK(this->lock);
-#ifdef DEBUG_DOWNLOAD
+#if DEBUG_DOWNLOAD
GE_LOG(this->ectx,
GE_DEBUG | GE_REQUEST | GE_USER,
"IOC read at level %u offset %llu wanted %u got %d\n",
@@ -267,7 +267,7 @@
STRERROR(errno));
}
MUTEX_UNLOCK(this->lock);
-#ifdef DEBUG_DOWNLOAD
+#if DEBUG_DOWNLOAD
GE_LOG(this->ectx,
GE_DEBUG | GE_REQUEST | GE_USER,
"IOC write at level %u offset %llu writes %u\n",
@@ -474,7 +474,7 @@
= 1; /* RSS is 1 */
rm->ssthresh
= 65535;
-#ifdef DEBUG_DOWNLOAD
+#if DEBUG_DOWNLOAD
GE_LOG(ectx,
GE_DEBUG | GE_REQUEST | GE_USER,
"created request manager %p\n",
@@ -493,7 +493,7 @@
static void destroyRequestManager(RequestManager * rm) {
int i;
-#ifdef DEBUG_DOWNLOAD
+#if DEBUG_DOWNLOAD
GE_LOG(rm->ectx,
GE_DEBUG | GE_REQUEST | GE_USER,
"destroying request manager %p\n",
@@ -822,7 +822,7 @@
} else
ret = NO;
FREE(data);
-#ifdef DEBUG_DOWNLOAD
+#if DEBUG_DOWNLOAD
GE_LOG(node->ctx->rm->ectx,
GE_DEBUG | GE_REQUEST | GE_USER,
"Checked presence of block at %llu level %u. Result: %s\n",
Modified: GNUnet/src/applications/fs/ecrs/namespace.c
===================================================================
--- GNUnet/src/applications/fs/ecrs/namespace.c 2006-09-11 05:41:47 UTC (rev
3394)
+++ GNUnet/src/applications/fs/ecrs/namespace.c 2006-09-11 05:58:23 UTC (rev
3395)
@@ -69,9 +69,14 @@
int ECRS_deleteNamespace(struct GE_Context * ectx,
struct GC_Configuration * cfg,
const char * name) {
- char * fileName;
-
- fileName = getPseudonymFileName(ectx, cfg, name);
+ char * fileName;
+
+ fileName = getPseudonymFileName(ectx, cfg, name);
+ if (YES != disk_file_test(ectx,
+ fileName)) {
+ FREE(fileName);
+ return SYSERR; /* no such namespace */
+ }
if (0 != UNLINK(fileName)) {
GE_LOG_STRERROR_FILE(ectx,
GE_WARNING | GE_USER | GE_BULK,
@@ -79,10 +84,9 @@
fileName);
FREE(fileName);
return SYSERR;
- } else {
- FREE(fileName);
- return OK;
}
+ FREE(fileName);
+ return OK;
}
/**
@@ -117,7 +121,6 @@
const HashCode512 * rootEntry) {
struct ECRS_URI * rootURI;
char * fileName;
- char tmp;
struct PrivateKey * hk;
PrivateKeyEncoded * hke;
char * dst;
@@ -144,10 +147,8 @@
fileName = getPseudonymFileName(ectx,
cfg,
name);
- if (1 == disk_file_read(ectx,
- fileName,
- 1,
- &tmp)) {
+ if (YES == disk_file_test(ectx,
+ fileName)) {
GE_LOG(ectx,
GE_ERROR | GE_BULK | GE_USER,
_("Cannot create pseudonym `%s', file `%s' exists.\n"),
Modified: GNUnet/src/applications/fs/ecrs/unindex.c
===================================================================
--- GNUnet/src/applications/fs/ecrs/unindex.c 2006-09-11 05:41:47 UTC (rev
3394)
+++ GNUnet/src/applications/fs/ecrs/unindex.c 2006-09-11 05:58:23 UTC (rev
3395)
@@ -202,14 +202,10 @@
int wasIndexed;
start = get_time();
- if (disk_directory_test(ectx, filename)) {
+ if (YES != disk_file_test(ectx, filename)) {
GE_BREAK(ectx, 0);
return SYSERR;
}
- if (0 == disk_file_test(ectx, filename)) {
- GE_BREAK(ectx, 0);
- return SYSERR;
- }
if (OK != disk_file_size(ectx,
filename,
&filesize,
Modified: GNUnet/src/applications/fs/ecrs/upload.c
===================================================================
--- GNUnet/src/applications/fs/ecrs/upload.c 2006-09-11 05:41:47 UTC (rev
3394)
+++ GNUnet/src/applications/fs/ecrs/upload.c 2006-09-11 05:58:23 UTC (rev
3395)
@@ -154,18 +154,8 @@
start = get_time();
memset(&chk, 0, sizeof(CHK));
- if (disk_directory_test(ectx,
+ if (YES != disk_file_test(ectx,
filename)) {
- GE_BREAK(ectx, 0);
- /* Should not happen */
- GE_LOG(ectx,
- GE_ERROR | GE_BULK | GE_USER,
- "Cannot upload file `%s', it seems to be a directory!",
- filename);
- return SYSERR;
- }
- if (0 == disk_file_test(ectx,
- filename)) {
GE_LOG(ectx, GE_ERROR | GE_BULK | GE_USER,
_("`%s' is not a file.\n"),
filename);
Modified: GNUnet/src/util/disk/storage.c
===================================================================
--- GNUnet/src/util/disk/storage.c 2006-09-11 05:41:47 UTC (rev 3394)
+++ GNUnet/src/util/disk/storage.c 2006-09-11 05:58:23 UTC (rev 3395)
@@ -491,7 +491,7 @@
if (!S_ISDIR(istat.st_mode)) {
GE_LOG(ectx,
GE_WARNING | GE_USER | GE_BULK,
- _("expected `%s' to be a directory!\n"),
+ _("Expected `%s' to be a directory!\n"),
dirName);
return SYSERR;
}
Modified: GNUnet/todo
===================================================================
--- GNUnet/todo 2006-09-11 05:41:47 UTC (rev 3394)
+++ GNUnet/todo 2006-09-11 05:58:23 UTC (rev 3395)
@@ -18,7 +18,6 @@
+ loggers: SMTP logger
+ use new loggers in for CS error reporting
* make testcases compile & pass again:
- + fs/ecrs -- compiles, but searchtest hangs
+ tbench -- compiles
+ gap
+ fs/namespace
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r3395 - in GNUnet: . src/applications/fs/ecrs src/util/disk,
grothoff <=