diff options
author | Bart Polot <bart@net.in.tum.de> | 2014-01-30 02:11:27 +0000 |
---|---|---|
committer | Bart Polot <bart@net.in.tum.de> | 2014-01-30 02:11:27 +0000 |
commit | 32486c12e298a4b76cb8bc99858c5d74bcabf15b (patch) | |
tree | 869f695aaffdc12fae7e9cdc4ad3c9d067f28712 /src | |
parent | d76e9cd32dacfc22d6884648748449aa29a8853d (diff) | |
download | gnunet-32486c12e298a4b76cb8bc99858c5d74bcabf15b.tar.gz gnunet-32486c12e298a4b76cb8bc99858c5d74bcabf15b.zip |
- adapt mesh CLI to API changes
Diffstat (limited to 'src')
-rw-r--r-- | src/mesh/gnunet-mesh.c | 7 | ||||
-rw-r--r-- | src/mesh/mesh_api.c | 3 |
2 files changed, 6 insertions, 4 deletions
diff --git a/src/mesh/gnunet-mesh.c b/src/mesh/gnunet-mesh.c index 208d2ce44..a502ab5fb 100644 --- a/src/mesh/gnunet-mesh.c +++ b/src/mesh/gnunet-mesh.c | |||
@@ -439,12 +439,13 @@ data_callback (void *cls, | |||
439 | * @param cls Closure. | 439 | * @param cls Closure. |
440 | * @param peer Peer, or NULL on "EOF". | 440 | * @param peer Peer, or NULL on "EOF". |
441 | * @param tunnel Do we have a tunnel towards this peer? | 441 | * @param tunnel Do we have a tunnel towards this peer? |
442 | * @param n_paths Number of known paths towards this peer. | ||
442 | * @param best_path How long is the best path? | 443 | * @param best_path How long is the best path? |
443 | * (0 = unknown, 1 = ourselves, 2 = neighbor) | 444 | * (0 = unknown, 1 = ourselves, 2 = neighbor) |
444 | */ | 445 | */ |
445 | static void | 446 | static void |
446 | peers_callback (void *cls, const struct GNUNET_PeerIdentity *peer, | 447 | peers_callback (void *cls, const struct GNUNET_PeerIdentity *peer, |
447 | int tunnel, unsigned int best_path) | 448 | int tunnel, unsigned int n_paths, unsigned int best_path) |
448 | { | 449 | { |
449 | if (NULL == peer) | 450 | if (NULL == peer) |
450 | { | 451 | { |
@@ -454,8 +455,8 @@ peers_callback (void *cls, const struct GNUNET_PeerIdentity *peer, | |||
454 | } | 455 | } |
455 | return; | 456 | return; |
456 | } | 457 | } |
457 | FPRINTF (stdout, "%s tunnel: %c, best path %u hops]\n", | 458 | FPRINTF (stdout, "%s tunnel: %c, paths: %u\n", |
458 | GNUNET_i2s_full (peer), tunnel ? 'Y' : 'N', best_path); | 459 | GNUNET_i2s_full (peer), tunnel ? 'Y' : 'N', n_paths); |
459 | } | 460 | } |
460 | 461 | ||
461 | 462 | ||
diff --git a/src/mesh/mesh_api.c b/src/mesh/mesh_api.c index 79eedb347..19c453a5a 100644 --- a/src/mesh/mesh_api.c +++ b/src/mesh/mesh_api.c | |||
@@ -1065,7 +1065,8 @@ process_get_peers (struct GNUNET_MESH_Handle *h, | |||
1065 | 1065 | ||
1066 | msg = (struct GNUNET_MESH_LocalInfoPeer *) message; | 1066 | msg = (struct GNUNET_MESH_LocalInfoPeer *) message; |
1067 | h->peers_cb (h->peers_cls, &msg->destination, | 1067 | h->peers_cb (h->peers_cls, &msg->destination, |
1068 | (int) ntohs (msg->tunnel), ntohs (msg->paths), 0); | 1068 | (int) ntohs (msg->tunnel), (unsigned int ) ntohs (msg->paths), |
1069 | 0); | ||
1069 | } | 1070 | } |
1070 | 1071 | ||
1071 | 1072 | ||