[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r7115 - GNUnet/src/applications/fs/ecrs
From: |
gnunet |
Subject: |
[GNUnet-SVN] r7115 - GNUnet/src/applications/fs/ecrs |
Date: |
Mon, 9 Jun 2008 22:08:30 -0600 (MDT) |
Author: grothoff
Date: 2008-06-09 22:08:30 -0600 (Mon, 09 Jun 2008)
New Revision: 7115
Modified:
GNUnet/src/applications/fs/ecrs/upload.c
Log:
do not index files again, do not switch to insert if indexing fails
Modified: GNUnet/src/applications/fs/ecrs/upload.c
===================================================================
--- GNUnet/src/applications/fs/ecrs/upload.c 2008-06-09 22:23:20 UTC (rev
7114)
+++ GNUnet/src/applications/fs/ecrs/upload.c 2008-06-10 04:08:30 UTC (rev
7115)
@@ -185,9 +185,19 @@
GNUNET_GE_LOG (ectx,
GNUNET_GE_ERROR | GNUNET_GE_BULK | GNUNET_GE_USER,
_("Cannot hash `%s'.\n"), filename);
+
GNUNET_client_connection_destroy (sock);
return GNUNET_SYSERR;
}
+ if (GNUNET_YES == GNUNET_FS_test_indexed(sock,
+ &fileId))
+ {
+ /* file already indexed; simulate only to get the URI! */
+ doIndex = GNUNET_SYSERR;
+ }
+ }
+ if (doIndex == GNUNET_YES)
+ {
now = GNUNET_get_time ();
eta = now + 2 * (now - start);
/* very rough estimate: GNUNET_hash reads once through the file,
@@ -211,10 +221,10 @@
GNUNET_GE_LOG (ectx,
GNUNET_GE_ERROR | GNUNET_GE_BULK | GNUNET_GE_USER,
_
- ("Indexing file `%s' failed. Trying to insert
file...\n"),
+ ("Indexing file `%s' failed. Suggestion: try to
insert the file.\n"),
filename);
- doIndex = GNUNET_NO;
- break;
+ GNUNET_client_connection_destroy (sock);
+ return GNUNET_SYSERR;
default:
break;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r7115 - GNUnet/src/applications/fs/ecrs,
gnunet <=