diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2010-11-30 10:16:43 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2010-11-30 10:16:43 +0000 |
commit | 1031c6d5dcba9b7d8396296a61e608a5371215be (patch) | |
tree | 99c15a28cc0565e9024c29de1f1c80040776b718 /src/transport/transport_api.c | |
parent | c188e8a0cae8ede61e4f8924e8b52558d0ac1861 (diff) | |
download | gnunet-1031c6d5dcba9b7d8396296a61e608a5371215be.tar.gz gnunet-1031c6d5dcba9b7d8396296a61e608a5371215be.zip |
Transmitting ATS information to transport api
Diffstat (limited to 'src/transport/transport_api.c')
-rw-r--r-- | src/transport/transport_api.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/transport/transport_api.c b/src/transport/transport_api.c index 13fae962b..05e12e1f3 100644 --- a/src/transport/transport_api.c +++ b/src/transport/transport_api.c | |||
@@ -1661,8 +1661,9 @@ demultiplexer (void *cls, const struct GNUNET_MessageHeader *msg) | |||
1661 | } | 1661 | } |
1662 | im = (const struct InboundMessage *) msg; | 1662 | im = (const struct InboundMessage *) msg; |
1663 | GNUNET_break (0 == ntohl (im->reserved)); | 1663 | GNUNET_break (0 == ntohl (im->reserved)); |
1664 | imm = (const struct GNUNET_MessageHeader *) &im[1]; | 1664 | GNUNET_assert(sizeof (struct InboundMessage) + ntohl(im->ats_count) * sizeof(struct GNUNET_TRANSPORT_ATS_Information) + sizeof (struct GNUNET_MessageHeader) <= size); |
1665 | if (ntohs (imm->size) + sizeof (struct InboundMessage) != size) | 1665 | imm = (const struct GNUNET_MessageHeader *) &((&im->ats)[ntohl(im->ats_count)+1]); |
1666 | if (ntohs (imm->size) + sizeof (struct InboundMessage) + ntohl(im->ats_count) * sizeof(struct GNUNET_TRANSPORT_ATS_Information) != size) | ||
1666 | { | 1667 | { |
1667 | GNUNET_break (0); | 1668 | GNUNET_break (0); |
1668 | break; | 1669 | break; |