#include "gnunet_time_lib.h"
-#define VERBOSE GNUNET_NO
-
#define PORT 12435
#define MY_TYPE 256
GNUNET_SERVICE_stop (sctx);
sctx = NULL;
}
+ else
+ {
+ GNUNET_SCHEDULER_shutdown ();
+ }
}
if (size < sizeof (struct GNUNET_MessageHeader))
{
/* timeout */
+ GNUNET_break (0);
GNUNET_SCHEDULER_add_now (&do_stop, NULL);
ok = 1;
return 0;
"test_service",
"-c",
"test_service_data.conf",
- "-L",
-#if VERBOSE
- "DEBUG",
-#else
- "WARNING",
-#endif
NULL
};
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Starting service\n");
GNUNET_assert (GNUNET_OK ==
- GNUNET_SERVICE_run (5, argv, "test_service",
+ GNUNET_SERVICE_run (3, argv, "test_service",
GNUNET_SERVICE_OPTION_NONE, &runner, &ok));
GNUNET_assert (0 == ok);
return ok;
"test_service6",
"-c",
"test_service_data.conf",
- "-L",
-#if VERBOSE
- "DEBUG",
-#else
- "WARNING",
-#endif
NULL
};
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Starting v6 service\n");
GNUNET_assert (GNUNET_OK ==
- GNUNET_SERVICE_run (5, argv, "test_service6",
+ GNUNET_SERVICE_run (3, argv, "test_service6",
GNUNET_SERVICE_OPTION_NONE, &runner6,
&ok));
GNUNET_assert (0 == ok);
"test-service-program",
"-c",
"test_service_data.conf",
- "-L",
-#if VERBOSE
- "DEBUG",
-#else
- "WARNING",
-#endif
NULL
};
const struct GNUNET_GETOPT_CommandLineOption options[] = {
int ret = 1;
GNUNET_assert (GNUNET_OK ==
- GNUNET_PROGRAM_run (5, argv, "test-service-program", "no help",
+ GNUNET_PROGRAM_run (3, argv, "test-service-program", "no help",
options, &start_stop_main, &ret));
-
+
GNUNET_break (0 == ret);
return ret;
}
struct GNUNET_NETWORK_Handle *s = NULL;
GNUNET_log_setup ("test-service",
-#if VERBOSE
- "DEBUG",
-#else
"WARNING",
-#endif
NULL);
ret += check ();
ret += check ();
-
// FIXME
#ifndef MINGW
s = GNUNET_NETWORK_socket_create (PF_INET6, SOCK_STREAM, 0);
ret += check6 ();
}
ret += check_start_stop ();
-
return ret;
}