static struct TestMessageContext *other_test_messages;
+/**
+ * Check whether peers successfully shut down.
+ */
+void shutdown_callback (void *cls,
+ const char *emsg)
+{
+ if (emsg != NULL)
+ {
+#if VERBOSE
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Shutdown of peers failed!\n");
+#endif
+ if (ok == 0)
+ ok = 666;
+ }
+ else
+ {
+#if VERBOSE
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "All peers successfully shut down!\n");
+#endif
+ }
+}
+
static void
finish_testing ()
{
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Calling daemons_stop\n");
#endif
- GNUNET_TESTING_daemons_stop (pg, TIMEOUT);
+ GNUNET_TESTING_daemons_stop (pg, TIMEOUT, &shutdown_callback, NULL);
#if VERBOSE
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"daemons_stop finished\n");
if (pg != NULL)
{
- GNUNET_TESTING_daemons_stop (pg, TIMEOUT);
+ GNUNET_TESTING_daemons_stop (pg, TIMEOUT, &shutdown_callback, NULL);
ok = 7331; /* Opposite of leet */
}
else