aboutsummaryrefslogtreecommitdiff
path: root/src/util/test_server_with_client_unix.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/test_server_with_client_unix.c')
-rw-r--r--src/util/test_server_with_client_unix.c30
1 files changed, 4 insertions, 26 deletions
diff --git a/src/util/test_server_with_client_unix.c b/src/util/test_server_with_client_unix.c
index eae80e4e8..57a67d3f4 100644
--- a/src/util/test_server_with_client_unix.c
+++ b/src/util/test_server_with_client_unix.c
@@ -30,8 +30,6 @@
30#include "gnunet_server_lib.h" 30#include "gnunet_server_lib.h"
31#include "gnunet_time_lib.h" 31#include "gnunet_time_lib.h"
32 32
33#define VERBOSE GNUNET_NO
34
35#define MY_TYPE 128 33#define MY_TYPE 128
36 34
37 35
@@ -43,6 +41,7 @@ static struct GNUNET_CONFIGURATION_Handle *cfg;
43 41
44static int ok; 42static int ok;
45 43
44
46static void 45static void
47send_done (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) 46send_done (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
48{ 47{
@@ -150,7 +149,6 @@ task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
150 un.sun_path[0] = '\0'; 149 un.sun_path[0] = '\0';
151#endif 150#endif
152 151
153
154 sap[0] = (struct sockaddr *) &un; 152 sap[0] = (struct sockaddr *) &un;
155 slens[0] = sizeof (un); 153 slens[0] = sizeof (un);
156 sap[1] = NULL; 154 sap[1] = NULL;
@@ -178,35 +176,15 @@ task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
178} 176}
179 177
180 178
181/**
182 * Main method, starts scheduler with task1,
183 * checks that "ok" is correct at the end.
184 */
185static int
186check ()
187{
188
189 ok = 1;
190 GNUNET_SCHEDULER_run (&task, NULL);
191 return ok;
192}
193
194
195int 179int
196main (int argc, char *argv[]) 180main (int argc, char *argv[])
197{ 181{
198 int ret = 0;
199
200 GNUNET_log_setup ("test_server_with_client_unix", 182 GNUNET_log_setup ("test_server_with_client_unix",
201#if VERBOSE
202 "DEBUG",
203#else
204 "WARNING", 183 "WARNING",
205#endif
206 NULL); 184 NULL);
207 ret += check (); 185 ok = 1;
208 186 GNUNET_SCHEDULER_run (&task, NULL);
209 return ret; 187 return ok;
210} 188}
211 189
212/* end of test_server_with_client_unix.c */ 190/* end of test_server_with_client_unix.c */