aboutsummaryrefslogtreecommitdiff
path: root/src/util/test_service.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2010-05-11 13:16:00 +0000
committerChristian Grothoff <christian@grothoff.org>2010-05-11 13:16:00 +0000
commitf6bad19e765e73886a1e5b6d32f0a7551e5757ba (patch)
treea8ab99a78b91a0756f4f6cfc210a2f0083956b35 /src/util/test_service.c
parentbd54a7aac7b1c0ae885568992fb25b816269ce89 (diff)
downloadgnunet-f6bad19e765e73886a1e5b6d32f0a7551e5757ba.tar.gz
gnunet-f6bad19e765e73886a1e5b6d32f0a7551e5757ba.zip
moving code where it belongs:
Diffstat (limited to 'src/util/test_service.c')
-rw-r--r--src/util/test_service.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/src/util/test_service.c b/src/util/test_service.c
index 544f86fba..5f3146205 100644
--- a/src/util/test_service.c
+++ b/src/util/test_service.c
@@ -43,24 +43,18 @@ static struct GNUNET_SERVICE_Context *sctx;
43 43
44static int ok = 1; 44static int ok = 1;
45 45
46void
47end_cont (void *cls,
48 int reason)
49{
50 if (sctx != NULL)
51 GNUNET_SERVICE_stop (sctx);
52 else
53 GNUNET_SCHEDULER_shutdown (sched);
54 ok = 0;
55}
56
57static void 46static void
58end_it (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) 47end_it (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
59{ 48{
60 struct GNUNET_CLIENT_Connection *client = cls; 49 struct GNUNET_CLIENT_Connection *client = cls;
61 50
62 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Shutting down service\n"); 51 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Shutting down service\n");
63 GNUNET_CLIENT_service_shutdown (sched, client, GNUNET_TIME_UNIT_FOREVER_REL, &end_cont, NULL); 52 GNUNET_CLIENT_disconnect (client, GNUNET_NO);
53 if (sctx != NULL)
54 {
55 GNUNET_SERVICE_stop (sctx);
56 sctx = NULL;
57 }
64} 58}
65 59
66 60