[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r30103 - gnunet/src/mesh
From: |
gnunet |
Subject: |
[GNUnet-SVN] r30103 - gnunet/src/mesh |
Date: |
Thu, 10 Oct 2013 16:50:58 +0200 |
Author: bartpolot
Date: 2013-10-10 16:50:58 +0200 (Thu, 10 Oct 2013)
New Revision: 30103
Modified:
gnunet/src/mesh/gnunet-service-mesh-enc.c
gnunet/src/mesh/gnunet-service-mesh_connection.c
gnunet/src/mesh/gnunet-service-mesh_dht.h
gnunet/src/mesh/gnunet-service-mesh_tunnel.c
gnunet/src/mesh/gnunet-service-mesh_tunnel.h
Log:
- fixes
Modified: gnunet/src/mesh/gnunet-service-mesh-enc.c
===================================================================
--- gnunet/src/mesh/gnunet-service-mesh-enc.c 2013-10-10 14:50:58 UTC (rev
30102)
+++ gnunet/src/mesh/gnunet-service-mesh-enc.c 2013-10-10 14:50:58 UTC (rev
30103)
@@ -169,8 +169,7 @@
pk = GNUNET_CRYPTO_eddsa_key_create_from_configuration (c);
GNUNET_assert (NULL != pk);
my_private_key = pk;
- GNUNET_CRYPTO_eddsa_key_get_public (my_private_key,
- &my_full_id.public_key);
+ GNUNET_CRYPTO_eddsa_key_get_public (my_private_key, &my_full_id.public_key);
myid = GNUNET_PEER_intern (&my_full_id);
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
"Mesh for peer [%s] starting\n",
@@ -179,8 +178,8 @@
GML_init (server); /* Local clients */
GMC_init (c); /* Connections */
GMP_init (c); /* Peers */
- GMD_init (c, &my_full_id); /* DHT */
- GMT_init (c, &my_full_id, my_private_key);
+ GMD_init (c); /* DHT */
+ GMT_init (c, my_private_key); /* Tunnels */
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Mesh service running\n");
}
Modified: gnunet/src/mesh/gnunet-service-mesh_connection.c
===================================================================
--- gnunet/src/mesh/gnunet-service-mesh_connection.c 2013-10-10 14:50:58 UTC
(rev 30102)
+++ gnunet/src/mesh/gnunet-service-mesh_connection.c 2013-10-10 14:50:58 UTC
(rev 30103)
@@ -1809,8 +1809,6 @@
void
GMC_destroy (struct MeshConnection *c)
{
- struct MeshPeer *peer;
-
if (NULL == c)
return;
Modified: gnunet/src/mesh/gnunet-service-mesh_dht.h
===================================================================
--- gnunet/src/mesh/gnunet-service-mesh_dht.h 2013-10-10 14:50:58 UTC (rev
30102)
+++ gnunet/src/mesh/gnunet-service-mesh_dht.h 2013-10-10 14:50:58 UTC (rev
30103)
@@ -61,11 +61,9 @@
* Initialize the DHT subsystem.
*
* @param c Configuration.
- * @param peer_id Local peer ID (must remain valid during all execution time).
*/
void
-GMD_init (const struct GNUNET_CONFIGURATION_Handle *c,
- struct GNUNET_PeerIdentity *peer_id);
+GMD_init (const struct GNUNET_CONFIGURATION_Handle *c);
/**
* Shut down the DHT subsystem.
Modified: gnunet/src/mesh/gnunet-service-mesh_tunnel.c
===================================================================
--- gnunet/src/mesh/gnunet-service-mesh_tunnel.c 2013-10-10 14:50:58 UTC
(rev 30102)
+++ gnunet/src/mesh/gnunet-service-mesh_tunnel.c 2013-10-10 14:50:58 UTC
(rev 30103)
@@ -164,19 +164,19 @@
extern struct GNUNET_STATISTICS_Handle *stats;
/**
- * Default TTL for payload packets.
+ * Local peer own ID (memory efficient handle).
*/
-static unsigned long long default_ttl;
+extern GNUNET_PEER_Id myid;
/**
- * Local peer own ID (memory efficient handle).
+ * Local peer own ID (full value).
*/
-static GNUNET_PEER_Id my_short_id;
+extern struct GNUNET_PeerIdentity my_full_id;
/**
- * Local peer own ID (full value).
+ * Default TTL for payload packets.
*/
-const static struct GNUNET_PeerIdentity *my_full_id;
+static unsigned long long default_ttl;
/**
* Own private key.
@@ -547,7 +547,6 @@
*/
void
GMT_init (const struct GNUNET_CONFIGURATION_Handle *c,
- const struct GNUNET_PeerIdentity *id,
const struct GNUNET_CRYPTO_EddsaPrivateKey *key)
{
if (GNUNET_OK !=
@@ -558,9 +557,7 @@
"MESH", "DEFAULT_TTL", "USING DEFAULT");
default_ttl = 64;
}
- my_full_id = id;
my_private_key = key;
- my_short_id = GNUNET_PEER_intern (my_full_id);
}
@@ -570,7 +567,7 @@
void
GMT_shutdown (void)
{
- GNUNET_PEER_change_rc (my_short_id, -1);
+ GNUNET_PEER_change_rc (myid, -1);
}
@@ -894,7 +891,7 @@
for (own_pos = 0; own_pos < p->length; own_pos++)
{
- if (p->peers[own_pos] == my_short_id)
+ if (p->peers[own_pos] == myid)
break;
}
if (own_pos > p->length - 1)
@@ -1164,7 +1161,7 @@
int
GMT_is_loopback (const struct MeshTunnel3 *t)
{
- return (my_short_id == GMP_get_short_id(t->peer));
+ return (myid == GMP_get_short_id(t->peer));
}
Modified: gnunet/src/mesh/gnunet-service-mesh_tunnel.h
===================================================================
--- gnunet/src/mesh/gnunet-service-mesh_tunnel.h 2013-10-10 14:50:58 UTC
(rev 30102)
+++ gnunet/src/mesh/gnunet-service-mesh_tunnel.h 2013-10-10 14:50:58 UTC
(rev 30103)
@@ -89,12 +89,10 @@
* Initialize tunnel subsystem.
*
* @param c Configuration handle.
- * @param id Peer identity.
* @param key ECC private key, to derive all other keys and do crypto.
*/
void
GMT_init (const struct GNUNET_CONFIGURATION_Handle *c,
- const struct GNUNET_PeerIdentity *id,
const struct GNUNET_CRYPTO_EddsaPrivateKey *key);
/**
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r30103 - gnunet/src/mesh,
gnunet <=