diff options
Diffstat (limited to 'src/util/test_server_with_client_unix.c')
-rw-r--r-- | src/util/test_server_with_client_unix.c | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/src/util/test_server_with_client_unix.c b/src/util/test_server_with_client_unix.c index 11f731243..4f80f188c 100644 --- a/src/util/test_server_with_client_unix.c +++ b/src/util/test_server_with_client_unix.c | |||
@@ -56,24 +56,24 @@ send_done (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
56 | 56 | ||
57 | static void | 57 | static void |
58 | recv_cb (void *cls, struct GNUNET_SERVER_Client *argclient, | 58 | recv_cb (void *cls, struct GNUNET_SERVER_Client *argclient, |
59 | const struct GNUNET_MessageHeader *message) | 59 | const struct GNUNET_MessageHeader *message) |
60 | { | 60 | { |
61 | switch (ok) | 61 | switch (ok) |
62 | { | 62 | { |
63 | case 2: | 63 | case 2: |
64 | ok++; | 64 | ok++; |
65 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply | 65 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply |
66 | (GNUNET_TIME_UNIT_MILLISECONDS, 50), | 66 | (GNUNET_TIME_UNIT_MILLISECONDS, 50), |
67 | &send_done, argclient); | 67 | &send_done, argclient); |
68 | break; | 68 | break; |
69 | case 4: | 69 | case 4: |
70 | ok++; | 70 | ok++; |
71 | GNUNET_CLIENT_disconnect (client, GNUNET_YES); | 71 | GNUNET_CLIENT_disconnect (client, GNUNET_YES); |
72 | GNUNET_SERVER_receive_done (argclient, GNUNET_OK); | 72 | GNUNET_SERVER_receive_done (argclient, GNUNET_OK); |
73 | break; | 73 | break; |
74 | default: | 74 | default: |
75 | GNUNET_assert (0); | 75 | GNUNET_assert (0); |
76 | } | 76 | } |
77 | 77 | ||
78 | } | 78 | } |
79 | 79 | ||
@@ -156,9 +156,9 @@ task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
156 | sap[1] = NULL; | 156 | sap[1] = NULL; |
157 | slens[1] = 0; | 157 | slens[1] = 0; |
158 | server = | 158 | server = |
159 | GNUNET_SERVER_create (NULL, NULL, sap, slens, | 159 | GNUNET_SERVER_create (NULL, NULL, sap, slens, |
160 | GNUNET_TIME_relative_multiply | 160 | GNUNET_TIME_relative_multiply |
161 | (GNUNET_TIME_UNIT_MILLISECONDS, 250), GNUNET_NO); | 161 | (GNUNET_TIME_UNIT_MILLISECONDS, 250), GNUNET_NO); |
162 | GNUNET_assert (server != NULL); | 162 | GNUNET_assert (server != NULL); |
163 | handlers[0].callback_cls = cls; | 163 | handlers[0].callback_cls = cls; |
164 | GNUNET_SERVER_add_handlers (server, handlers); | 164 | GNUNET_SERVER_add_handlers (server, handlers); |
@@ -167,14 +167,14 @@ task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
167 | 167 | ||
168 | GNUNET_CONFIGURATION_set_value_string (cfg, "test", "UNIXPATH", unixpath); | 168 | GNUNET_CONFIGURATION_set_value_string (cfg, "test", "UNIXPATH", unixpath); |
169 | GNUNET_CONFIGURATION_set_value_string (cfg, "resolver", "HOSTNAME", | 169 | GNUNET_CONFIGURATION_set_value_string (cfg, "resolver", "HOSTNAME", |
170 | "localhost"); | 170 | "localhost"); |
171 | 171 | ||
172 | client = GNUNET_CLIENT_connect ("test", cfg); | 172 | client = GNUNET_CLIENT_connect ("test", cfg); |
173 | GNUNET_assert (client != NULL); | 173 | GNUNET_assert (client != NULL); |
174 | GNUNET_CLIENT_notify_transmit_ready (client, 256, | 174 | GNUNET_CLIENT_notify_transmit_ready (client, 256, |
175 | GNUNET_TIME_relative_multiply | 175 | GNUNET_TIME_relative_multiply |
176 | (GNUNET_TIME_UNIT_MILLISECONDS, 250), | 176 | (GNUNET_TIME_UNIT_MILLISECONDS, 250), |
177 | GNUNET_NO, ¬ify_ready, NULL); | 177 | GNUNET_NO, ¬ify_ready, NULL); |
178 | } | 178 | } |
179 | 179 | ||
180 | 180 | ||
@@ -199,11 +199,11 @@ main (int argc, char *argv[]) | |||
199 | 199 | ||
200 | GNUNET_log_setup ("test_server_with_client_unix", | 200 | GNUNET_log_setup ("test_server_with_client_unix", |
201 | #if VERBOSE | 201 | #if VERBOSE |
202 | "DEBUG", | 202 | "DEBUG", |
203 | #else | 203 | #else |
204 | "WARNING", | 204 | "WARNING", |
205 | #endif | 205 | #endif |
206 | NULL); | 206 | NULL); |
207 | ret += check (); | 207 | ret += check (); |
208 | 208 | ||
209 | return ret; | 209 | return ret; |