aboutsummaryrefslogtreecommitdiff
path: root/src/mesh
diff options
context:
space:
mode:
authorBart Polot <bart@net.in.tum.de>2014-01-23 12:44:31 +0000
committerBart Polot <bart@net.in.tum.de>2014-01-23 12:44:31 +0000
commit32c2c098076bdd10ab1ed7f51ddcbb3c7b4d1378 (patch)
treeac7fa8e1fdae0d7bc78ee47e78c3a56719a03a02 /src/mesh
parent74e92716b7dd1e117cb8ef932348335c98daa0e1 (diff)
downloadgnunet-32c2c098076bdd10ab1ed7f51ddcbb3c7b4d1378.tar.gz
gnunet-32c2c098076bdd10ab1ed7f51ddcbb3c7b4d1378.zip
- changed option to get all tunnels from -i to -T
Diffstat (limited to 'src/mesh')
-rw-r--r--src/mesh/gnunet-mesh.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/mesh/gnunet-mesh.c b/src/mesh/gnunet-mesh.c
index b1071b344..1a963c444 100644
--- a/src/mesh/gnunet-mesh.c
+++ b/src/mesh/gnunet-mesh.c
@@ -34,9 +34,9 @@
34static int monitor_connections; 34static int monitor_connections;
35 35
36/** 36/**
37 * Option -i. 37 * Option -T.
38 */ 38 */
39static int get_info; 39static int request_tunnels;
40 40
41/** 41/**
42 * Option --tunnel 42 * Option --tunnel
@@ -492,9 +492,9 @@ tunnel_callback (void *cls,
492static void 492static void
493get_tunnels (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) 493get_tunnels (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
494{ 494{
495 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Shutdown\n");
496 if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) 495 if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN))
497 { 496 {
497 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Shutdown\n");
498 return; 498 return;
499 } 499 }
500 GNUNET_MESH_get_tunnels (mh, &tunnels_callback, NULL); 500 GNUNET_MESH_get_tunnels (mh, &tunnels_callback, NULL);
@@ -576,7 +576,7 @@ run (void *cls, char *const *args, const char *cfgfile,
576 576
577 target_id = args[0]; 577 target_id = args[0];
578 target_port = args[0] && args[1] ? atoi(args[1]) : 0; 578 target_port = args[0] && args[1] ? atoi(args[1]) : 0;
579 if ( (0 != get_info 579 if ( (0 != request_tunnels
580 || 0 != monitor_connections 580 || 0 != monitor_connections
581 || NULL != tunnel_id 581 || NULL != tunnel_id
582 || NULL != conn_id 582 || NULL != conn_id
@@ -618,7 +618,7 @@ run (void *cls, char *const *args, const char *cfgfile,
618 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Show connection\n"); 618 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Show connection\n");
619 GNUNET_SCHEDULER_add_now (&show_connection, NULL); 619 GNUNET_SCHEDULER_add_now (&show_connection, NULL);
620 } 620 }
621 else if (GNUNET_YES == get_info) 621 else if (GNUNET_YES == request_tunnels)
622 { 622 {
623 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Show all tunnels\n"); 623 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Show all tunnels\n");
624 GNUNET_SCHEDULER_add_now (&get_tunnels, NULL); 624 GNUNET_SCHEDULER_add_now (&get_tunnels, NULL);
@@ -668,9 +668,6 @@ main (int argc, char *const *argv)
668 {'e', "echo", NULL, 668 {'e', "echo", NULL,
669 gettext_noop ("activate echo mode"), 669 gettext_noop ("activate echo mode"),
670 GNUNET_NO, &GNUNET_GETOPT_set_one, &echo}, 670 GNUNET_NO, &GNUNET_GETOPT_set_one, &echo},
671 {'i', "info", NULL,
672 gettext_noop ("provide information about all tunnels"),
673 GNUNET_NO, &GNUNET_GETOPT_set_one, &get_info},
674// {'m', "monitor", NULL, 671// {'m', "monitor", NULL,
675// gettext_noop ("provide information about all tunnels (continuously) NOT IMPLEMENTED"), /* FIXME */ 672// gettext_noop ("provide information about all tunnels (continuously) NOT IMPLEMENTED"), /* FIXME */
676// GNUNET_NO, &GNUNET_GETOPT_set_one, &monitor_connections}, 673// GNUNET_NO, &GNUNET_GETOPT_set_one, &monitor_connections},
@@ -680,6 +677,9 @@ main (int argc, char *const *argv)
680 {'t', "tunnel", "TUNNEL_ID", 677 {'t', "tunnel", "TUNNEL_ID",
681 gettext_noop ("provide information about a particular tunnel"), 678 gettext_noop ("provide information about a particular tunnel"),
682 GNUNET_YES, &GNUNET_GETOPT_set_string, &tunnel_id}, 679 GNUNET_YES, &GNUNET_GETOPT_set_string, &tunnel_id},
680 {'T', "tunnels", NULL,
681 gettext_noop ("provide information about all tunnels"),
682 GNUNET_NO, &GNUNET_GETOPT_set_one, &request_tunnels},
683 683
684 GNUNET_GETOPT_OPTION_END 684 GNUNET_GETOPT_OPTION_END
685 }; 685 };