[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r3832 - in GNUnet/src/applications/fs: fsui uritrack
From: |
grothoff |
Subject: |
[GNUnet-SVN] r3832 - in GNUnet/src/applications/fs: fsui uritrack |
Date: |
Thu, 30 Nov 2006 07:45:40 -0800 (PST) |
Author: grothoff
Date: 2006-11-30 07:45:37 -0800 (Thu, 30 Nov 2006)
New Revision: 3832
Modified:
GNUnet/src/applications/fs/fsui/download.c
GNUnet/src/applications/fs/uritrack/file_info.c
Log:
fix
Modified: GNUnet/src/applications/fs/fsui/download.c
===================================================================
--- GNUnet/src/applications/fs/fsui/download.c 2006-11-30 14:37:17 UTC (rev
3831)
+++ GNUnet/src/applications/fs/fsui/download.c 2006-11-30 15:45:37 UTC (rev
3832)
@@ -293,7 +293,8 @@
if ( (ret == OK) &&
(dl->is_recursive) &&
- (dl->is_directory == YES) ) {
+ (dl->is_directory == YES) &&
+ (ECRS_fileSize(dl->fi.uri) > 0) ) {
char * dirBlock;
int fd;
char * fn;
@@ -325,7 +326,7 @@
if (MAP_FAILED == dirBlock) {
GE_LOG_STRERROR_FILE(ectx,
GE_ERROR | GE_BULK | GE_ADMIN | GE_USER,
- "MMAP",
+ "mmap",
fn);
} else {
/* load directory, start downloads */
@@ -631,6 +632,9 @@
GE_ASSERT(ctx->ectx, dl->handle != NULL);
PTHREAD_JOIN(dl->handle,
&unused);
+ MUTEX_LOCK(ctx->lock);
+ dl->ctx->activeDownloadThreads--;
+ MUTEX_UNLOCK(ctx->lock);
dl->handle = NULL;
if (dl->state == FSUI_ACTIVE)
dl->state = FSUI_PENDING;
Modified: GNUnet/src/applications/fs/uritrack/file_info.c
===================================================================
--- GNUnet/src/applications/fs/uritrack/file_info.c 2006-11-30 14:37:17 UTC
(rev 3831)
+++ GNUnet/src/applications/fs/uritrack/file_info.c 2006-11-30 15:45:37 UTC
(rev 3832)
@@ -256,7 +256,8 @@
fn = getUriDbName(ectx, cfg);
sem = createIPC(ectx, cfg);
IPC_SEMAPHORE_DOWN(sem, YES);
- if(0 != STAT(fn, &buf)) {
+ if ( (0 != STAT(fn, &buf)) ||
+ (buf.st_size == 0) ) {
IPC_SEMAPHORE_UP(sem);
IPC_SEMAPHORE_DESTROY(sem);
return 0; /* no URI db */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r3832 - in GNUnet/src/applications/fs: fsui uritrack,
grothoff <=