aboutsummaryrefslogtreecommitdiff
path: root/src/cadet/gnunet-service-cadet_connection.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2017-01-17 16:08:38 +0100
committerChristian Grothoff <christian@grothoff.org>2017-01-17 16:08:38 +0100
commitc87a389a4f842c20383d8619120b188e104cf64a (patch)
tree071cb3747a18386a4de81eee3a7ec0084c5574b0 /src/cadet/gnunet-service-cadet_connection.c
parent164d087730902feaef22c420fa4e00b12a66cd57 (diff)
downloadgnunet-c87a389a4f842c20383d8619120b188e104cf64a.tar.gz
gnunet-c87a389a4f842c20383d8619120b188e104cf64a.zip
towards actual routing...
Diffstat (limited to 'src/cadet/gnunet-service-cadet_connection.c')
-rw-r--r--src/cadet/gnunet-service-cadet_connection.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/cadet/gnunet-service-cadet_connection.c b/src/cadet/gnunet-service-cadet_connection.c
index ffd98bf34..2c21a1686 100644
--- a/src/cadet/gnunet-service-cadet_connection.c
+++ b/src/cadet/gnunet-service-cadet_connection.c
@@ -473,9 +473,9 @@ fc_init (struct CadetFlowControl *fc)
473 * @return conntection with the given ID @cid or NULL if not found. 473 * @return conntection with the given ID @cid or NULL if not found.
474 */ 474 */
475static struct CadetConnection * 475static struct CadetConnection *
476connection_get (const struct GNUNET_CADET_Hash *cid) 476connection_get (const struct GNUNET_CADET_ConnectionTunnelIdentifier *cid)
477{ 477{
478 return GNUNET_CONTAINER_multihashmap_get (connections, GC_h2hc (cid)); 478 return GNUNET_CONTAINER_multihashmap_get (connections, GC_h2hc (&cid->connection_of_tunnel));
479} 479}
480 480
481 481
@@ -1109,7 +1109,7 @@ send_broken_unknown (const struct GNUNET_CADET_ConnectionTunnelIdentifier *conne
1109 1109
1110 GCC_check_connections (); 1110 GCC_check_connections ();
1111 LOG (GNUNET_ERROR_TYPE_INFO, "--> BROKEN on unknown connection %s\n", 1111 LOG (GNUNET_ERROR_TYPE_INFO, "--> BROKEN on unknown connection %s\n",
1112 GNUNET_h2s (GC_h2hc (connection_id))); 1112 GNUNET_h2s (GC_h2hc (&connection_id->connection_of_tunnel)));
1113 1113
1114 msg.header.size = htons (sizeof (struct GNUNET_CADET_ConnectionBroken)); 1114 msg.header.size = htons (sizeof (struct GNUNET_CADET_ConnectionBroken));
1115 msg.header.type = htons (GNUNET_MESSAGE_TYPE_CADET_CONNECTION_BROKEN); 1115 msg.header.type = htons (GNUNET_MESSAGE_TYPE_CADET_CONNECTION_BROKEN);
@@ -1856,7 +1856,7 @@ log_message (const struct GNUNET_MessageHeader *message,
1856 arrow = "--"; 1856 arrow = "--";
1857 } 1857 }
1858 LOG (GNUNET_ERROR_TYPE_INFO, "<%s %s on conn %s from %s, %6u bytes\n", 1858 LOG (GNUNET_ERROR_TYPE_INFO, "<%s %s on conn %s from %s, %6u bytes\n",
1859 arrow, GC_m2s (type), GNUNET_h2s (GC_h2hc (conn_id)), 1859 arrow, GC_m2s (type), GNUNET_h2s (GC_h2hc (&conn_id->connection_of_tunnel)),
1860 GCP_2s(peer), (unsigned int) size); 1860 GCP_2s(peer), (unsigned int) size);
1861} 1861}
1862 1862
@@ -2354,7 +2354,7 @@ GCC_handle_poll (struct CadetPeer *peer,
2354 GNUNET_NO); 2354 GNUNET_NO);
2355 LOG (GNUNET_ERROR_TYPE_DEBUG, 2355 LOG (GNUNET_ERROR_TYPE_DEBUG,
2356 "POLL message on unknown connection %s!\n", 2356 "POLL message on unknown connection %s!\n",
2357 GNUNET_h2s (GC_h2hc (&msg->cid))); 2357 GNUNET_h2s (GC_h2hc (&msg->cid.connection_of_tunnel)));
2358 send_broken_unknown (&msg->cid, 2358 send_broken_unknown (&msg->cid,
2359 &my_full_id, 2359 &my_full_id,
2360 NULL, 2360 NULL,
@@ -2428,7 +2428,7 @@ check_message (const struct GNUNET_MessageHeader *message,
2428 LOG (GNUNET_ERROR_TYPE_DEBUG, 2428 LOG (GNUNET_ERROR_TYPE_DEBUG,
2429 "%s on unknown connection %s\n", 2429 "%s on unknown connection %s\n",
2430 GC_m2s (ntohs (message->type)), 2430 GC_m2s (ntohs (message->type)),
2431 GNUNET_h2s (GC_h2hc (cid))); 2431 GNUNET_h2s (GC_h2hc (&cid->connection_of_tunnel)));
2432 GNUNET_break_op (0); 2432 GNUNET_break_op (0);
2433 send_broken_unknown (cid, 2433 send_broken_unknown (cid,
2434 &my_full_id, 2434 &my_full_id,
@@ -2888,7 +2888,7 @@ GCC_get_id (const struct CadetConnection *c)
2888const struct GNUNET_HashCode * 2888const struct GNUNET_HashCode *
2889GCC_get_h (const struct CadetConnection *c) 2889GCC_get_h (const struct CadetConnection *c)
2890{ 2890{
2891 return GC_h2hc (&c->id); 2891 return GC_h2hc (&c->id.connection_of_tunnel);
2892} 2892}
2893 2893
2894 2894
@@ -3559,10 +3559,10 @@ GCC_2s (const struct CadetConnection *c)
3559 static char buf[128]; 3559 static char buf[128];
3560 3560
3561 SPRINTF (buf, "%s (->%s)", 3561 SPRINTF (buf, "%s (->%s)",
3562 GNUNET_h2s (GC_h2hc (GCC_get_id (c))), GCT_2s (c->t)); 3562 GNUNET_h2s (GC_h2hc (&GCC_get_id (c)->connection_of_tunnel)), GCT_2s (c->t));
3563 return buf; 3563 return buf;
3564 } 3564 }
3565 return GNUNET_h2s (GC_h2hc (&c->id)); 3565 return GNUNET_h2s (GC_h2hc (&c->id.connection_of_tunnel));
3566} 3566}
3567 3567
3568 3568