aboutsummaryrefslogtreecommitdiff
path: root/src/transport/test_transport_ats.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2011-08-15 21:54:06 +0000
committerChristian Grothoff <christian@grothoff.org>2011-08-15 21:54:06 +0000
commit5746309cb4be2073d550ad7a6885e918631dbc38 (patch)
tree89455bc4aadf977816b38df13f990372cd81d71a /src/transport/test_transport_ats.c
parent6fd3e715cae09fa6e657c96f1c6f9711ee51f42f (diff)
downloadgnunet-5746309cb4be2073d550ad7a6885e918631dbc38.tar.gz
gnunet-5746309cb4be2073d550ad7a6885e918631dbc38.zip
indentation
Diffstat (limited to 'src/transport/test_transport_ats.c')
-rw-r--r--src/transport/test_transport_ats.c29
1 files changed, 15 insertions, 14 deletions
diff --git a/src/transport/test_transport_ats.c b/src/transport/test_transport_ats.c
index d9e4b23d5..0d16cd1b8 100644
--- a/src/transport/test_transport_ats.c
+++ b/src/transport/test_transport_ats.c
@@ -55,8 +55,8 @@ struct TransportConfiguration
55 55
56 56
57static void 57static void
58create_ats_information (struct ATS_peer **p, int *c_p, 58create_ats_information (struct ATS_peer **p, int *c_p, struct ATS_mechanism **m,
59 struct ATS_mechanism **m, int *c_m) 59 int *c_m)
60{ 60{
61 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "ATS needs addresses\n"); 61 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "ATS needs addresses\n");
62 62
@@ -73,8 +73,8 @@ run_ats ()
73 int ret = 0; 73 int ret = 0;
74 74
75 ats_calculate_bandwidth_distribution (ats); 75 ats_calculate_bandwidth_distribution (ats);
76 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 76 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Running ATS: %s \n",
77 "Running ATS: %s \n", (ret == 0) ? "SUCCESSFUL" : "FAILED"); 77 (ret == 0) ? "SUCCESSFUL" : "FAILED");
78 return ret; 78 return ret;
79} 79}
80 80
@@ -84,12 +84,13 @@ init_ats ()
84{ 84{
85 int ret = 0; 85 int ret = 0;
86 86
87 ats = ats_init (1.0, 1.0, 1.0, 50000, 5, 10, ATS_MAX_EXEC_DURATION, 87 ats =
88 create_ats_information, ats_result_cb); 88 ats_init (1.0, 1.0, 1.0, 50000, 5, 10, ATS_MAX_EXEC_DURATION,
89 create_ats_information, ats_result_cb);
89 //GNUNET_assert (ats != NULL); 90 //GNUNET_assert (ats != NULL);
90 91
91 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 92 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Initializing ATS: %s \n",
92 "Initializing ATS: %s \n", (ret == 0) ? "SUCCESSFUL" : "FAILED"); 93 (ret == 0) ? "SUCCESSFUL" : "FAILED");
93 return ret; 94 return ret;
94} 95}
95 96
@@ -101,8 +102,8 @@ shutdown_ats ()
101 102
102 ats_delete_problem (ats); 103 ats_delete_problem (ats);
103 ats_shutdown (ats); 104 ats_shutdown (ats);
104 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 105 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Shutdown ATS: %s \n",
105 "Shutdown ATS: %s \n", (ret == 0) ? "SUCCESSFUL" : "FAILED"); 106 (ret == 0) ? "SUCCESSFUL" : "FAILED");
106 return ret; 107 return ret;
107} 108}
108 109
@@ -123,16 +124,16 @@ dummy ()
123 124
124 125
125static void 126static void
126iterate_peer_values (void *cls, 127iterate_peer_values (void *cls, const char *section, const char *option,
127 const char *section, const char *option, const char *value) 128 const char *value)
128{ 129{
129 if (strcmp (option, "f") == 0) 130 if (strcmp (option, "f") == 0)
130 GNUNET_log (GNUNET_ERROR_TYPE_INFO, "\t %s %s\n", option, value); 131 GNUNET_log (GNUNET_ERROR_TYPE_INFO, "\t %s %s\n", option, value);
131} 132}
132 133
133static void 134static void
134iterate_mech_values (void *cls, 135iterate_mech_values (void *cls, const char *section, const char *option,
135 const char *section, const char *option, const char *value) 136 const char *value)
136{ 137{
137 if (strcmp (option, "f") == 0) 138 if (strcmp (option, "f") == 0)
138 GNUNET_log (GNUNET_ERROR_TYPE_INFO, "\t %s %s\n", option, value); 139 GNUNET_log (GNUNET_ERROR_TYPE_INFO, "\t %s %s\n", option, value);