diff options
Diffstat (limited to 'src/ats/ats_api_scheduling.c')
-rw-r--r-- | src/ats/ats_api_scheduling.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/ats/ats_api_scheduling.c b/src/ats/ats_api_scheduling.c index d23de8940..b9574ff5c 100644 --- a/src/ats/ats_api_scheduling.c +++ b/src/ats/ats_api_scheduling.c | |||
@@ -643,6 +643,7 @@ process_ats_message (void *cls, const struct GNUNET_MessageHeader *msg) | |||
643 | address.address = plugin_address; | 643 | address.address = plugin_address; |
644 | address.address_length = plugin_address_length; | 644 | address.address_length = plugin_address_length; |
645 | address.transport_name = plugin_name; | 645 | address.transport_name = plugin_name; |
646 | address.local_info = ntohl(m->address_local_info); | ||
646 | 647 | ||
647 | if ((s == NULL) && (0 == address.address_length)) | 648 | if ((s == NULL) && (0 == address.address_length)) |
648 | { | 649 | { |
@@ -1200,11 +1201,9 @@ GNUNET_ATS_address_add (struct GNUNET_ATS_SchedulingHandle *sh, | |||
1200 | return GNUNET_SYSERR; | 1201 | return GNUNET_SYSERR; |
1201 | } | 1202 | } |
1202 | 1203 | ||
1203 | namelen = | 1204 | namelen = (address->transport_name == NULL) ? 0 : strlen (address->transport_name) + 1; |
1204 | (address->transport_name == | 1205 | |
1205 | NULL) ? 0 : strlen (address->transport_name) + 1; | 1206 | msize = sizeof (struct AddressUpdateMessage) + address->address_length + |
1206 | msize = | ||
1207 | sizeof (struct AddressUpdateMessage) + address->address_length + | ||
1208 | ats_count * sizeof (struct GNUNET_ATS_Information) + namelen; | 1207 | ats_count * sizeof (struct GNUNET_ATS_Information) + namelen; |
1209 | if ((msize >= GNUNET_SERVER_MAX_MESSAGE_SIZE) || | 1208 | if ((msize >= GNUNET_SERVER_MAX_MESSAGE_SIZE) || |
1210 | (address->address_length >= GNUNET_SERVER_MAX_MESSAGE_SIZE) || | 1209 | (address->address_length >= GNUNET_SERVER_MAX_MESSAGE_SIZE) || |
@@ -1236,6 +1235,7 @@ GNUNET_ATS_address_add (struct GNUNET_ATS_SchedulingHandle *sh, | |||
1236 | m->ats_count = htonl (ats_count); | 1235 | m->ats_count = htonl (ats_count); |
1237 | m->peer = address->peer; | 1236 | m->peer = address->peer; |
1238 | m->address_length = htons (address->address_length); | 1237 | m->address_length = htons (address->address_length); |
1238 | m->address_local_info = htonl ((uint32_t) address->local_info); | ||
1239 | m->plugin_name_length = htons (namelen); | 1239 | m->plugin_name_length = htons (namelen); |
1240 | m->session_id = htonl (s); | 1240 | m->session_id = htonl (s); |
1241 | 1241 | ||
@@ -1330,6 +1330,7 @@ GNUNET_ATS_address_update (struct GNUNET_ATS_SchedulingHandle *sh, | |||
1330 | m->ats_count = htonl (ats_count); | 1330 | m->ats_count = htonl (ats_count); |
1331 | m->peer = address->peer; | 1331 | m->peer = address->peer; |
1332 | m->address_length = htons (address->address_length); | 1332 | m->address_length = htons (address->address_length); |
1333 | m->address_local_info = htonl ((uint32_t) address->local_info); | ||
1333 | m->plugin_name_length = htons (namelen); | 1334 | m->plugin_name_length = htons (namelen); |
1334 | 1335 | ||
1335 | m->session_id = htonl (s); | 1336 | m->session_id = htonl (s); |
@@ -1413,6 +1414,7 @@ GNUNET_ATS_address_in_use (struct GNUNET_ATS_SchedulingHandle *sh, | |||
1413 | m->peer = address->peer; | 1414 | m->peer = address->peer; |
1414 | m->in_use = htons (in_use); | 1415 | m->in_use = htons (in_use); |
1415 | m->address_length = htons (address->address_length); | 1416 | m->address_length = htons (address->address_length); |
1417 | m->address_local_info = htonl ((uint32_t) address->local_info); | ||
1416 | m->plugin_name_length = htons (namelen); | 1418 | m->plugin_name_length = htons (namelen); |
1417 | 1419 | ||
1418 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 1420 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
@@ -1488,6 +1490,7 @@ GNUNET_ATS_address_destroyed (struct GNUNET_ATS_SchedulingHandle *sh, | |||
1488 | m->reserved = htonl (0); | 1490 | m->reserved = htonl (0); |
1489 | m->peer = address->peer; | 1491 | m->peer = address->peer; |
1490 | m->address_length = htons (address->address_length); | 1492 | m->address_length = htons (address->address_length); |
1493 | m->address_local_info = htonl ((uint32_t) address->local_info); | ||
1491 | m->plugin_name_length = htons (namelen); | 1494 | m->plugin_name_length = htons (namelen); |
1492 | 1495 | ||
1493 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 1496 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |