[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r492 - GNUnet/src/applications/fs/module
From: |
grothoff |
Subject: |
[GNUnet-SVN] r492 - GNUnet/src/applications/fs/module |
Date: |
Sat, 26 Mar 2005 12:52:59 -0800 (PST) |
Author: grothoff
Date: 2005-03-26 12:52:58 -0800 (Sat, 26 Mar 2005)
New Revision: 492
Modified:
GNUnet/src/applications/fs/module/fs.c
GNUnet/src/applications/fs/module/ondemand.c
Log:
lstat
Modified: GNUnet/src/applications/fs/module/fs.c
===================================================================
--- GNUnet/src/applications/fs/module/fs.c 2005-03-26 18:51:21 UTC (rev
491)
+++ GNUnet/src/applications/fs/module/fs.c 2005-03-26 20:52:58 UTC (rev
492)
@@ -929,14 +929,15 @@
return ret;
}
-static int uniqueReplyIdentifier(const void * content,
- unsigned int size,
+static int uniqueReplyIdentifier(const DataContainer * content,
unsigned int type,
const HashCode512 * primaryKey) {
HashCode512 q;
unsigned int t;
const GapWrapper * gw;
+ unsigned int size;
+ size = ntohl(content->size);
if (size < sizeof(GapWrapper)) {
BREAK();
return NO;
Modified: GNUnet/src/applications/fs/module/ondemand.c
===================================================================
--- GNUnet/src/applications/fs/module/ondemand.c 2005-03-26 18:51:21 UTC
(rev 491)
+++ GNUnet/src/applications/fs/module/ondemand.c 2005-03-26 20:52:58 UTC
(rev 492)
@@ -153,6 +153,7 @@
&enc);
strcat(serverFN,
(char*)&enc);
+ UNLINK(serverFN);
if (0 != SYMLINK(fn, serverFN)) {
LOG_FILE_STRERROR(LOG_ERROR, "symlink", fn);
FREE(serverFN);
@@ -195,8 +196,8 @@
}
fn = getOnDemandFile(fileId);
- if ( (0 != stat(fn,
- &sbuf))
+ if ( (0 != lstat(fn,
+ &sbuf))
#ifdef S_ISLNK
|| (! S_ISLNK(sbuf.st_mode))
#endif
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r492 - GNUnet/src/applications/fs/module,
grothoff <=