aboutsummaryrefslogtreecommitdiff
path: root/src/transport/test_transport_api_blacklisting.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/transport/test_transport_api_blacklisting.c')
-rw-r--r--src/transport/test_transport_api_blacklisting.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/transport/test_transport_api_blacklisting.c b/src/transport/test_transport_api_blacklisting.c
index f8f6040a9..909ea57d4 100644
--- a/src/transport/test_transport_api_blacklisting.c
+++ b/src/transport/test_transport_api_blacklisting.c
@@ -61,9 +61,9 @@ struct GNUNET_TRANSPORT_TESTING_handle *tth;
61 */ 61 */
62#define TIMEOUT_TRANSMIT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 60) 62#define TIMEOUT_TRANSMIT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 60)
63 63
64#define MSIZE 2600 64#define TEST_MESSAGE_SIZE 2600
65 65
66#define MTYPE 12345 66#define TEST_MESSAGE_TYPE 12345
67 67
68 68
69static int ok; 69static int ok;
@@ -212,8 +212,8 @@ notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer,
212 GNUNET_i2s (&t->id)); 212 GNUNET_i2s (&t->id));
213 GNUNET_free (ps); 213 GNUNET_free (ps);
214 214
215 if ((MTYPE == ntohs (message->type)) && 215 if ((TEST_MESSAGE_TYPE == ntohs (message->type)) &&
216 (MSIZE == ntohs (message->size))) 216 (TEST_MESSAGE_SIZE == ntohs (message->size)))
217 { 217 {
218 ok = 0; 218 ok = 0;
219 shutdown_task = GNUNET_SCHEDULER_add_now(&end, NULL); 219 shutdown_task = GNUNET_SCHEDULER_add_now(&end, NULL);
@@ -249,13 +249,13 @@ notify_ready (void *cls, size_t size, void *buf)
249 return 0; 249 return 0;
250 } 250 }
251 251
252 GNUNET_assert (size >= MSIZE); 252 GNUNET_assert (size >= TEST_MESSAGE_SIZE);
253 253
254 if (buf != NULL) 254 if (buf != NULL)
255 { 255 {
256 hdr = buf; 256 hdr = buf;
257 hdr->size = htons (MSIZE); 257 hdr->size = htons (TEST_MESSAGE_SIZE);
258 hdr->type = htons (MTYPE); 258 hdr->type = htons (TEST_MESSAGE_TYPE);
259 } 259 }
260 260
261 char *ps = GNUNET_strdup (GNUNET_i2s (&p2->id)); 261 char *ps = GNUNET_strdup (GNUNET_i2s (&p2->id));
@@ -265,7 +265,7 @@ notify_ready (void *cls, size_t size, void *buf)
265 GNUNET_i2s (&p->id)); 265 GNUNET_i2s (&p->id));
266 GNUNET_free (ps); 266 GNUNET_free (ps);
267 267
268 return MSIZE; 268 return TEST_MESSAGE_SIZE;
269} 269}
270 270
271static void 271static void
@@ -282,7 +282,7 @@ sendtask (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
282 p2->no, GNUNET_i2s (&p2->id), p1->no, receiver_s); 282 p2->no, GNUNET_i2s (&p2->id), p1->no, receiver_s);
283 GNUNET_free (receiver_s); 283 GNUNET_free (receiver_s);
284 284
285 th = GNUNET_TRANSPORT_notify_transmit_ready (p2->th, &p1->id, MSIZE, 0, 285 th = GNUNET_TRANSPORT_notify_transmit_ready (p2->th, &p1->id, TEST_MESSAGE_SIZE, 0,
286 TIMEOUT_TRANSMIT, &notify_ready, 286 TIMEOUT_TRANSMIT, &notify_ready,
287 p1); 287 p1);
288} 288}