[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r11311 - gnunet/src/util
From: |
gnunet |
Subject: |
[GNUnet-SVN] r11311 - gnunet/src/util |
Date: |
Tue, 11 May 2010 15:31:41 +0200 |
Author: grothoff
Date: 2010-05-11 15:31:41 +0200 (Tue, 11 May 2010)
New Revision: 11311
Modified:
gnunet/src/util/test_service.c
Log:
fix
Modified: gnunet/src/util/test_service.c
===================================================================
--- gnunet/src/util/test_service.c 2010-05-11 13:16:00 UTC (rev 11310)
+++ gnunet/src/util/test_service.c 2010-05-11 13:31:41 UTC (rev 11311)
@@ -43,21 +43,7 @@
static int ok = 1;
-static void
-end_it (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
-{
- struct GNUNET_CLIENT_Connection *client = cls;
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Shutting down service\n");
- GNUNET_CLIENT_disconnect (client, GNUNET_NO);
- if (sctx != NULL)
- {
- GNUNET_SERVICE_stop (sctx);
- sctx = NULL;
- }
-}
-
-
static size_t
build_msg (void *cls, size_t size, void *buf)
{
@@ -68,10 +54,7 @@
GNUNET_assert (size >= sizeof (struct GNUNET_MessageHeader));
msg->type = htons (MY_TYPE);
msg->size = htons (sizeof (struct GNUNET_MessageHeader));
- GNUNET_SCHEDULER_add_continuation (sched,
- &end_it,
- client,
- GNUNET_SCHEDULER_REASON_PREREQ_DONE);
+ GNUNET_CLIENT_disconnect (client, GNUNET_NO);
return sizeof (struct GNUNET_MessageHeader);
}
@@ -102,6 +85,8 @@
{
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Receiving client message...\n");
GNUNET_SERVER_receive_done (client, GNUNET_OK);
+ GNUNET_SCHEDULER_shutdown (sched);
+ ok = 0;
}
static struct GNUNET_SERVER_MessageHandler myhandlers[] = {
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r11311 - gnunet/src/util,
gnunet <=