gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r36648 - gnunet/src/transport


From: gnunet
Subject: [GNUnet-SVN] r36648 - gnunet/src/transport
Date: Sun, 8 Nov 2015 12:40:26 +0100

Author: grothoff
Date: 2015-11-08 12:40:26 +0100 (Sun, 08 Nov 2015)
New Revision: 36648

Modified:
   gnunet/src/transport/gnunet-service-transport_neighbours.c
   gnunet/src/transport/transport.h
Log:
-more DCE after try_connect refactoring

Modified: gnunet/src/transport/gnunet-service-transport_neighbours.c
===================================================================
--- gnunet/src/transport/gnunet-service-transport_neighbours.c  2015-11-07 
00:06:26 UTC (rev 36647)
+++ gnunet/src/transport/gnunet-service-transport_neighbours.c  2015-11-08 
11:40:26 UTC (rev 36648)
@@ -462,52 +462,11 @@
 
 
 /**
- * Context for blacklist checks and the #try_connect_bl_check_cont()
- * function.  Stores information about ongoing blacklist checks.
- */
-struct BlackListCheckContext
-{
-
-  /**
-   * We keep blacklist checks in a DLL.
-   */
-  struct BlackListCheckContext *next;
-
-  /**
-   * We keep blacklist checks in a DLL.
-   */
-  struct BlackListCheckContext *prev;
-
-  /**
-   * Address that is being checked.
-   */
-  struct NeighbourAddress na;
-
-  /**
-   * Handle to the ongoing blacklist check.
-   */
-  struct GST_BlacklistCheck *bc;
-};
-
-
-/**
  * Hash map from peer identities to the respective `struct NeighbourMapEntry`.
  */
 static struct GNUNET_CONTAINER_MultiPeerMap *neighbours;
 
 /**
- * We keep blacklist checks in a DLL so that we can find
- * the 'sessions' in their 'struct NeighbourAddress' if
- * a session goes down.
- */
-static struct BlackListCheckContext *bc_head;
-
-/**
- * We keep blacklist checks in a DLL.
- */
-static struct BlackListCheckContext *bc_tail;
-
-/**
  * List of pending blacklist checks: head
  */
 static struct BlacklistCheckSwitchContext *pending_bc_head;
@@ -3256,25 +3215,7 @@
                                    struct GNUNET_ATS_Session *session)
 {
   struct NeighbourMapEntry *n;
-  struct BlackListCheckContext *bcc;
-  struct BlackListCheckContext *bcc_next;
 
-  /* make sure to cancel all ongoing blacklist checks involving 'session' */
-  bcc_next = bc_head;
-  while (NULL != (bcc = bcc_next))
-  {
-    bcc_next = bcc->next;
-    if (bcc->na.session == session)
-    {
-      if (NULL != bcc->bc)
-        GST_blacklist_test_cancel (bcc->bc);
-      GNUNET_HELLO_address_free (bcc->na.address);
-      GNUNET_CONTAINER_DLL_remove (bc_head,
-                                  bc_tail,
-                                  bcc);
-      GNUNET_free (bcc);
-    }
-  }
   if (NULL == (n = lookup_neighbour (peer)))
     return GNUNET_NO; /* can't affect us */
   if (session != n->primary_address.session)
@@ -3817,9 +3758,6 @@
 void
 GST_neighbours_stop ()
 {
-  struct BlacklistCheckSwitchContext *cur;
-  struct BlacklistCheckSwitchContext *next;
-
   if (NULL == neighbours)
     return;
   if (NULL != util_transmission_tk)
@@ -3832,21 +3770,6 @@
                                          NULL);
   GNUNET_CONTAINER_multipeermap_destroy (neighbours);
   neighbours = NULL;
-  next = pending_bc_head;
-  for (cur = next; NULL != cur; cur = next)
-  {
-    next = cur->next;
-    GNUNET_CONTAINER_DLL_remove (pending_bc_head,
-                                 pending_bc_tail,
-                                 cur);
-
-    if (NULL != cur->blc)
-    {
-      GST_blacklist_test_cancel (cur->blc);
-      cur->blc = NULL;
-    }
-    GNUNET_free (cur);
-  }
 }
 
 

Modified: gnunet/src/transport/transport.h
===================================================================
--- gnunet/src/transport/transport.h    2015-11-07 00:06:26 UTC (rev 36647)
+++ gnunet/src/transport/transport.h    2015-11-08 11:40:26 UTC (rev 36648)
@@ -165,31 +165,6 @@
 
 
 /**
- * Message type for sending a request connect message
- * to the transport service.  Must be done before transport
- * api will allow messages to be queued/sent to transport
- * service for transmission to a peer.
- */
-struct TransportRequestConnectMessage
-{
-  /**
-   *  Message header with type #GNUNET_MESSAGE_TYPE_TRANSPORT_REQUEST_CONNECT
-   */
-  struct GNUNET_MessageHeader header;
-
-  /**
-   * Reserved (0).
-   */
-  uint32_t reserved GNUNET_PACKED;
-
-  /**
-   * Identity of the peer we would like to connect to.
-   */
-  struct GNUNET_PeerIdentity peer;
-};
-
-
-/**
  * Message used to set a particular bandwidth quota.  Sent TO the
  * service to set an incoming quota, sent FROM the service to update
  * an outgoing quota.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]