aboutsummaryrefslogtreecommitdiff
path: root/src/core/core_api.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/core_api.c')
-rw-r--r--src/core/core_api.c28
1 files changed, 0 insertions, 28 deletions
diff --git a/src/core/core_api.c b/src/core/core_api.c
index 4672c7843..42e8f1c06 100644
--- a/src/core/core_api.c
+++ b/src/core/core_api.c
@@ -56,12 +56,6 @@ struct GNUNET_CORE_Handle
56 GNUNET_CORE_StartupCallback init; 56 GNUNET_CORE_StartupCallback init;
57 57
58 /** 58 /**
59 * Function to call whenever we're notified about a peer connecting
60 * (pre-connects, no session key exchange yet).
61 */
62 GNUNET_CORE_ConnectEventHandler pre_connects;
63
64 /**
65 * Function to call whenever we're notified about a peer connecting. 59 * Function to call whenever we're notified about a peer connecting.
66 */ 60 */
67 GNUNET_CORE_ConnectEventHandler connects; 61 GNUNET_CORE_ConnectEventHandler connects;
@@ -406,23 +400,6 @@ main_notify_handler (void *cls, const struct GNUNET_MessageHeader *msg)
406#endif 400#endif
407 switch (ntohs (msg->type)) 401 switch (ntohs (msg->type))
408 { 402 {
409 case GNUNET_MESSAGE_TYPE_CORE_NOTIFY_PRE_CONNECT:
410 if (NULL == h->pre_connects)
411 {
412 GNUNET_break (0);
413 break;
414 }
415 if (msize != sizeof (struct ConnectNotifyMessage))
416 {
417 GNUNET_break (0);
418 break;
419 }
420 cnm = (const struct ConnectNotifyMessage *) msg;
421 h->pre_connects (h->cls,
422 &cnm->peer,
423 GNUNET_TIME_relative_ntoh (cnm->latency),
424 ntohl (cnm->distance));
425 break;
426 case GNUNET_MESSAGE_TYPE_CORE_NOTIFY_CONNECT: 403 case GNUNET_MESSAGE_TYPE_CORE_NOTIFY_CONNECT:
427 if (NULL == h->connects) 404 if (NULL == h->connects)
428 { 405 {
@@ -662,8 +639,6 @@ transmit_start (void *cls, size_t size, void *buf)
662 init->header.type = htons (GNUNET_MESSAGE_TYPE_CORE_INIT); 639 init->header.type = htons (GNUNET_MESSAGE_TYPE_CORE_INIT);
663 init->header.size = htons (msize); 640 init->header.size = htons (msize);
664 opt = GNUNET_CORE_OPTION_NOTHING; 641 opt = GNUNET_CORE_OPTION_NOTHING;
665 if (h->pre_connects != NULL)
666 opt |= GNUNET_CORE_OPTION_SEND_PRE_CONNECT;
667 if (h->connects != NULL) 642 if (h->connects != NULL)
668 opt |= GNUNET_CORE_OPTION_SEND_CONNECT; 643 opt |= GNUNET_CORE_OPTION_SEND_CONNECT;
669 if (h->disconnects != NULL) 644 if (h->disconnects != NULL)
@@ -705,7 +680,6 @@ transmit_start (void *cls, size_t size, void *buf)
705 * @param cls closure for the various callbacks that follow (including handlers in the handlers array) 680 * @param cls closure for the various callbacks that follow (including handlers in the handlers array)
706 * @param init callback to call on timeout or once we have successfully 681 * @param init callback to call on timeout or once we have successfully
707 * connected to the core service; note that timeout is only meaningful if init is not NULL 682 * connected to the core service; note that timeout is only meaningful if init is not NULL
708 * @param pre_connects function to call on peer pre-connect (no session key yet), can be NULL
709 * @param connects function to call on peer connect, can be NULL 683 * @param connects function to call on peer connect, can be NULL
710 * @param disconnects function to call on peer disconnect / timeout, can be NULL 684 * @param disconnects function to call on peer disconnect / timeout, can be NULL
711 * @param inbound_notify function to call for all inbound messages, can be NULL 685 * @param inbound_notify function to call for all inbound messages, can be NULL
@@ -726,7 +700,6 @@ GNUNET_CORE_connect (struct GNUNET_SCHEDULER_Handle *sched,
726 struct GNUNET_TIME_Relative timeout, 700 struct GNUNET_TIME_Relative timeout,
727 void *cls, 701 void *cls,
728 GNUNET_CORE_StartupCallback init, 702 GNUNET_CORE_StartupCallback init,
729 GNUNET_CORE_ConnectEventHandler pre_connects,
730 GNUNET_CORE_ConnectEventHandler connects, 703 GNUNET_CORE_ConnectEventHandler connects,
731 GNUNET_CORE_DisconnectEventHandler disconnects, 704 GNUNET_CORE_DisconnectEventHandler disconnects,
732 GNUNET_CORE_MessageCallback inbound_notify, 705 GNUNET_CORE_MessageCallback inbound_notify,
@@ -742,7 +715,6 @@ GNUNET_CORE_connect (struct GNUNET_SCHEDULER_Handle *sched,
742 h->cfg = cfg; 715 h->cfg = cfg;
743 h->cls = cls; 716 h->cls = cls;
744 h->init = init; 717 h->init = init;
745 h->pre_connects = pre_connects;
746 h->connects = connects; 718 h->connects = connects;
747 h->disconnects = disconnects; 719 h->disconnects = disconnects;
748 h->inbound_notify = inbound_notify; 720 h->inbound_notify = inbound_notify;