[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r1039 - GNUnet/src/applications/fs/fsui
From: |
grothoff |
Subject: |
[GNUnet-SVN] r1039 - GNUnet/src/applications/fs/fsui |
Date: |
Sun, 26 Jun 2005 02:28:29 -0700 (PDT) |
Author: grothoff
Date: 2005-06-26 02:28:26 -0700 (Sun, 26 Jun 2005)
New Revision: 1039
Modified:
GNUnet/src/applications/fs/fsui/downloadtest.c
GNUnet/src/applications/fs/fsui/fsuitest.c
Log:
fixes
Modified: GNUnet/src/applications/fs/fsui/downloadtest.c
===================================================================
--- GNUnet/src/applications/fs/fsui/downloadtest.c 2005-06-26 09:11:05 UTC
(rev 1038)
+++ GNUnet/src/applications/fs/fsui/downloadtest.c 2005-06-26 09:28:26 UTC
(rev 1039)
@@ -116,7 +116,7 @@
int status;
int ok;
struct ECRS_URI * uri;
- char * fn;
+ char * fn = NULL;
char * keywords[] = {
"foo",
"bar",
@@ -142,7 +142,8 @@
}
}
ok = YES;
- initUtil(argc, argv, &parseCommandLine);
+ if (OK != initUtil(argc, argv, &parseCommandLine))
+ return -1;
startCron();
gnunet_util_sleep(5 * cronSECONDS); /* give gnunetd time to start */
Modified: GNUnet/src/applications/fs/fsui/fsuitest.c
===================================================================
--- GNUnet/src/applications/fs/fsui/fsuitest.c 2005-06-26 09:11:05 UTC (rev
1038)
+++ GNUnet/src/applications/fs/fsui/fsuitest.c 2005-06-26 09:28:26 UTC (rev
1039)
@@ -106,7 +106,7 @@
int status;
int ok;
struct ECRS_URI * uri;
- char * fn;
+ char * filename = NULL;
char * keywords[] = {
"foo",
"bar",
@@ -132,7 +132,8 @@
}
}
ok = YES;
- initUtil(argc, argv, &parseCommandLine);
+ if (OK != initUtil(argc, argv, &parseCommandLine))
+ return -1;
startCron();
gnunet_util_sleep(5 * cronSECONDS); /* give gnunetd time to start */
@@ -142,8 +143,8 @@
&eventCallback,
NULL);
CHECK(ctx != NULL);
- fn = makeName(42);
- writeFile(fn,
+ filename = makeName(42);
+ writeFile(filename,
"foo bar test!",
strlen("foo bar test!"),
"600");
@@ -152,7 +153,7 @@
(const char**)keywords);
CHECK(OK ==
FSUI_upload(ctx,
- fn,
+ filename,
0,
YES,
NO,
@@ -179,18 +180,20 @@
}
FSUI_stopSearch(ctx,
uri);
- CHECK(OK == FSUI_unindex(ctx, fn));
+ CHECK(OK == FSUI_unindex(ctx, filename));
/* END OF TEST CODE */
FAILURE:
if (ctx != NULL)
FSUI_stop(ctx);
- UNLINK(fn);
- FREE(fn);
- fn = makeName(43);
- /* TODO: verify file 'fn(42)' == file 'fn(43)' */
- UNLINK(fn);
- FREE(fn);
+ if (filename != NULL) {
+ UNLINK(filename);
+ FREE(filename);
+ }
+ filename = makeName(43);
+ /* TODO: verify file 'filename(42)' == file 'filename(43)' */
+ UNLINK(filename);
+ FREE(filename);
stopCron();
doneUtil();
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r1039 - GNUnet/src/applications/fs/fsui,
grothoff <=