projects
/
oweals
/
gnunet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' of git+ssh://gnunet.org/gnunet
[oweals/gnunet.git]
/
src
/
fs
/
test_fs.c
diff --git
a/src/fs/test_fs.c
b/src/fs/test_fs.c
index b936c3199f41ab7a49eef3061f737584c3c8e5a3..6fdc589bfa9118975f403d41e82cc10343882900 100644
(file)
--- a/
src/fs/test_fs.c
+++ b/
src/fs/test_fs.c
@@
-1,6
+1,6
@@
/*
This file is part of GNUnet.
/*
This file is part of GNUnet.
- (C) 2004, 2005, 2006, 2008 Christian Grothoff (and other contributing authors)
+ Copyright (C) 2004, 2005, 2006, 2008 GNUnet e.V.
GNUnet is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
GNUnet is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
@@
-14,13
+14,13
@@
You should have received a copy of the GNU General Public License
along with GNUnet; see the file COPYING. If not, write to the
You should have received a copy of the GNU General Public License
along with GNUnet; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 5
9 Temple Place - Suite 330
,
- Boston, MA 0211
1-1307
, USA.
+ Free Software Foundation, Inc., 5
1 Franklin Street, Fifth Floor
,
+ Boston, MA 0211
0-1301
, USA.
*/
/**
*/
/**
- * @file
applications/fs/fsui/basic_fsui_test
.c
- * @brief testcase for
fsui
(upload-search-download-unindex)
+ * @file
fs/test_fs
.c
+ * @brief testcase for
FS
(upload-search-download-unindex)
* @author Christian Grothoff
*/
* @author Christian Grothoff
*/
@@
-40,8
+40,8
@@
makeName (unsigned int i)
fn = GNUNET_malloc (strlen ("/tmp/gnunet-basic_fsui_test/BASIC_FSUI_TEST") +
14);
GNUNET_snprintf (fn,
fn = GNUNET_malloc (strlen ("/tmp/gnunet-basic_fsui_test/BASIC_FSUI_TEST") +
14);
GNUNET_snprintf (fn,
- strlen ("/tmp/gnunet-basic_fsui_test/BASIC_FSUI_TEST") +
-
14,
"/tmp/gnunet-basic_fsui_test/BASIC_FSUI_TEST%u", i);
+ strlen ("/tmp/gnunet-basic_fsui_test/BASIC_FSUI_TEST") +
14,
+ "/tmp/gnunet-basic_fsui_test/BASIC_FSUI_TEST%u", i);
GNUNET_disk_directory_create_for_file (NULL, fn);
return fn;
}
GNUNET_disk_directory_create_for_file (NULL, fn);
return fn;
}
@@
-143,9
+143,8
@@
main (int argc, char *argv[])
&eventCallback, NULL);
CHECK (ctx != NULL);
filename = makeName (42);
&eventCallback, NULL);
CHECK (ctx != NULL);
filename = makeName (42);
- GNUNET_disk_file_write (NULL,
- filename,
- "foo bar test!", strlen ("foo bar test!"), "600");
+ GNUNET_disk_file_write (NULL, filename, "foo bar test!",
+ strlen ("foo bar test!"), "600");
meta = GNUNET_meta_data_create ();
kuri =
GNUNET_ECRS_keyword_command_line_to_uri (NULL, 2,
meta = GNUNET_meta_data_create ();
kuri =
GNUNET_ECRS_keyword_command_line_to_uri (NULL, 2,
@@
-153,11
+152,9
@@
main (int argc, char *argv[])
/* upload */
upload = GNUNET_FSUI_upload_start (ctx, filename, (GNUNET_FSUI_DirectoryScanCallback) & GNUNET_disk_directory_scan, NULL, 0, /* anonymity */
0, /* priority */
/* upload */
upload = GNUNET_FSUI_upload_start (ctx, filename, (GNUNET_FSUI_DirectoryScanCallback) & GNUNET_disk_directory_scan, NULL, 0, /* anonymity */
0, /* priority */
- GNUNET_YES,
- GNUNET_NO,
- GNUNET_NO,
- GNUNET_get_time () +
- 5 * GNUNET_CRON_HOURS, meta, kuri, kuri);
+ GNUNET_YES, GNUNET_NO, GNUNET_NO,
+ GNUNET_get_time () + 5 * GNUNET_CRON_HOURS,
+ meta, kuri, kuri);
CHECK (upload != NULL);
GNUNET_ECRS_uri_destroy (kuri);
GNUNET_meta_data_destroy (meta);
CHECK (upload != NULL);
GNUNET_ECRS_uri_destroy (kuri);
GNUNET_meta_data_destroy (meta);
@@
-190,11
+187,9
@@
main (int argc, char *argv[])
/* download */
fn = makeName (43);
/* download */
fn = makeName (43);
- download = GNUNET_FSUI_download_start (ctx,
- 0,
- GNUNET_NO,
- search_uri,
- search_meta, fn, NULL, NULL);
+ download =
+ GNUNET_FSUI_download_start (ctx, 0, GNUNET_NO, search_uri, search_meta,
+ fn, NULL, NULL);
GNUNET_free (fn);
prog = 0;
while (lastEvent != GNUNET_FSUI_download_completed)
GNUNET_free (fn);
prog = 0;
while (lastEvent != GNUNET_FSUI_download_completed)
@@
-246,11
+241,11
@@
FAILURE:
#if START_DAEMON
GNUNET_GE_ASSERT (NULL, GNUNET_OK == GNUNET_daemon_stop (NULL, daemon));
#if START_DAEMON
GNUNET_GE_ASSERT (NULL, GNUNET_OK == GNUNET_daemon_stop (NULL, daemon));
- GNUNET_OS_process_
close
(daemon);
+ GNUNET_OS_process_
destroy
(daemon);
#endif
GNUNET_GC_free (cfg);
return (ok == GNUNET_YES) ? 0 : 1;
}
#endif
GNUNET_GC_free (cfg);
return (ok == GNUNET_YES) ? 0 : 1;
}
-/* end of
basic_fsui_test
.c */
+/* end of
test_fs
.c */