diff options
author | Christian Grothoff <christian@grothoff.org> | 2014-06-22 19:57:22 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2014-06-22 19:57:22 +0000 |
commit | 658f44879747d23c92e30ca004b04e2dddac73d8 (patch) | |
tree | c3e225cc738cc9588393c6de2b908b4f6e4b9f04 /src/transport/gnunet-transport.c | |
parent | 58121840c21ad0a64d6e2b11dd01f50064ca1773 (diff) | |
download | gnunet-658f44879747d23c92e30ca004b04e2dddac73d8.tar.gz gnunet-658f44879747d23c92e30ca004b04e2dddac73d8.zip |
-simplify logic a bit, doxygen, indentation
Diffstat (limited to 'src/transport/gnunet-transport.c')
-rw-r--r-- | src/transport/gnunet-transport.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/src/transport/gnunet-transport.c b/src/transport/gnunet-transport.c index 80a3e2d15..0fef7784e 100644 --- a/src/transport/gnunet-transport.c +++ b/src/transport/gnunet-transport.c | |||
@@ -1684,19 +1684,22 @@ testservice_task (void *cls, int result) | |||
1684 | monitored_peers = GNUNET_CONTAINER_multipeermap_create (10, GNUNET_NO); | 1684 | monitored_peers = GNUNET_CONTAINER_multipeermap_create (10, GNUNET_NO); |
1685 | address_resolution_in_progress = GNUNET_YES; | 1685 | address_resolution_in_progress = GNUNET_YES; |
1686 | pic = GNUNET_TRANSPORT_monitor_peers (cfg, (NULL == cpid) ? NULL : &pid, | 1686 | pic = GNUNET_TRANSPORT_monitor_peers (cfg, (NULL == cpid) ? NULL : &pid, |
1687 | GNUNET_NO, TIMEOUT, &process_peer_monitoring_cb, (void *) cfg); | 1687 | GNUNET_NO, TIMEOUT, |
1688 | &process_peer_monitoring_cb, (void *) cfg); | ||
1688 | } | 1689 | } |
1689 | else if (iterate_validation) /* -d: Print information about validations */ | 1690 | else if (iterate_validation) /* -d: Print information about validations */ |
1690 | { | 1691 | { |
1691 | vic = GNUNET_TRANSPORT_monitor_validation_entries (cfg, | 1692 | vic = GNUNET_TRANSPORT_monitor_validation_entries (cfg, |
1692 | (NULL == cpid) ? NULL : &pid, | 1693 | (NULL == cpid) ? NULL : &pid, |
1693 | GNUNET_YES, TIMEOUT, &process_validation_cb, (void *) cfg); | 1694 | GNUNET_YES, TIMEOUT, |
1695 | &process_validation_cb, (void *) cfg); | ||
1694 | } | 1696 | } |
1695 | else if (monitor_validation) /* -f: Print information about validations continuously */ | 1697 | else if (monitor_validation) /* -f: Print information about validations continuously */ |
1696 | { | 1698 | { |
1697 | vic = GNUNET_TRANSPORT_monitor_validation_entries (cfg, | 1699 | vic = GNUNET_TRANSPORT_monitor_validation_entries (cfg, |
1698 | (NULL == cpid) ? NULL : &pid, | 1700 | (NULL == cpid) ? NULL : &pid, |
1699 | GNUNET_NO, TIMEOUT, &process_validation_cb, (void *) cfg); | 1701 | GNUNET_NO, TIMEOUT, |
1702 | &process_validation_cb, (void *) cfg); | ||
1700 | } | 1703 | } |
1701 | else if (monitor_connects) /* -e : Monitor (dis)connect events continuously */ | 1704 | else if (monitor_connects) /* -e : Monitor (dis)connect events continuously */ |
1702 | { | 1705 | { |
@@ -1706,7 +1709,9 @@ testservice_task (void *cls, int result) | |||
1706 | &monitor_notify_disconnect); | 1709 | &monitor_notify_disconnect); |
1707 | if (NULL == handle) | 1710 | if (NULL == handle) |
1708 | { | 1711 | { |
1709 | FPRINTF (stderr, "%s", _("Failed to connect to transport service\n")); | 1712 | FPRINTF (stderr, |
1713 | "%s", | ||
1714 | _("Failed to connect to transport service\n")); | ||
1710 | ret = 1; | 1715 | ret = 1; |
1711 | return; | 1716 | return; |
1712 | } | 1717 | } |
@@ -1721,7 +1726,6 @@ testservice_task (void *cls, int result) | |||
1721 | end = GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL, | 1726 | end = GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL, |
1722 | &shutdown_task, | 1727 | &shutdown_task, |
1723 | NULL); | 1728 | NULL); |
1724 | |||
1725 | } | 1729 | } |
1726 | 1730 | ||
1727 | 1731 | ||