[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r6810 - GNUnet/src/applications/fs/ecrs
From: |
gnunet |
Subject: |
[GNUnet-SVN] r6810 - GNUnet/src/applications/fs/ecrs |
Date: |
Mon, 12 May 2008 14:33:13 -0600 (MDT) |
Author: grothoff
Date: 2008-05-12 14:32:58 -0600 (Mon, 12 May 2008)
New Revision: 6810
Modified:
GNUnet/src/applications/fs/ecrs/downloadtest.c
GNUnet/src/applications/fs/ecrs/ecrstest.c
GNUnet/src/applications/fs/ecrs/updowntest.c
Log:
cleanup
Modified: GNUnet/src/applications/fs/ecrs/downloadtest.c
===================================================================
--- GNUnet/src/applications/fs/ecrs/downloadtest.c 2008-05-12 20:32:01 UTC
(rev 6809)
+++ GNUnet/src/applications/fs/ecrs/downloadtest.c 2008-05-12 20:32:58 UTC
(rev 6810)
@@ -86,6 +86,11 @@
name = makeName (size);
fd =
GNUNET_disk_file_open (NULL, name, O_WRONLY | O_CREAT, S_IWUSR | S_IRUSR);
+ if (fd == -1)
+ {
+ GNUNET_free(name);
+ return NULL;
+ }
buf = GNUNET_malloc (size);
memset (buf, size + size / 253, size);
for (i = 0; i < (int) (size - 42 - 2 * sizeof (GNUNET_HashCode));
@@ -213,7 +218,8 @@
/* ACTUAL TEST CODE */
fprintf (stderr, "Uploading...\n");
uri = uploadFile (SIZE);
- CHECK (NULL != uri) fprintf (stderr, "Downloading...");
+ CHECK (NULL != uri);
+ fprintf (stderr, "Downloading...");
CHECK (GNUNET_OK == downloadFile (SIZE, uri));
GNUNET_ECRS_uri_destroy (uri);
fprintf (stderr, "\nUnindexing...\n");
Modified: GNUnet/src/applications/fs/ecrs/ecrstest.c
===================================================================
--- GNUnet/src/applications/fs/ecrs/ecrstest.c 2008-05-12 20:32:01 UTC (rev
6809)
+++ GNUnet/src/applications/fs/ecrs/ecrstest.c 2008-05-12 20:32:58 UTC (rev
6810)
@@ -79,6 +79,11 @@
name = makeName (size);
fd =
GNUNET_disk_file_open (NULL, name, O_WRONLY | O_CREAT, S_IWUSR | S_IRUSR);
+ if (fd == -1)
+ {
+ GNUNET_free(name);
+ return GNUNET_SYSERR;
+ }
buf = GNUNET_malloc (size);
memset (buf, size + size / 253, size);
for (i = 0; i < (int) (size - 42 - 2 * sizeof (GNUNET_HashCode));
@@ -190,6 +195,11 @@
&testTerminate, NULL))
{
fd = GNUNET_disk_file_open (NULL, tmpName, O_RDONLY);
+ if (fd == -1)
+ {
+ GNUNET_free(tmpName);
+ return GNUNET_SYSERR;
+ }
buf = GNUNET_malloc (size);
in = GNUNET_malloc (size);
memset (buf, size + size / 253, size);
Modified: GNUnet/src/applications/fs/ecrs/updowntest.c
===================================================================
--- GNUnet/src/applications/fs/ecrs/updowntest.c 2008-05-12 20:32:01 UTC
(rev 6809)
+++ GNUnet/src/applications/fs/ecrs/updowntest.c 2008-05-12 20:32:58 UTC
(rev 6810)
@@ -68,6 +68,11 @@
name = makeName (size);
fd =
GNUNET_disk_file_open (NULL, name, O_WRONLY | O_CREAT, S_IWUSR | S_IRUSR);
+ if (fd == -1)
+ {
+ GNUNET_free(name);
+ return GNUNET_SYSERR;
+ }
buf = GNUNET_malloc (size);
memset (buf, size + size / 253, size);
for (i = 0; i < (int) (size - 42 - 2 * sizeof (GNUNET_HashCode));
@@ -113,6 +118,11 @@
&testTerminate, NULL))
{
fd = GNUNET_disk_file_open (NULL, tmpName, O_RDONLY);
+ if (fd == -1)
+ {
+ GNUNET_free(tmpName);
+ return GNUNET_SYSERR;
+ }
buf = GNUNET_malloc (size);
in = GNUNET_malloc (size);
memset (buf, size + size / 253, size);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r6810 - GNUnet/src/applications/fs/ecrs,
gnunet <=