diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-08-15 21:54:06 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-08-15 21:54:06 +0000 |
commit | 5746309cb4be2073d550ad7a6885e918631dbc38 (patch) | |
tree | 89455bc4aadf977816b38df13f990372cd81d71a /src/util/test_client.c | |
parent | 6fd3e715cae09fa6e657c96f1c6f9711ee51f42f (diff) | |
download | gnunet-5746309cb4be2073d550ad7a6885e918631dbc38.tar.gz gnunet-5746309cb4be2073d550ad7a6885e918631dbc38.zip |
indentation
Diffstat (limited to 'src/util/test_client.c')
-rw-r--r-- | src/util/test_client.c | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/src/util/test_client.c b/src/util/test_client.c index 9c2abb016..f9d961ab6 100644 --- a/src/util/test_client.c +++ b/src/util/test_client.c | |||
@@ -70,8 +70,7 @@ copy_msg (void *cls, size_t size, void *buf) | |||
70 | * Callback that just bounces the message back to the sender. | 70 | * Callback that just bounces the message back to the sender. |
71 | */ | 71 | */ |
72 | static void | 72 | static void |
73 | echo_cb (void *cls, | 73 | echo_cb (void *cls, struct GNUNET_SERVER_Client *client, |
74 | struct GNUNET_SERVER_Client *client, | ||
75 | const struct GNUNET_MessageHeader *message) | 74 | const struct GNUNET_MessageHeader *message) |
76 | { | 75 | { |
77 | struct CopyContext *cc; | 76 | struct CopyContext *cc; |
@@ -148,13 +147,10 @@ task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
148 | #endif | 147 | #endif |
149 | sa.sin_family = AF_INET; | 148 | sa.sin_family = AF_INET; |
150 | sa.sin_port = htons (PORT); | 149 | sa.sin_port = htons (PORT); |
151 | server = GNUNET_SERVER_create (NULL, | 150 | server = |
152 | NULL, | 151 | GNUNET_SERVER_create (NULL, NULL, sap, slens, |
153 | sap, | 152 | GNUNET_TIME_relative_multiply |
154 | slens, | 153 | (GNUNET_TIME_UNIT_MILLISECONDS, 10000), GNUNET_NO); |
155 | GNUNET_TIME_relative_multiply | ||
156 | (GNUNET_TIME_UNIT_MILLISECONDS, 10000), | ||
157 | GNUNET_NO); | ||
158 | GNUNET_assert (server != NULL); | 154 | GNUNET_assert (server != NULL); |
159 | handlers[0].callback_cls = cls; | 155 | handlers[0].callback_cls = cls; |
160 | handlers[1].callback_cls = cls; | 156 | handlers[1].callback_cls = cls; |
@@ -166,8 +162,8 @@ task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
166 | sizeof (struct | 162 | sizeof (struct |
167 | GNUNET_MessageHeader), | 163 | GNUNET_MessageHeader), |
168 | GNUNET_TIME_UNIT_SECONDS, | 164 | GNUNET_TIME_UNIT_SECONDS, |
169 | GNUNET_NO, | 165 | GNUNET_NO, &make_msg, |
170 | &make_msg, NULL)); | 166 | NULL)); |
171 | GNUNET_CLIENT_receive (client, &recv_bounce, cls, | 167 | GNUNET_CLIENT_receive (client, &recv_bounce, cls, |
172 | GNUNET_TIME_relative_multiply | 168 | GNUNET_TIME_relative_multiply |
173 | (GNUNET_TIME_UNIT_MILLISECONDS, 10000)); | 169 | (GNUNET_TIME_UNIT_MILLISECONDS, 10000)); |
@@ -186,8 +182,8 @@ check () | |||
186 | cfg = GNUNET_CONFIGURATION_create (); | 182 | cfg = GNUNET_CONFIGURATION_create (); |
187 | GNUNET_CONFIGURATION_set_value_number (cfg, MYNAME, "PORT", PORT); | 183 | GNUNET_CONFIGURATION_set_value_number (cfg, MYNAME, "PORT", PORT); |
188 | GNUNET_CONFIGURATION_set_value_string (cfg, MYNAME, "HOSTNAME", "localhost"); | 184 | GNUNET_CONFIGURATION_set_value_string (cfg, MYNAME, "HOSTNAME", "localhost"); |
189 | GNUNET_CONFIGURATION_set_value_string (cfg, | 185 | GNUNET_CONFIGURATION_set_value_string (cfg, "resolver", "HOSTNAME", |
190 | "resolver", "HOSTNAME", "localhost"); | 186 | "localhost"); |
191 | ok = 1; | 187 | ok = 1; |
192 | GNUNET_SCHEDULER_run (&task, &ok); | 188 | GNUNET_SCHEDULER_run (&task, &ok); |
193 | GNUNET_CONFIGURATION_destroy (cfg); | 189 | GNUNET_CONFIGURATION_destroy (cfg); |