aboutsummaryrefslogtreecommitdiff
path: root/src/transport/test_quota_compliance.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_quota_compliance.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_quota_compliance.c')
-rw-r--r--src/transport/test_quota_compliance.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/transport/test_quota_compliance.c b/src/transport/test_quota_compliance.c
index 5bd3f0237..73b773b88 100644
--- a/src/transport/test_quota_compliance.c
+++ b/src/transport/test_quota_compliance.c
@@ -127,14 +127,12 @@ static void
127notify_receive (void *cls, 127notify_receive (void *cls,
128 struct GNUNET_TRANSPORT_TESTING_PeerContext *receiver, 128 struct GNUNET_TRANSPORT_TESTING_PeerContext *receiver,
129 const struct GNUNET_PeerIdentity *sender, 129 const struct GNUNET_PeerIdentity *sender,
130 const struct GNUNET_MessageHeader *message) 130 const struct GNUNET_TRANSPORT_TESTING_TestMessage *hdr)
131{ 131{
132 const struct GNUNET_TRANSPORT_TESTING_TestMessage *hdr;
133 132
134 hdr = (const struct GNUNET_TRANSPORT_TESTING_TestMessage *) message; 133 if (GNUNET_TRANSPORT_TESTING_SIMPLE_MTYPE != ntohs (hdr->header.type))
135 if (GNUNET_TRANSPORT_TESTING_SIMPLE_MTYPE != ntohs (message->type))
136 return; 134 return;
137 total_bytes_recv += ntohs (message->size); 135 total_bytes_recv += ntohs (hdr->header.size);
138 136
139 { 137 {
140 char *ps = GNUNET_strdup (GNUNET_i2s (&receiver->id)); 138 char *ps = GNUNET_strdup (GNUNET_i2s (&receiver->id));
@@ -144,7 +142,7 @@ notify_receive (void *cls,
144 receiver->no, 142 receiver->no,
145 ps, 143 ps,
146 ntohl (hdr->num), 144 ntohl (hdr->num),
147 ntohs (message->size), 145 ntohs (hdr->header.size),
148 GNUNET_i2s (sender)); 146 GNUNET_i2s (sender));
149 GNUNET_free (ps); 147 GNUNET_free (ps);
150 } 148 }