diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/chat/gnunet-service-chat.c | 3 | ||||
-rw-r--r-- | src/core/core_api.c | 22 | ||||
-rw-r--r-- | src/core/test_core_api.c | 4 | ||||
-rw-r--r-- | src/core/test_core_api_reliability.c | 4 | ||||
-rw-r--r-- | src/core/test_core_api_send_to_self.c | 2 | ||||
-rw-r--r-- | src/core/test_core_api_start_only.c | 4 | ||||
-rw-r--r-- | src/core/test_core_quota_compliance.c | 4 | ||||
-rw-r--r-- | src/dht/gnunet-service-dht_neighbours.c | 2 | ||||
-rw-r--r-- | src/dv/gnunet-service-dv.c | 2 | ||||
-rw-r--r-- | src/dv/test_transport_api_dv.c | 6 | ||||
-rw-r--r-- | src/fs/gnunet-service-fs.c | 2 | ||||
-rw-r--r-- | src/hostlist/gnunet-daemon-hostlist.c | 2 | ||||
-rw-r--r-- | src/hostlist/test_gnunet_daemon_hostlist_learning.c | 2 | ||||
-rw-r--r-- | src/include/gnunet_core_service.h | 29 | ||||
-rw-r--r-- | src/integration-tests/connection_watchdog.c | 2 | ||||
-rw-r--r-- | src/mesh/gnunet-service-mesh.c | 1 | ||||
-rw-r--r-- | src/mesh/gnunet-service-mesh_new.c | 1 | ||||
-rw-r--r-- | src/nse/gnunet-service-nse.c | 2 | ||||
-rw-r--r-- | src/testing/test_testing_large_topology.c | 4 | ||||
-rw-r--r-- | src/testing/test_testing_topology.c | 4 | ||||
-rw-r--r-- | src/testing/testing.c | 4 | ||||
-rw-r--r-- | src/topology/gnunet-daemon-topology.c | 2 |
22 files changed, 54 insertions, 54 deletions
diff --git a/src/chat/gnunet-service-chat.c b/src/chat/gnunet-service-chat.c index fb127b2f08..3405659a9f 100644 --- a/src/chat/gnunet-service-chat.c +++ b/src/chat/gnunet-service-chat.c @@ -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); diff --git a/src/core/core_api.c b/src/core/core_api.c index 526dc9fffd..2b6407b6e8 100644 --- a/src/core/core_api.c +++ b/src/core/core_api.c @@ -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, diff --git a/src/core/test_core_api.c b/src/core/test_core_api.c index 37d1669834..d1591328fc 100644 --- a/src/core/test_core_api.c +++ b/src/core/test_core_api.c @@ -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); } diff --git a/src/core/test_core_api_reliability.c b/src/core/test_core_api_reliability.c index e18d8c4fd2..682424f89b 100644 --- a/src/core/test_core_api_reliability.c +++ b/src/core/test_core_api_reliability.c @@ -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); } diff --git a/src/core/test_core_api_send_to_self.c b/src/core/test_core_api_send_to_self.c index b1340dcfb7..3827cdb77b 100644 --- a/src/core/test_core_api_send_to_self.c +++ b/src/core/test_core_api_send_to_self.c @@ -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 = diff --git a/src/core/test_core_api_start_only.c b/src/core/test_core_api_start_only.c index 8c8132043d..308814b219 100644 --- a/src/core/test_core_api_start_only.c +++ b/src/core/test_core_api_start_only.c @@ -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); } diff --git a/src/core/test_core_quota_compliance.c b/src/core/test_core_quota_compliance.c index df602b37f4..bee8c02b45 100644 --- a/src/core/test_core_quota_compliance.c +++ b/src/core/test_core_quota_compliance.c @@ -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, ¤t_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); } diff --git a/src/dht/gnunet-service-dht_neighbours.c b/src/dht/gnunet-service-dht_neighbours.c index 083b499230..dc91ac32d0 100644 --- a/src/dht/gnunet-service-dht_neighbours.c +++ b/src/dht/gnunet-service-dht_neighbours.c @@ -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) diff --git a/src/dv/gnunet-service-dv.c b/src/dv/gnunet-service-dv.c index 956595f431..6ee95c051c 100644 --- a/src/dv/gnunet-service-dv.c +++ b/src/dv/gnunet-service-dv.c @@ -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); diff --git a/src/dv/test_transport_api_dv.c b/src/dv/test_transport_api_dv.c index 6165a9db2f..b24bfbf310 100644 --- a/src/dv/test_transport_api_dv.c +++ b/src/dv/test_transport_api_dv.c @@ -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; diff --git a/src/fs/gnunet-service-fs.c b/src/fs/gnunet-service-fs.c index 06ac91c73d..94e8e6b239 100644 --- a/src/fs/gnunet-service-fs.c +++ b/src/fs/gnunet-service-fs.c @@ -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) diff --git a/src/hostlist/gnunet-daemon-hostlist.c b/src/hostlist/gnunet-daemon-hostlist.c index 0eedb56b16..8b7bf3a3e0 100644 --- a/src/hostlist/gnunet-daemon-hostlist.c +++ b/src/hostlist/gnunet-daemon-hostlist.c @@ -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); diff --git a/src/hostlist/test_gnunet_daemon_hostlist_learning.c b/src/hostlist/test_gnunet_daemon_hostlist_learning.c index 08ab0dedba..b7d96687c6 100644 --- a/src/hostlist/test_gnunet_daemon_hostlist_learning.c +++ b/src/hostlist/test_gnunet_daemon_hostlist_learning.c @@ -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); diff --git a/src/include/gnunet_core_service.h b/src/include/gnunet_core_service.h index cb48f41825..c648c3ce01 100644 --- a/src/include/gnunet_core_service.h +++ b/src/include/gnunet_core_service.h @@ -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, diff --git a/src/integration-tests/connection_watchdog.c b/src/integration-tests/connection_watchdog.c index ac19338cf2..a06b5a763a 100644 --- a/src/integration-tests/connection_watchdog.c +++ b/src/integration-tests/connection_watchdog.c @@ -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, diff --git a/src/mesh/gnunet-service-mesh.c b/src/mesh/gnunet-service-mesh.c index 36c6115a1d..0882dc44e8 100644 --- a/src/mesh/gnunet-service-mesh.c +++ b/src/mesh/gnunet-service-mesh.c @@ -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 */ diff --git a/src/mesh/gnunet-service-mesh_new.c b/src/mesh/gnunet-service-mesh_new.c index 65f3ee240b..992ceea5af 100644 --- a/src/mesh/gnunet-service-mesh_new.c +++ b/src/mesh/gnunet-service-mesh_new.c @@ -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 */ diff --git a/src/nse/gnunet-service-nse.c b/src/nse/gnunet-service-nse.c index 9c31ab8e22..af8c7c0813 100644 --- a/src/nse/gnunet-service-nse.c +++ b/src/nse/gnunet-service-nse.c @@ -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 */ diff --git a/src/testing/test_testing_large_topology.c b/src/testing/test_testing_large_topology.c index d126ab9405..cd80db1956 100644 --- a/src/testing/test_testing_large_topology.c +++ b/src/testing/test_testing_large_topology.c @@ -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); diff --git a/src/testing/test_testing_topology.c b/src/testing/test_testing_topology.c index b21654483f..94cbc0df64 100644 --- a/src/testing/test_testing_topology.c +++ b/src/testing/test_testing_topology.c @@ -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); diff --git a/src/testing/testing.c b/src/testing/testing.c index 31bea068cf..a80ad25cf6 100644 --- a/src/testing/testing.c +++ b/src/testing/testing.c @@ -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); } diff --git a/src/topology/gnunet-daemon-topology.c b/src/topology/gnunet-daemon-topology.c index 382c9f3d22..57da127fdd 100644 --- a/src/topology/gnunet-daemon-topology.c +++ b/src/topology/gnunet-daemon-topology.c @@ -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, |