[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r4649 - GNUnet/src/applications/fs/ecrs
From: |
gnunet |
Subject: |
[GNUnet-SVN] r4649 - GNUnet/src/applications/fs/ecrs |
Date: |
Tue, 6 Mar 2007 14:54:06 -0700 (MST) |
Author: durner
Date: 2007-03-06 14:54:05 -0700 (Tue, 06 Mar 2007)
New Revision: 4649
Modified:
GNUnet/src/applications/fs/ecrs/upload.c
Log:
improve logging
Modified: GNUnet/src/applications/fs/ecrs/upload.c
===================================================================
--- GNUnet/src/applications/fs/ecrs/upload.c 2007-03-05 21:11:21 UTC (rev
4648)
+++ GNUnet/src/applications/fs/ecrs/upload.c 2007-03-06 21:54:05 UTC (rev
4649)
@@ -231,6 +231,12 @@
filename,
O_RDONLY | O_LARGEFILE);
if (fd == -1) {
+ GE_LOG(ectx,
+ GE_ERROR | GE_BULK | GE_USER,
+ _("Cannot open file `%s': `%s'"),
+ filename,
+ STRERROR(errno));
+
connection_destroy(sock);
return SYSERR;
}
@@ -301,7 +307,7 @@
&enc);
#endif
if (doIndex) {
- if (SYSERR == FS_index(sock,
+ if (OK != FS_index(sock,
&fileId,
dblock,
pos)) {
@@ -316,12 +322,16 @@
fileBlockEncode(db,
size + sizeof(DBlock),
&mchk.query,
- &value))
+ &value)) {
+ GE_BREAK(ectx, 0);
goto FAILURE;
+ }
GE_ASSERT(ectx, value != NULL);
*value = *dblock; /* copy options! */
- if (SYSERR == FS_insert(sock,
+
+ if (OK != FS_insert(sock,
value)) {
+ GE_BREAK(ectx, 0);
FREE(value);
goto FAILURE;
}
@@ -339,8 +349,10 @@
0, /* dblocks are on level 0 */
iblocks,
priority,
- expirationTime))
+ expirationTime)) {
+ GE_BREAK(ectx, 0);
goto FAILURE;
+ }
}
if (tt != NULL)
if (OK != tt(ttClosure))
@@ -392,8 +404,10 @@
i+1,
iblocks,
priority,
- expirationTime))
+ expirationTime)) {
+ GE_BREAK(ectx, 0);
goto FAILURE;
+ }
fileBlockEncode(db,
size,
&mchk.query,
@@ -406,6 +420,7 @@
value->prio = htonl(priority);
if (OK != FS_insert(sock,
value)) {
+ GE_BREAK(ectx, 0);
FREE(value);
goto FAILURE;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r4649 - GNUnet/src/applications/fs/ecrs,
gnunet <=