aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2010-05-11 13:51:29 +0000
committerChristian Grothoff <christian@grothoff.org>2010-05-11 13:51:29 +0000
commit8e027d831f80d890baed5199ff6516e37d4df726 (patch)
treeafc30384ae50bac6cc01a2d7908d713164dda1cd /src
parent015b6b2e2816fd679ac3091c49952f005df39ee4 (diff)
downloadgnunet-8e027d831f80d890baed5199ff6516e37d4df726.tar.gz
gnunet-8e027d831f80d890baed5199ff6516e37d4df726.zip
fix
Diffstat (limited to 'src')
-rw-r--r--src/util/test_service.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/util/test_service.c b/src/util/test_service.c
index 6148fa2cc..5a4fe27d0 100644
--- a/src/util/test_service.c
+++ b/src/util/test_service.c
@@ -79,13 +79,24 @@ ready (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
79} 79}
80 80
81static void 81static void
82do_stop (void *cls,
83 const struct GNUNET_SCHEDULER_TaskContext *tc)
84{
85 GNUNET_SERVICE_stop (sctx);
86}
87
88
89static void
82recv_cb (void *cls, 90recv_cb (void *cls,
83 struct GNUNET_SERVER_Client *client, 91 struct GNUNET_SERVER_Client *client,
84 const struct GNUNET_MessageHeader *message) 92 const struct GNUNET_MessageHeader *message)
85{ 93{
86 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Receiving client message...\n"); 94 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Receiving client message...\n");
87 GNUNET_SERVER_receive_done (client, GNUNET_OK); 95 GNUNET_SERVER_receive_done (client, GNUNET_OK);
88 GNUNET_SCHEDULER_shutdown (sched); 96 if (sctx != NULL)
97 GNUNET_SCHEDULER_add_now (sched, &do_stop, NULL);
98 else
99 GNUNET_SCHEDULER_shutdown (sched);
89 ok = 0; 100 ok = 0;
90} 101}
91 102