Returns now GNUNET_SYSERR
[oweals/gnunet.git] / src / util / test_client.c
index aa8b93a826d67d86f5b9217a5ec20c6df8ffd4a4..3851744c25e89cb05442bb9ab9960893f40f4cfb 100644 (file)
@@ -4,7 +4,7 @@
 
      GNUnet is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published
-     by the Free Software Foundation; either version 2, or (at your
+     by the Free Software Foundation; either version 3, or (at your
      option) any later version.
 
      GNUnet is distributed in the hope that it will be useful, but
@@ -113,7 +113,7 @@ recv_bounce (void *cls, const struct GNUNET_MessageHeader *got)
   msg.size = htons (sizeof (struct GNUNET_MessageHeader));
   GNUNET_assert (0 ==
                  memcmp (got, &msg, sizeof (struct GNUNET_MessageHeader)));
-  GNUNET_CLIENT_disconnect (client);
+  GNUNET_CLIENT_disconnect (client, GNUNET_YES);
   client = NULL;
   GNUNET_SERVER_destroy (server);
   server = NULL;
@@ -150,12 +150,10 @@ task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
 #endif
   sa.sin_family = AF_INET;
   sa.sin_port = htons (PORT);
-  server = GNUNET_SERVER_create (tc->sched,
-                                 NULL,
+  server = GNUNET_SERVER_create (NULL,
                                  NULL,
                                  sap,
                                 slens,
-                                 1024,
                                  GNUNET_TIME_relative_multiply
                                  (GNUNET_TIME_UNIT_MILLISECONDS, 10000),
                                  GNUNET_NO);
@@ -163,7 +161,7 @@ task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
   handlers[0].callback_cls = cls;
   handlers[1].callback_cls = cls;
   GNUNET_SERVER_add_handlers (server, handlers);
-  client = GNUNET_CLIENT_connect (tc->sched, MYNAME, cfg);
+  client = GNUNET_CLIENT_connect (MYNAME, cfg);
   GNUNET_assert (client != NULL);
   GNUNET_assert (NULL !=
                  GNUNET_CLIENT_notify_transmit_ready (client,