[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r32851 - gnunet/src/mesh
From: |
gnunet |
Subject: |
[GNUnet-SVN] r32851 - gnunet/src/mesh |
Date: |
Tue, 1 Apr 2014 02:16:19 +0200 |
Author: bartpolot
Date: 2014-04-01 02:16:19 +0200 (Tue, 01 Apr 2014)
New Revision: 32851
Modified:
gnunet/src/mesh/gnunet-mesh.c
gnunet/src/mesh/gnunet-service-mesh_local.c
gnunet/src/mesh/mesh_api.c
Log:
- use small mesh hashes for info api
Modified: gnunet/src/mesh/gnunet-mesh.c
===================================================================
--- gnunet/src/mesh/gnunet-mesh.c 2014-04-01 00:16:15 UTC (rev 32850)
+++ gnunet/src/mesh/gnunet-mesh.c 2014-04-01 00:16:19 UTC (rev 32851)
@@ -26,6 +26,7 @@
#include "platform.h"
#include "gnunet_util_lib.h"
#include "gnunet_mesh_service.h"
+#include "mesh.h"
/**
@@ -510,7 +511,7 @@
unsigned int n_channels,
unsigned int n_connections,
uint32_t *channels,
- struct GNUNET_HashCode *connections,
+ struct GNUNET_MeshHash *connections,
unsigned int estate,
unsigned int cstate)
{
@@ -524,7 +525,7 @@
FPRINTF (stdout, " %u\n", channels[i]);
FPRINTF (stdout, "- %u connections\n", n_connections);
for (i = 0; i < n_connections; i++)
- FPRINTF (stdout, " %s\n", GNUNET_h2s_full (&connections[i]));
+ FPRINTF (stdout, " %s\n", GM_h2s (&connections[i]));
FPRINTF (stdout, "- enc state: %u\n", estate);
FPRINTF (stdout, "- con state: %u\n", cstate);
}
@@ -740,9 +741,9 @@
// {'a', "channel", "TUNNEL_ID:CHANNEL_ID",
// gettext_noop ("provide information about a particular channel"),
// GNUNET_YES, &GNUNET_GETOPT_set_string, &channel_id},
-// {'b', "connection", "TUNNEL_ID:CONNECTION_ID",
-// gettext_noop ("provide information about a particular connection"),
-// GNUNET_YES, &GNUNET_GETOPT_set_string, &conn_id},
+ {'C', "connection", "CONNECTION_ID",
+ gettext_noop ("provide information about a particular connection"),
+ GNUNET_YES, &GNUNET_GETOPT_set_string, &conn_id},
{'e', "echo", NULL,
gettext_noop ("activate echo mode"),
GNUNET_NO, &GNUNET_GETOPT_set_one, &echo},
Modified: gnunet/src/mesh/gnunet-service-mesh_local.c
===================================================================
--- gnunet/src/mesh/gnunet-service-mesh_local.c 2014-04-01 00:16:15 UTC (rev
32850)
+++ gnunet/src/mesh/gnunet-service-mesh_local.c 2014-04-01 00:16:19 UTC (rev
32851)
@@ -805,7 +805,7 @@
c_n = GMT_count_connections (t);
size = sizeof (struct GNUNET_MESH_LocalInfoTunnel);
- size += c_n * sizeof (struct GNUNET_HashCode);
+ size += c_n * sizeof (struct GNUNET_MeshHash);
size += ch_n * sizeof (MESH_ChannelNumber);
resp = GNUNET_malloc (size);
Modified: gnunet/src/mesh/mesh_api.c
===================================================================
--- gnunet/src/mesh/mesh_api.c 2014-04-01 00:16:15 UTC (rev 32850)
+++ gnunet/src/mesh/mesh_api.c 2014-04-01 00:16:19 UTC (rev 32851)
@@ -1108,7 +1108,7 @@
size_t msize;
unsigned int ch_n;
unsigned int c_n;
- struct GNUNET_HashCode *conns;
+ struct GNUNET_MeshHash *conns;
MESH_ChannelNumber *chns;
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Get Tunnel messasge received\n");
@@ -1131,7 +1131,7 @@
ch_n = ntohl (msg->channels);
c_n = ntohl (msg->connections);
esize += ch_n * sizeof (MESH_ChannelNumber);
- esize += c_n * sizeof (struct GNUNET_HashCode);
+ esize += c_n * sizeof (struct GNUNET_MeshHash);
if (msize != esize)
{
GNUNET_break_op (0);
@@ -1145,7 +1145,7 @@
}
/* Call Callback with tunnel info. */
- conns = (struct GNUNET_HashCode *) &msg[1];
+ conns = (struct GNUNET_MeshHash *) &msg[1];
chns = (MESH_ChannelNumber *) &conns[c_n];
h->info_cb.tunnel_cb (h->info_cls, &msg->destination,
ch_n, c_n, chns, conns,
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r32851 - gnunet/src/mesh,
gnunet <=