doc: gnunet-c-tutorial: Add nodes.
[oweals/gnunet.git] / src / core / test_core_api.c
index 772ded991b8ae8dd7d84615186a476967d5509f4..847ba6e757543af6de9b60988204686e33abe285 100644 (file)
@@ -92,7 +92,7 @@ terminate_peer (struct PeerContext *p)
 {
   if (NULL != p->ch)
   {
-    GNUNET_CORE_disconnecT (p->ch);
+    GNUNET_CORE_disconnect (p->ch);
     p->ch = NULL;
   }
   if (NULL != p->ghh)
@@ -163,7 +163,7 @@ connect_notify (void *cls,
   {
     uint64_t flags;
     const void *extra;
-    
+
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                 "Asking core (1) for transmission to peer `%s'\n",
                 GNUNET_i2s (&p2.id));
@@ -209,7 +209,7 @@ handle_test (void *cls,
             const struct GNUNET_MessageHeader *message)
 {
   const struct GNUNET_PeerIdentity *peer = cls;
-  
+
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
               "Receiving message from `%s'.\n",
               GNUNET_i2s (peer));
@@ -225,12 +225,12 @@ static void
 init_notify (void *cls,
              const struct GNUNET_PeerIdentity *my_identity)
 {
-  GNUNET_MQ_hd_fixed_size (test,
-                          MTYPE,
-                          struct GNUNET_MessageHeader);
   struct PeerContext *p = cls;
   struct GNUNET_MQ_MessageHandler handlers[] = {
-    make_test_handler (NULL),
+    GNUNET_MQ_hd_fixed_size (test,
+                             MTYPE,
+                             struct GNUNET_MessageHeader,
+                             NULL),
     GNUNET_MQ_handler_end ()
   };
 
@@ -243,7 +243,7 @@ init_notify (void *cls,
     GNUNET_assert (ok == 2);
     OKPP;
     /* connect p2 */
-    p2.ch = GNUNET_CORE_connecT (p2.cfg,
+    p2.ch = GNUNET_CORE_connect (p2.cfg,
                                 &p2,
                                 &init_notify,
                                 &connect_notify,
@@ -298,11 +298,11 @@ run (void *cls,
      const char *cfgfile,
      const struct GNUNET_CONFIGURATION_Handle *cfg)
 {
-  GNUNET_MQ_hd_fixed_size (test,
-                          MTYPE,
-                          struct GNUNET_MessageHeader);
   struct GNUNET_MQ_MessageHandler handlers[] = {
-    make_test_handler (NULL),
+    GNUNET_MQ_hd_fixed_size (test,
+                             MTYPE,
+                             struct GNUNET_MessageHeader,
+                             NULL),
     GNUNET_MQ_handler_end ()
   };
 
@@ -317,7 +317,7 @@ run (void *cls,
                                     (GNUNET_TIME_UNIT_SECONDS, 300),
                                     &terminate_task_error, NULL);
   p1.ch =
-      GNUNET_CORE_connecT (p1.cfg,
+      GNUNET_CORE_connect (p1.cfg,
                           &p1,
                            &init_notify,
                            &connect_notify,