[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r3845 - in GNUnet/src: applications/fs/ecrs applications/fs
From: |
grothoff |
Subject: |
[GNUnet-SVN] r3845 - in GNUnet/src: applications/fs/ecrs applications/fs/fsui include |
Date: |
Fri, 1 Dec 2006 18:24:43 -0800 (PST) |
Author: grothoff
Date: 2006-12-01 18:24:39 -0800 (Fri, 01 Dec 2006)
New Revision: 3845
Modified:
GNUnet/src/applications/fs/ecrs/download.c
GNUnet/src/applications/fs/fsui/download.c
GNUnet/src/include/gnunet_ecrs_lib.h
Log:
fixes
Modified: GNUnet/src/applications/fs/ecrs/download.c
===================================================================
--- GNUnet/src/applications/fs/ecrs/download.c 2006-12-02 01:54:10 UTC (rev
3844)
+++ GNUnet/src/applications/fs/ecrs/download.c 2006-12-02 02:24:39 UTC (rev
3845)
@@ -187,7 +187,7 @@
O_CREAT|O_RDWR,
S_IRUSR|S_IWUSR );
if (this->handles[i] < 0) {
- freeIOC(this, NO);
+ freeIOC(this, YES);
FREE(fn);
return SYSERR;
}
@@ -1346,7 +1346,8 @@
ret = SYSERR;
}
destroyRequestManager(rm);
- if (ret == OK)
+ if ( (ret == OK) ||
+ (tt(ttClosure) == SYSERR) )
freeIOC(&ioc, YES);
else
freeIOC(&ioc, NO); /* aborted */
Modified: GNUnet/src/applications/fs/fsui/download.c
===================================================================
--- GNUnet/src/applications/fs/fsui/download.c 2006-12-02 01:54:10 UTC (rev
3844)
+++ GNUnet/src/applications/fs/fsui/download.c 2006-12-02 02:24:39 UTC (rev
3845)
@@ -203,9 +203,11 @@
static int
testTerminate(void * cls) {
FSUI_DownloadList * dl = cls;
-
+
+ if (dl->state == FSUI_ERROR)
+ return SYSERR; /* aborted - delete! */
if (dl->state != FSUI_ACTIVE)
- return SYSERR;
+ return NO; /* suspended */
return OK;
}
@@ -311,12 +313,7 @@
fd = disk_file_open(ectx,
fn,
O_LARGEFILE | O_RDONLY);
- if (fd == -1) {
- GE_LOG_STRERROR_FILE(ectx,
- GE_ERROR | GE_BULK | GE_ADMIN | GE_USER,
- "OPEN",
- fn);
- } else {
+ if (fd != -1) {
dirBlock = MMAP(NULL,
totalBytes,
PROT_READ,
@@ -643,6 +640,13 @@
} else {
GE_ASSERT(ctx->ectx, dl->handle == NULL);
}
+ if (dl->state == FSUI_ERROR_JOINED) {
+ if (0 != UNLINK(dl->filename))
+ GE_LOG_STRERROR_FILE(ctx->ectx,
+ GE_WARNING | GE_USER | GE_BULK,
+ "unlink",
+ dl->filename);
+ }
event.type = FSUI_download_stopped;
event.data.DownloadStopped.dc.pos = dl;
event.data.DownloadStopped.dc.cctx = dl->cctx;
Modified: GNUnet/src/include/gnunet_ecrs_lib.h
===================================================================
--- GNUnet/src/include/gnunet_ecrs_lib.h 2006-12-02 01:54:10 UTC (rev
3844)
+++ GNUnet/src/include/gnunet_ecrs_lib.h 2006-12-02 02:24:39 UTC (rev
3845)
@@ -458,7 +458,8 @@
* be aborted by any signal, after which the functions will call
* this callback to check if they should continue).
*
- * @return OK to continue, SYSERR to abort
+ * @return OK to continue, SYSERR to abort with deleting
+ * temporary files, NO to abort without deleting temporary files
*/
typedef int (*ECRS_TestTerminate)(void * closure);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r3845 - in GNUnet/src: applications/fs/ecrs applications/fs/fsui include,
grothoff <=