[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r2492 - in GNUnet/src/applications/fs: ecrs fsui
From: |
grothoff |
Subject: |
[GNUnet-SVN] r2492 - in GNUnet/src/applications/fs: ecrs fsui |
Date: |
Sat, 11 Mar 2006 21:58:57 -0800 (PST) |
Author: grothoff
Date: 2006-03-11 21:58:55 -0800 (Sat, 11 Mar 2006)
New Revision: 2492
Modified:
GNUnet/src/applications/fs/ecrs/download.c
GNUnet/src/applications/fs/fsui/download.c
GNUnet/src/applications/fs/fsui/upload.c
Log:
fixing mantis 1005 and other minor issues
Modified: GNUnet/src/applications/fs/ecrs/download.c
===================================================================
--- GNUnet/src/applications/fs/ecrs/download.c 2006-03-12 04:56:03 UTC (rev
2491)
+++ GNUnet/src/applications/fs/ecrs/download.c 2006-03-12 05:58:55 UTC (rev
2492)
@@ -31,7 +31,7 @@
#include "ecrs.h"
#include "tree.h"
-#define DEBUG_DOWNLOAD YES
+#define DEBUG_DOWNLOAD NO
/**
* Highest TTL allowed? (equivalent of 25-50 HOPS distance!)
@@ -897,9 +897,6 @@
BREAK();
return SYSERR; /* invalid size! */
}
- /* request satisfied, stop requesting! */
- delRequest(node->ctx->rm,
- node);
size -= sizeof(DBlock);
data = MALLOC(size);
if (SYSERR == decryptContent((char*)&((DBlock*)&reply[1])[1],
@@ -912,6 +909,8 @@
&hc);
if (!equalsHashCode512(&hc,
&node->chk.key)) {
+ delRequest(node->ctx->rm,
+ node);
FREE(data);
BREAK();
LOG(LOG_ERROR,
@@ -937,8 +936,10 @@
iblock_download_children(node,
data,
size);
+ /* request satisfied, stop requesting! */
+ delRequest(node->ctx->rm,
+ node);
-
for (i=0;i<10;i++) {
if ( (node->ctx->completed * 10000L >
node->ctx->total * (10000L - (1024 >> i)) ) &&
@@ -1244,10 +1245,20 @@
if ( (rm->requestListIndex == 0) &&
(ctx.completed == ctx.total) &&
- (rm->abortFlag == NO) )
+ (rm->abortFlag == NO) ) {
ret = OK;
- else
+ } else {
+#if 0
+ LOG(LOG_ERROR,
+ "Download ends prematurely: %d %llu == %llu %d TT: %d\n",
+ rm->requestListIndex,
+ ctx.completed,
+ ctx.total,
+ rm->abortFlag,
+ tt(ttClosure));
+#endif
ret = SYSERR;
+ }
destroyRequestManager(rm);
if (ret == OK)
freeIOC(&ioc, YES);
Modified: GNUnet/src/applications/fs/fsui/download.c
===================================================================
--- GNUnet/src/applications/fs/fsui/download.c 2006-03-12 04:56:03 UTC (rev
2491)
+++ GNUnet/src/applications/fs/fsui/download.c 2006-03-12 05:58:55 UTC (rev
2492)
@@ -213,11 +213,16 @@
&downloadProgressCallback,
dl,
&testTerminate,
- dl);
+ dl);
if (ret == OK) {
dl->finished = YES;
totalBytes = ECRS_fileSize(dl->uri);
} else {
+#if DEBUG_DTM
+ LOG(LOG_ERROR,
+ "Download thread for `%s' failed (aborted or error)!\n",
+ dl->filename);
+#endif
totalBytes = 0;
}
root = dl;
@@ -290,13 +295,7 @@
dl->ctx->ecb(dl->ctx->ecbClosure,
&event);
dl->signalTerminate = YES;
- LOG(LOG_DEBUG,
- "ECRS returned SYSERR for download, setting sig terminate for %p\n",
- dl);
} else {
- LOG(LOG_DEBUG,
- "ECRS returned OK for download, setting sig terminate for %p\n",
- dl);
dl->signalTerminate = YES;
GNUNET_ASSERT(dl != &dl->ctx->activeDownloads);
while ( (dl != NULL) &&
@@ -321,7 +320,7 @@
dl = dl->parent;
}
}
-#if DEBUG_DTM || 1
+#if DEBUG_DTM
LOG(LOG_DEBUG,
"Download thread for `%s' terminated (%s)...\n",
dl->filename,
@@ -347,9 +346,6 @@
FSUI_DownloadList * root;
unsigned long long totalBytes;
- LOG(LOG_DEBUG,
- "Scheduling download of '%s'\n",
- filename);
GNUNET_ASSERT(ctx != NULL);
if (! (ECRS_isFileUri(uri) ||
ECRS_isLocationUri(uri)) ) {
@@ -438,7 +434,7 @@
( (list->total > list->completed) ||
(list->total == 0) ) &&
(list->finished == NO) ) {
-#if DEBUG_DTM || 1
+#if DEBUG_DTM
LOG(LOG_DEBUG,
"Download thread manager starts downlod of file `%s'\n",
list->filename);
@@ -475,7 +471,7 @@
/* has this one "died naturally"? */
if (list->signalTerminate == YES) {
-#if DEBUG_DTM || 1
+#if DEBUG_DTM
LOG(LOG_DEBUG,
"Download thread manager collects inactive download of file `%s'\n",
list->filename);
Modified: GNUnet/src/applications/fs/fsui/upload.c
===================================================================
--- GNUnet/src/applications/fs/fsui/upload.c 2006-03-12 04:56:03 UTC (rev
2491)
+++ GNUnet/src/applications/fs/fsui/upload.c 2006-03-12 05:58:55 UTC (rev
2492)
@@ -29,12 +29,13 @@
#include "gnunet_ecrs_lib.h"
#include "gnunet_fsui_lib.h"
#include "fsui.h"
+#include <extractor.h>
#define DEBUG_UPLOAD NO
/* LE <= 0.5.8/0.5.12 compatibility code */
#ifndef EXTRACTOR_SPLIT
-#define EXTRACTOR_SPLIT 90
+#define EXTRACTOR_SPLIT 89
#endif
#ifndef EXTRACTOR_LOWERCASE
#define EXTRACTOR_LOWERCASE 101
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r2492 - in GNUnet/src/applications/fs: ecrs fsui,
grothoff <=