add check for being alice and minor fix
authorxrs <xrs@mail36.net>
Wed, 8 Jan 2020 17:52:39 +0000 (18:52 +0100)
committerxrs <xrs@mail36.net>
Wed, 8 Jan 2020 17:52:39 +0000 (18:52 +0100)
contrib/build-common
src/cadet/cadet_protocol.h
src/cadet/gnunet-service-cadet_connection.c
src/cadet/test_cadet.conf

index d81bbfabc2538932f631d3946bd6a9b95182b4f2..1915a74bbb4cd2ae9bc541a382dfebc37064a2fd 160000 (submodule)
@@ -1 +1 @@
-Subproject commit d81bbfabc2538932f631d3946bd6a9b95182b4f2
+Subproject commit 1915a74bbb4cd2ae9bc541a382dfebc37064a2fd
index 52c63950d56d03603cd92f6a62a47e0641f441fb..91c7166097eb1c6f829149cfc6b1a916b6866529 100644 (file)
@@ -86,6 +86,7 @@ struct GNUNET_CADET_ConnectionCreateMessage
 
   /**
    * Infomation of known tunnel state to keep two peers synced. (xrs,t3ss)
+   * FIXME: find better var name.
    */
   int tunnel_up;
 
index 4b78b1812c3bfc831d8a27880277dfe959ac2739..de304aed79aad76f070f97e6ac5d4f879c7b19e6 100644 (file)
@@ -622,7 +622,12 @@ send_create (void *cls)
 
   // check for tunnel state and define tunnel_up (xrs,t3ss)
   t = GCP_get_tunnel (cc->destination, GNUNET_YES);
-  create_msg->tunnel_up = GCT_get_estate(t) == CADET_TUNNEL_KEY_UNINITIALIZED ? GNUNET_NO : GNUNET_YES;
+  if (NULL != t) 
+  {
+    create_msg->tunnel_up = (GCT_get_estate(t) == CADET_TUNNEL_KEY_UNINITIALIZED) && 
+                            (GCT_alice_or_betty (GCP_get_id(cc->destination)) == GNUNET_NO) 
+                            ? GNUNET_NO : GNUNET_YES;
+  }
 
   pids = (struct GNUNET_PeerIdentity *) &create_msg[1];
   pids[0] = my_full_id;
@@ -813,6 +818,7 @@ connection_create (struct CadetPeer *destination,
   cc = GNUNET_new (struct CadetConnection);
   cc->state = init_state;
   cc->ct = ct;
+  cc->destination = destination; /* xrs,t3ss,lurchi*/
   cc->cid = *cid;
   cc->retry_delay =
     GNUNET_TIME_relative_multiply (INITIAL_CONNECTION_CREATE_RETRY_DELAY, off);
index 30e496aff6854a78819698bbf1d65cfc90805c40..d2327b17198d510af0a3173de8690dfbb71176a3 100644 (file)
@@ -27,7 +27,8 @@ QUOTA = 1 MB
 DATABASE = heap
 
 [transport]
-PLUGINS = udp
+#PLUGINS = udp
+PLUGINS = tcp
 NEIGHBOUR_LIMIT = 50
 #MANIPULATE_DELAY_IN = 10 ms
 #MANIPULATE_DELAY_OUT = 10 ms