aboutsummaryrefslogtreecommitdiff
path: root/src/topology/test_gnunet_daemon_topology.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2011-07-04 09:02:34 +0000
committerChristian Grothoff <christian@grothoff.org>2011-07-04 09:02:34 +0000
commit41761e1245f6879b9c990e915bd3279d59d353fe (patch)
tree7ca5af0c5c95215b14398379e0069414534c4dda /src/topology/test_gnunet_daemon_topology.c
parent169dde4f40fc2f04fa42168e2f931a7736cb95ff (diff)
downloadgnunet-41761e1245f6879b9c990e915bd3279d59d353fe.tar.gz
gnunet-41761e1245f6879b9c990e915bd3279d59d353fe.zip
stuff
Diffstat (limited to 'src/topology/test_gnunet_daemon_topology.c')
-rw-r--r--src/topology/test_gnunet_daemon_topology.c23
1 files changed, 14 insertions, 9 deletions
diff --git a/src/topology/test_gnunet_daemon_topology.c b/src/topology/test_gnunet_daemon_topology.c
index 5c54e0ee3..85f328fe5 100644
--- a/src/topology/test_gnunet_daemon_topology.c
+++ b/src/topology/test_gnunet_daemon_topology.c
@@ -51,8 +51,9 @@ static struct GNUNET_TESTING_Daemon *last;
51/** 51/**
52 * Check whether peers successfully shut down. 52 * Check whether peers successfully shut down.
53 */ 53 */
54void shutdown_callback (void *cls, 54static void
55 const char *emsg) 55shutdown_callback (void *cls,
56 const char *emsg)
56{ 57{
57 if (emsg != NULL) 58 if (emsg != NULL)
58 { 59 {
@@ -72,6 +73,7 @@ void shutdown_callback (void *cls,
72 } 73 }
73} 74}
74 75
76
75static void 77static void
76clean_up_task (void *cls, 78clean_up_task (void *cls,
77 const struct GNUNET_SCHEDULER_TaskContext *tc) 79 const struct GNUNET_SCHEDULER_TaskContext *tc)
@@ -112,11 +114,12 @@ notify_connect_complete(void *cls,
112} 114}
113 115
114 116
115static void my_cb(void *cls, 117static
116 const struct GNUNET_PeerIdentity *id, 118void my_cb(void *cls,
117 const struct GNUNET_CONFIGURATION_Handle *cfg, 119 const struct GNUNET_PeerIdentity *id,
118 struct GNUNET_TESTING_Daemon *d, 120 const struct GNUNET_CONFIGURATION_Handle *cfg,
119 const char *emsg) 121 struct GNUNET_TESTING_Daemon *d,
122 const char *emsg)
120{ 123{
121 GNUNET_assert (id != NULL); 124 GNUNET_assert (id != NULL);
122 peers_left--; 125 peers_left--;
@@ -164,10 +167,12 @@ run (void *cls,
164 GNUNET_assert (pg != NULL); 167 GNUNET_assert (pg != NULL);
165} 168}
166 169
170
167static int 171static int
168check () 172check ()
169{ 173{
170 char *const argv[] = { "test-testing", 174 char *const argv[] = {
175 "test-gnunet-daemon-topology",
171 "-c", 176 "-c",
172 "test_gnunet_daemon_topology_data.conf", 177 "test_gnunet_daemon_topology_data.conf",
173#if VERBOSE 178#if VERBOSE
@@ -184,6 +189,7 @@ check ()
184 return ok; 189 return ok;
185} 190}
186 191
192
187int 193int
188main (int argc, char *argv[]) 194main (int argc, char *argv[])
189{ 195{
@@ -197,7 +203,6 @@ main (int argc, char *argv[])
197#endif 203#endif
198 NULL); 204 NULL);
199 ret = check (); 205 ret = check ();
200 sleep (1); /* FIXME: needed? */
201 GNUNET_DISK_directory_remove ("/tmp/test-gnunet-topology"); 206 GNUNET_DISK_directory_remove ("/tmp/test-gnunet-topology");
202 return ret; 207 return ret;
203} 208}