-simplifying core API (#2400)
authorChristian Grothoff <christian@grothoff.org>
Sat, 9 Jun 2012 14:53:44 +0000 (14:53 +0000)
committerChristian Grothoff <christian@grothoff.org>
Sat, 9 Jun 2012 14:53:44 +0000 (14:53 +0000)
22 files changed:
src/chat/gnunet-service-chat.c
src/core/core_api.c
src/core/test_core_api.c
src/core/test_core_api_reliability.c
src/core/test_core_api_send_to_self.c
src/core/test_core_api_start_only.c
src/core/test_core_quota_compliance.c
src/dht/gnunet-service-dht_neighbours.c
src/dv/gnunet-service-dv.c
src/dv/test_transport_api_dv.c
src/fs/gnunet-service-fs.c
src/hostlist/gnunet-daemon-hostlist.c
src/hostlist/test_gnunet_daemon_hostlist_learning.c
src/include/gnunet_core_service.h
src/integration-tests/connection_watchdog.c
src/mesh/gnunet-service-mesh.c
src/mesh/gnunet-service-mesh_new.c
src/nse/gnunet-service-nse.c
src/testing/test_testing_large_topology.c
src/testing/test_testing_topology.c
src/testing/testing.c
src/topology/gnunet-daemon-topology.c

index fb127b2f08c2b1a1ac00e345218d306c7e890689..3405659a9fe6008ffba8067eefce6fcfebdd7a3d 100644 (file)
@@ -36,7 +36,6 @@
 #define DEBUG_CHAT_SERVICE GNUNET_EXTRA_LOGGING
 #define MAX_TRANSMIT_DELAY GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 60)
 #define EXPECTED_NEIGHBOUR_COUNT 16
-#define QUEUE_SIZE 16
 #define MAX_ANONYMOUS_MSG_LIST_LENGTH 16
 
 
@@ -1710,7 +1709,7 @@ run (void *cls, struct GNUNET_SERVER_Handle *server,
       GNUNET_CONTAINER_multihashmap_create (EXPECTED_NEIGHBOUR_COUNT);
   GNUNET_SERVER_add_handlers (server, handlers);
   core =
-      GNUNET_CORE_connect (cfg, QUEUE_SIZE, NULL, &core_init,
+      GNUNET_CORE_connect (cfg, NULL, &core_init,
                            &peer_connect_handler, &peer_disconnect_handler,
                            NULL, GNUNET_NO, NULL, GNUNET_NO, p2p_handlers);
   GNUNET_SERVER_disconnect_notify (server, &handle_client_disconnect, NULL);
index 526dc9fffd7e2b1271a333bbbefe1040a1736315..2b6407b6e8942003d9d91eb6b0b816ef5cef5b83 100644 (file)
@@ -1158,7 +1158,6 @@ reconnect (struct GNUNET_CORE_Handle *h)
  * complete (or fail) asynchronously.
  *
  * @param cfg configuration to use
- * @param queue_size size of the per-peer message queue
  * @param cls closure for the various callbacks that follow (including handlers in the handlers array)
  * @param init callback to call once we have successfully
  *        connected to the core service
@@ -1178,7 +1177,7 @@ reconnect (struct GNUNET_CORE_Handle *h)
  */
 struct GNUNET_CORE_Handle *
 GNUNET_CORE_connect (const struct GNUNET_CONFIGURATION_Handle *cfg,
-                     unsigned int queue_size, void *cls,
+                     void *cls,
                      GNUNET_CORE_StartupCallback init,
                      GNUNET_CORE_ConnectEventHandler connects,
                      GNUNET_CORE_DisconnectEventHandler disconnects,
@@ -1192,7 +1191,7 @@ GNUNET_CORE_connect (const struct GNUNET_CONFIGURATION_Handle *cfg,
 
   h = GNUNET_malloc (sizeof (struct GNUNET_CORE_Handle));
   h->cfg = cfg;
-  h->queue_size = queue_size;
+  h->queue_size = 1; // FIXME: remove entirely...
   h->cls = cls;
   h->init = init;
   h->connects = connects;
@@ -1285,9 +1284,13 @@ run_request_next_transmission (void *cls,
 
 /**
  * Ask the core to call "notify" once it is ready to transmit the
- * given number of bytes to the specified "target".    Must only be
+ * given number of bytes to the specified "target".  Must only be
  * called after a connection to the respective peer has been
- * established (and the client has been informed about this).
+ * established (and the client has been informed about this).  You may
+ * have one request of this type pending for each connected peer at
+ * any time.  If a peer disconnects, the application MUST call
+ * "GNUNET_CORE_notify_transmit_ready_cancel" on the respective
+ * transmission request, if one such request is pending.
  *
  * @param handle connection to core service
  * @param cork is corking allowed for this transmission?
@@ -1295,11 +1298,14 @@ run_request_next_transmission (void *cls,
  * @param maxdelay how long can the message wait?
  * @param target who should receive the message, never NULL (can be this peer's identity for loopback)
  * @param notify_size how many bytes of buffer space does notify want?
- * @param notify function to call when buffer space is available
+ * @param notify function to call when buffer space is available;
+ *        will be called with NULL on timeout; clients MUST cancel
+ *        all pending transmission requests DURING the disconnect
+ *        handler
  * @param notify_cls closure for notify
  * @return non-NULL if the notify callback was queued,
- *         NULL if we can not even queue the request (insufficient
- *         memory); if NULL is returned, "notify" will NOT be called.
+ *         NULL if we can not even queue the request (request already pending);
+ *         if NULL is returned, "notify" will NOT be called.
  */
 struct GNUNET_CORE_TransmitHandle *
 GNUNET_CORE_notify_transmit_ready (struct GNUNET_CORE_Handle *handle, int cork,
index 37d16698341157832034570e4f1e85f94d1f7f3e..d1591328fc396d58aa5dcd32ecbede70276e247b 100644 (file)
@@ -299,7 +299,7 @@ init_notify (void *cls, struct GNUNET_CORE_Handle *server,
     OKPP;
     /* connect p2 */
     p2.ch =
-        GNUNET_CORE_connect (p2.cfg, 1, &p2, &init_notify, &connect_notify,
+        GNUNET_CORE_connect (p2.cfg, &p2, &init_notify, &connect_notify,
                              &disconnect_notify, &inbound_notify, GNUNET_YES,
                              &outbound_notify, GNUNET_YES, handlers);
   }
@@ -346,7 +346,7 @@ run (void *cls, char *const *args, const char *cfgfile,
                                     (GNUNET_TIME_UNIT_SECONDS, 300),
                                     &terminate_task_error, NULL);
   p1.ch =
-      GNUNET_CORE_connect (p1.cfg, 1, &p1, &init_notify, &connect_notify,
+      GNUNET_CORE_connect (p1.cfg, &p1, &init_notify, &connect_notify,
                            &disconnect_notify, &inbound_notify, GNUNET_YES,
                            &outbound_notify, GNUNET_YES, handlers);
 }
index e18d8c4fd2b4880e1183402ff8da3f0779392cb4..682424f89b5cb8f013151c2186c505d6ef2fe5df 100644 (file)
@@ -384,7 +384,7 @@ init_notify (void *cls, struct GNUNET_CORE_Handle *server,
     GNUNET_assert (ok == 2);
     OKPP;
     /* connect p2 */
-    GNUNET_CORE_connect (p2.cfg, 1, &p2, &init_notify, &connect_notify,
+    GNUNET_CORE_connect (p2.cfg, &p2, &init_notify, &connect_notify,
                          &disconnect_notify, &inbound_notify, GNUNET_YES,
                          &outbound_notify, GNUNET_YES, handlers);
   }
@@ -450,7 +450,7 @@ run (void *cls, char *const *args, const char *cfgfile,
   setup_peer (&p2, "test_core_api_peer2.conf");
   err_task =
       GNUNET_SCHEDULER_add_delayed (TIMEOUT, &terminate_task_error, NULL);
-  GNUNET_CORE_connect (p1.cfg, 1, &p1, &init_notify, &connect_notify,
+  GNUNET_CORE_connect (p1.cfg, &p1, &init_notify, &connect_notify,
                        &disconnect_notify, &inbound_notify, GNUNET_YES,
                        &outbound_notify, GNUNET_YES, handlers);
 }
index b1340dcfb7bb341e32c47ea85ba7fb3506d7249a..3827cdb77b26d0be2831d622977204c6bf4f17c3 100644 (file)
@@ -182,7 +182,7 @@ run (void *cls, char *const *args, const char *cfgfile,
                                             "test_core_api_peer1.conf"));
 
   core =
-      GNUNET_CORE_connect (core_cfg, 42, NULL, &init, &connect_cb, NULL, NULL,
+      GNUNET_CORE_connect (core_cfg, NULL, &init, &connect_cb, NULL, NULL,
                            0, NULL, 0, handlers);
 
   die_task =
index 8c8132043dcbd6a6329c19536eaa3e749600de24..308814b2191d83ec1be20b89c88fcfa650c1200b 100644 (file)
@@ -129,7 +129,7 @@ init_notify (void *cls, struct GNUNET_CORE_Handle *server,
   {
     /* connect p2 */
     p2.ch =
-        GNUNET_CORE_connect (p2.cfg, 1, &p2, &init_notify, &connect_notify,
+        GNUNET_CORE_connect (p2.cfg, &p2, &init_notify, &connect_notify,
                              &disconnect_notify, &inbound_notify, GNUNET_YES,
                              &outbound_notify, GNUNET_YES, handlers);
   }
@@ -191,7 +191,7 @@ run (void *cls, char *const *args, const char *cfgfile,
                                     (GNUNET_TIME_UNIT_MINUTES, TIMEOUT),
                                     &timeout_task, NULL);
   p1.ch =
-      GNUNET_CORE_connect (p1.cfg, 1, &p1, &init_notify, &connect_notify,
+      GNUNET_CORE_connect (p1.cfg, &p1, &init_notify, &connect_notify,
                            &disconnect_notify, &inbound_notify, GNUNET_YES,
                            &outbound_notify, GNUNET_YES, handlers);
 }
index df602b37f45ea18bdb15953eaabedf8de1341252..bee8c02b450c4a320f9bcd59a5756253276c6205 100644 (file)
@@ -527,7 +527,7 @@ init_notify (void *cls, struct GNUNET_CORE_Handle *server,
     OKPP;
     /* connect p2 */
     p2.ch =
-        GNUNET_CORE_connect (p2.cfg, 1, &p2, &init_notify, &connect_notify,
+        GNUNET_CORE_connect (p2.cfg, &p2, &init_notify, &connect_notify,
                              &disconnect_notify, &inbound_notify, GNUNET_YES,
                              &outbound_notify, GNUNET_YES, handlers);
   }
@@ -629,7 +629,7 @@ run (void *cls, char *const *args, const char *cfgfile,
                                                       &current_quota_p2_out));
 
   p1.ch =
-      GNUNET_CORE_connect (p1.cfg, 1, &p1, &init_notify, &connect_notify,
+      GNUNET_CORE_connect (p1.cfg, &p1, &init_notify, &connect_notify,
                            &disconnect_notify, &inbound_notify, GNUNET_YES,
                            &outbound_notify, GNUNET_YES, handlers);
 }
index 083b499230d734f3157cf80cad7d8bcd97b7aeda..dc91ac32d0a4141b82b2703c79bc883a6159d473 100644 (file)
@@ -1980,7 +1980,7 @@ GDS_NEIGHBOURS_init ()
     bucket_size = (unsigned int) temp_config_num;
   atsAPI = GNUNET_ATS_performance_init (GDS_cfg, NULL, NULL);
   coreAPI =
-      GNUNET_CORE_connect (GDS_cfg, 1, NULL, &core_init, &handle_core_connect,
+      GNUNET_CORE_connect (GDS_cfg, NULL, &core_init, &handle_core_connect,
                            &handle_core_disconnect, NULL, GNUNET_NO, NULL,
                            GNUNET_NO, core_handlers);
   if (coreAPI == NULL)
index 956595f431d0fcf4838b459e0b78e193a14c88c8..6ee95c051c1c915d292469b14b716d0705d3ef8b 100644 (file)
@@ -3295,7 +3295,7 @@ run (void *cls, struct GNUNET_SERVER_Handle *server,
       GNUNET_CONTAINER_multihashmap_create (max_table_size * 3);
 
   GNUNET_SERVER_add_handlers (server, plugin_handlers);
-  coreAPI = GNUNET_CORE_connect (cfg, 1, NULL,  /* FIXME: anything we want to pass around? */
+  coreAPI = GNUNET_CORE_connect (cfg, NULL,  /* FIXME: anything we want to pass around? */
                                  &core_init, &handle_core_connect,
                                  &handle_core_disconnect, NULL, GNUNET_NO, NULL,
                                  GNUNET_NO, core_handlers);
index 6165a9db2f9cffa667d297571357c443c33b6f2f..b24bfbf3108fefc93d7163d90a09c18c753756b4 100644 (file)
@@ -601,7 +601,7 @@ connect_notify_peer1 (void *cls, const struct GNUNET_PeerIdentity *peer,
      * Connect to the receiving peer
      */
     pos->peer2handle =
-        GNUNET_CORE_connect (pos->peer2->cfg, 1, pos, &init_notify_peer2,
+        GNUNET_CORE_connect (pos->peer2->cfg, pos, &init_notify_peer2,
                              &connect_notify_peer2, NULL, NULL, GNUNET_YES,
                              NULL, GNUNET_YES, handlers);
   }
@@ -651,7 +651,7 @@ send_test_messages (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
    * Connect to the sending peer
    */
   pos->peer1handle =
-      GNUNET_CORE_connect (pos->peer1->cfg, 1, pos, &init_notify_peer1,
+      GNUNET_CORE_connect (pos->peer1->cfg, pos, &init_notify_peer1,
                            &connect_notify_peer1, NULL, NULL, GNUNET_NO, NULL,
                            GNUNET_NO, no_handlers);
 
@@ -944,7 +944,7 @@ peers_started_callback (void *cls, const struct GNUNET_PeerIdentity *id,
 
   new_peer = GNUNET_malloc (sizeof (struct PeerContext));
   new_peer->peer_handle =
-      GNUNET_CORE_connect (cfg, 1, d, NULL, &all_connect_handler, NULL, NULL,
+      GNUNET_CORE_connect (cfg, d, NULL, &all_connect_handler, NULL, NULL,
                            GNUNET_NO, NULL, GNUNET_NO, no_handlers);
   new_peer->daemon = d;
   new_peer->next = all_peers;
index 06ac91c73d5f1a21f9b79d59f6454801106b0df7..94e8e6b239928d422acf229c4e7a2ebb1163851b 100644 (file)
@@ -572,7 +572,7 @@ main_init (struct GNUNET_SERVER_Handle *server,
   };
 
   GSF_core =
-      GNUNET_CORE_connect (GSF_cfg, 1, NULL, &peer_init_handler,
+      GNUNET_CORE_connect (GSF_cfg, NULL, &peer_init_handler,
                            &peer_connect_handler, &GSF_peer_disconnect_handler_,
                            NULL, GNUNET_NO, NULL, GNUNET_NO, p2p_handlers);
   if (NULL == GSF_core)
index 0eedb56b16e8f81b54b172d6a6f184e0629e773f..8b7bf3a3e031cb0e5f0455dd579becb578aaedad 100644 (file)
@@ -270,7 +270,7 @@ run (void *cls, char *const *args, const char *cfgfile,
   stats = GNUNET_STATISTICS_create ("hostlist", cfg);
 
   core =
-      GNUNET_CORE_connect (cfg, 1, NULL, &core_init, &connect_handler,
+      GNUNET_CORE_connect (cfg, NULL, &core_init, &connect_handler,
                            &disconnect_handler, NULL, GNUNET_NO, NULL,
                            GNUNET_NO,
                            learning ? learn_handlers : no_learn_handlers);
index 08ab0dedba66dd5fa07520d17bdfdf56e0f23055..b7d96687c63b8dae76e4951df439449a9bc42630 100644 (file)
@@ -411,7 +411,7 @@ setup_learn_peer (struct PeerContext *p, const char *cfgname)
     GNUNET_free (filename);
   }
   p->core =
-      GNUNET_CORE_connect (p->cfg, 1, NULL, NULL, NULL, NULL, NULL, GNUNET_NO,
+      GNUNET_CORE_connect (p->cfg, NULL, NULL, NULL, NULL, NULL, GNUNET_NO,
                            NULL, GNUNET_NO, learn_handlers);
   GNUNET_assert (NULL != p->core);
   p->stats = GNUNET_STATISTICS_create ("hostlist", p->cfg);
index cb48f41825700e265e58c940f8e6a39d225abce2..c648c3ce01e6c4a61567d6bdac5a778fd1fc6af0 100644 (file)
@@ -42,7 +42,7 @@ extern "C"
 /**
  * Version number of GNUnet-core API.
  */
-#define GNUNET_CORE_VERSION 0x00000000
+#define GNUNET_CORE_VERSION 0x00000001
 
 
 /**
@@ -148,14 +148,13 @@ typedef void (*GNUNET_CORE_StartupCallback) (void *cls,
  * (or fail) asynchronously.  This function primarily causes the given
  * callback notification functions to be invoked whenever the
  * specified event happens.  The maximum number of queued
- * notifications (queue length) is per client but the queue is shared
+ * notifications (queue length) is per client; the queue is shared
  * across all types of notifications.  So a slow client that registers
  * for 'outbound_notify' also risks missing 'inbound_notify' messages.
  * Certain events (such as connect/disconnect notifications) are not
  * subject to queue size limitations.
  *
  * @param cfg configuration to use
- * @param queue_size size of the per-peer message queue
  * @param cls closure for the various callbacks that follow (including handlers in the handlers array)
  * @param init callback to call once we have successfully
  *        connected to the core service
@@ -190,7 +189,7 @@ typedef void (*GNUNET_CORE_StartupCallback) (void *cls,
  */
 struct GNUNET_CORE_Handle *
 GNUNET_CORE_connect (const struct GNUNET_CONFIGURATION_Handle *cfg,
-                     unsigned int queue_size, void *cls,
+                     void *cls,
                      GNUNET_CORE_StartupCallback init,
                      GNUNET_CORE_ConnectEventHandler connects,
                      GNUNET_CORE_DisconnectEventHandler disconnects,
@@ -220,10 +219,13 @@ struct GNUNET_CORE_TransmitHandle;
 
 /**
  * Ask the core to call "notify" once it is ready to transmit the
- * given number of bytes to the specified "target".   Must only be
+ * given number of bytes to the specified "target".  Must only be
  * called after a connection to the respective peer has been
- * established (and the client has been informed about this).
- *
+ * established (and the client has been informed about this).  You may
+ * have one request of this type pending for each connected peer at
+ * any time.  If a peer disconnects, the application MUST call
+ * "GNUNET_CORE_notify_transmit_ready_cancel" on the respective
+ * transmission request, if one such request is pending.
  *
  * @param handle connection to core service
  * @param cork is corking allowed for this transmission?
@@ -232,18 +234,13 @@ struct GNUNET_CORE_TransmitHandle;
  * @param target who should receive the message, never NULL (can be this peer's identity for loopback)
  * @param notify_size how many bytes of buffer space does notify want?
  * @param notify function to call when buffer space is available;
- *        will be called with NULL on timeout or if the overall queue
- *        for this peer is larger than queue_size and this is currently
- *        the message with the lowest priority; will also be called
- *        with 'NULL' buf if the peer disconnects; since the disconnect
- *        signal will be emmitted even later, clients MUST cancel
+ *        will be called with NULL on timeout; clients MUST cancel
  *        all pending transmission requests DURING the disconnect
- *        handler (unless they ensure that 'notify' never calls
- *        'GNUNET_CORE_notify_transmit_ready').
+ *        handler
  * @param notify_cls closure for notify
  * @return non-NULL if the notify callback was queued,
- *         NULL if we can not even queue the request (insufficient
- *         memory); if NULL is returned, "notify" will NOT be called.
+ *         NULL if we can not even queue the request (request already pending);
+ *         if NULL is returned, "notify" will NOT be called.
  */
 struct GNUNET_CORE_TransmitHandle *
 GNUNET_CORE_notify_transmit_ready (struct GNUNET_CORE_Handle *handle, int cork,
index ac19338cf2fc738978847db11b2c2f992f67768c..a06b5a763a319a6ee5315c2a7b2a739f734f35fc 100644 (file)
@@ -1060,7 +1060,7 @@ run (void *cls, char *const *args, const char *cfgfile,
                                 &transport_notify_disconnect_cb);
   GNUNET_assert (th != NULL);
   GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Connected to transport service\n");
-  ch =  GNUNET_CORE_connect (cfg, 1, NULL,
+  ch =  GNUNET_CORE_connect (cfg, NULL,
                              &core_init_cb,
                              &core_connect_cb,
                              &core_disconnect_cb,
index 36c6115a1d030057e25564bb5d739c0df0309ebe..0882dc44e816fd73fcfc500af08443127784a795 100644 (file)
@@ -4757,7 +4757,6 @@ run (void *cls, struct GNUNET_SERVER_Handle *server,
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "starting to run\n");
   server_handle = server;
   core_handle = GNUNET_CORE_connect (c, /* Main configuration */
-                                     CORE_QUEUE_SIZE,   /* queue size */
                                      NULL,      /* Closure passed to MESH functions */
                                      &core_init,        /* Call core_init once connected */
                                      &core_connect,     /* Handle connects */
index 65f3ee240b719c4075769e275486d5779a5af354..992ceea5af951076f5aa6b6bca755777212334b5 100644 (file)
@@ -4744,7 +4744,6 @@ run (void *cls, struct GNUNET_SERVER_Handle *server,
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "starting to run\n");
   server_handle = server;
   core_handle = GNUNET_CORE_connect (c, /* Main configuration */
-                                     1,   /* queue size */
                                      NULL,      /* Closure passed to MESH functions */
                                      &core_init,        /* Call core_init once connected */
                                      &core_connect,     /* Handle connects */
index 9c31ab8e22795577c4bc879ab3ae2218bf6d3ab0..af8c7c081354afba72cdebb6d8567357d4282799 100644 (file)
@@ -1441,7 +1441,7 @@ run (void *cls, struct GNUNET_SERVER_Handle *server,
   nc = GNUNET_SERVER_notification_context_create (server, 1);
   /* Connect to core service and register core handlers */
   coreAPI = GNUNET_CORE_connect (cfg,   /* Main configuration */
-                                 1, NULL,       /* Closure passed to functions */
+                                 NULL,       /* Closure passed to functions */
                                  &core_init,    /* Call core_init once connected */
                                  &handle_core_connect,  /* Handle connects */
                                  &handle_core_disconnect,       /* Handle disconnects */
index d126ab94058f2ea9179b12db5e8107514720784f..cd80db195669316e4cee5a825bd143a719c99a97 100644 (file)
@@ -564,7 +564,7 @@ init_notify_peer1 (void *cls, struct GNUNET_CORE_Handle *server,
    * Connect to the receiving peer
    */
   pos->peer2handle =
-      GNUNET_CORE_connect (pos->peer2->cfg, 1, pos, &init_notify_peer2, NULL,
+      GNUNET_CORE_connect (pos->peer2->cfg, pos, &init_notify_peer2, NULL,
                            NULL, NULL, NULL, GNUNET_YES, NULL, GNUNET_YES,
                            handlers);
 
@@ -603,7 +603,7 @@ send_test_messages (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
    * Connect to the sending peer
    */
   pos->peer1handle =
-      GNUNET_CORE_connect (pos->peer1->cfg, 1, pos, &init_notify_peer1,
+      GNUNET_CORE_connect (pos->peer1->cfg, pos, &init_notify_peer1,
                            &connect_notify_peers, NULL, NULL, NULL, GNUNET_NO,
                            NULL, GNUNET_NO, no_handlers);
 
index b21654483f99c5f43319457f9ced77c123957df7..94cbc0df64af77c9ca7fb11f5f4d32dc1a4454ce 100644 (file)
@@ -585,7 +585,7 @@ init_notify_peer1 (void *cls, struct GNUNET_CORE_Handle *server,
    * Connect to the receiving peer
    */
   pos->peer2handle =
-      GNUNET_CORE_connect (pos->peer2->cfg, 1, pos, &init_notify_peer2, NULL,
+      GNUNET_CORE_connect (pos->peer2->cfg, pos, &init_notify_peer2, NULL,
                            NULL, NULL, GNUNET_YES, NULL, GNUNET_YES, handlers);
 
 }
@@ -623,7 +623,7 @@ send_test_messages (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
    * Connect to the sending peer
    */
   pos->peer1handle =
-      GNUNET_CORE_connect (pos->peer1->cfg, 1, pos, &init_notify_peer1,
+      GNUNET_CORE_connect (pos->peer1->cfg, pos, &init_notify_peer1,
                            &connect_notify_peers, NULL, NULL, GNUNET_NO, NULL,
                            GNUNET_NO, no_handlers);
 
index 31bea068cfe84836f6d643a87237cf0cf3ab2fba..a80ad25cf6d8a674e5a16f31de22a2c0fb918312 100644 (file)
@@ -1911,7 +1911,7 @@ reattempt_daemons_connect (void *cls,
   GNUNET_assert (ctx->d1core == NULL);
   ctx->d1core_ready = GNUNET_NO;
   ctx->d1core =
-      GNUNET_CORE_connect (ctx->d1->cfg, 1, ctx, &core_init_notify,
+      GNUNET_CORE_connect (ctx->d1->cfg, ctx, &core_init_notify,
                            &connect_notify, NULL, NULL, GNUNET_NO, NULL,
                            GNUNET_NO, no_handlers);
   if (ctx->d1core == NULL)
@@ -2055,7 +2055,7 @@ core_initial_iteration (void *cls, const struct GNUNET_PeerIdentity *peer,
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                 "Peers are NOT connected, connecting to core!\n");
     ctx->d1core =
-        GNUNET_CORE_connect (ctx->d1->cfg, 1, ctx, &core_init_notify,
+        GNUNET_CORE_connect (ctx->d1->cfg, ctx, &core_init_notify,
                              &connect_notify, NULL, NULL, GNUNET_NO, NULL,
                              GNUNET_NO, no_handlers);
   }
index 382c9f3d22808544b36e8a870d0ea511082c8692..57da127fdda4d49ce7146f78c34e1a14459b55fb 100644 (file)
@@ -1319,7 +1319,7 @@ run (void *cls, char *const *args, const char *cfgfile,
     blacklist = GNUNET_TRANSPORT_blacklist (cfg, &blacklist_check, NULL);
   transport = GNUNET_TRANSPORT_connect (cfg, NULL, NULL, NULL, NULL, NULL);
   handle =
-      GNUNET_CORE_connect (cfg, 1, NULL, &core_init, &connect_notify,
+      GNUNET_CORE_connect (cfg, NULL, &core_init, &connect_notify,
                            &disconnect_notify, NULL, GNUNET_NO, NULL, GNUNET_NO,
                            handlers);
   GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL, &cleaning_task,