projects
/
oweals
/
gnunet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
code clean up
[oweals/gnunet.git]
/
src
/
util
/
test_service.c
diff --git
a/src/util/test_service.c
b/src/util/test_service.c
index 6148fa2cc56cfe1e448a8b681fa5149f7db81c7b..5a4fe27d03055c390f794ab67881bd6c9b3bf2cb 100644
(file)
--- a/
src/util/test_service.c
+++ b/
src/util/test_service.c
@@
-78,6
+78,14
@@
ready (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
GNUNET_NO, &build_msg, client);
}
GNUNET_NO, &build_msg, client);
}
+static void
+do_stop (void *cls,
+ const struct GNUNET_SCHEDULER_TaskContext *tc)
+{
+ GNUNET_SERVICE_stop (sctx);
+}
+
+
static void
recv_cb (void *cls,
struct GNUNET_SERVER_Client *client,
static void
recv_cb (void *cls,
struct GNUNET_SERVER_Client *client,
@@
-85,7
+93,10
@@
recv_cb (void *cls,
{
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Receiving client message...\n");
GNUNET_SERVER_receive_done (client, GNUNET_OK);
{
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Receiving client message...\n");
GNUNET_SERVER_receive_done (client, GNUNET_OK);
- GNUNET_SCHEDULER_shutdown (sched);
+ if (sctx != NULL)
+ GNUNET_SCHEDULER_add_now (sched, &do_stop, NULL);
+ else
+ GNUNET_SCHEDULER_shutdown (sched);
ok = 0;
}
ok = 0;
}