aboutsummaryrefslogtreecommitdiff
path: root/src/transport/test_transport_address_switch.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2016-07-25 00:30:00 +0000
committerChristian Grothoff <christian@grothoff.org>2016-07-25 00:30:00 +0000
commitd0701eb6315fc3f5aca74415bbf0ff7418409f87 (patch)
treefcacb97bbcca542ce9493001c825fd265cb8a801 /src/transport/test_transport_address_switch.c
parent9bfb8bff3fd253407530c76c7590b33bacf033f1 (diff)
downloadgnunet-d0701eb6315fc3f5aca74415bbf0ff7418409f87.tar.gz
gnunet-d0701eb6315fc3f5aca74415bbf0ff7418409f87.zip
switching transport tests to new MQ-based transport API
Diffstat (limited to 'src/transport/test_transport_address_switch.c')
-rw-r--r--src/transport/test_transport_address_switch.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/transport/test_transport_address_switch.c b/src/transport/test_transport_address_switch.c
index 3998854da..9217d8f90 100644
--- a/src/transport/test_transport_address_switch.c
+++ b/src/transport/test_transport_address_switch.c
@@ -286,12 +286,9 @@ static void
286notify_receive (void *cls, 286notify_receive (void *cls,
287 struct GNUNET_TRANSPORT_TESTING_PeerContext *receiver, 287 struct GNUNET_TRANSPORT_TESTING_PeerContext *receiver,
288 const struct GNUNET_PeerIdentity *sender, 288 const struct GNUNET_PeerIdentity *sender,
289 const struct GNUNET_MessageHeader *message) 289 const struct GNUNET_TRANSPORT_TESTING_TestMessage *hdr)
290{ 290{
291 const struct GNUNET_TRANSPORT_TESTING_TestMessage *hdr; 291 if (GNUNET_TRANSPORT_TESTING_SIMPLE_MTYPE != ntohs (hdr->header.type))
292
293 hdr = (const struct GNUNET_TRANSPORT_TESTING_TestMessage *) message;
294 if (GNUNET_TRANSPORT_TESTING_SIMPLE_MTYPE != ntohs (message->type))
295 return; 292 return;
296 293
297 { 294 {
@@ -302,7 +299,7 @@ notify_receive (void *cls,
302 receiver->no, 299 receiver->no,
303 ps, 300 ps,
304 ntohl (hdr->num), 301 ntohl (hdr->num),
305 ntohs (message->size), 302 ntohs (hdr->header.size),
306 GNUNET_i2s (sender)); 303 GNUNET_i2s (sender));
307 GNUNET_free (ps); 304 GNUNET_free (ps);
308 } 305 }