aboutsummaryrefslogtreecommitdiff
path: root/src/transport/transport_api.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/transport/transport_api.c')
-rw-r--r--src/transport/transport_api.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/transport/transport_api.c b/src/transport/transport_api.c
index 8b66fb986..48285302a 100644
--- a/src/transport/transport_api.c
+++ b/src/transport/transport_api.c
@@ -475,13 +475,11 @@ demultiplexer (void *cls, const struct GNUNET_MessageHeader *msg)
475 const struct GNUNET_MessageHeader *imm; 475 const struct GNUNET_MessageHeader *imm;
476 const struct SendOkMessage *okm; 476 const struct SendOkMessage *okm;
477 const struct QuotaSetMessage *qm; 477 const struct QuotaSetMessage *qm;
478 const struct GNUNET_ATS_Information *ats;
479 struct GNUNET_TRANSPORT_GetHelloHandle *hwl; 478 struct GNUNET_TRANSPORT_GetHelloHandle *hwl;
480 struct GNUNET_TRANSPORT_GetHelloHandle *next_hwl; 479 struct GNUNET_TRANSPORT_GetHelloHandle *next_hwl;
481 struct Neighbour *n; 480 struct Neighbour *n;
482 struct GNUNET_PeerIdentity me; 481 struct GNUNET_PeerIdentity me;
483 uint16_t size; 482 uint16_t size;
484 uint32_t ats_count;
485 uint32_t bytes_msg; 483 uint32_t bytes_msg;
486 uint32_t bytes_physical; 484 uint32_t bytes_physical;
487 485
@@ -533,15 +531,12 @@ demultiplexer (void *cls, const struct GNUNET_MessageHeader *msg)
533 break; 531 break;
534 } 532 }
535 cim = (const struct ConnectInfoMessage *) msg; 533 cim = (const struct ConnectInfoMessage *) msg;
536 ats_count = ntohl (cim->ats_count);
537 if (size != 534 if (size !=
538 sizeof (struct ConnectInfoMessage) + 535 sizeof (struct ConnectInfoMessage))
539 ats_count * sizeof (struct GNUNET_ATS_Information))
540 { 536 {
541 GNUNET_break (0); 537 GNUNET_break (0);
542 break; 538 break;
543 } 539 }
544 ats = (const struct GNUNET_ATS_Information *) &cim[1];
545 LOG (GNUNET_ERROR_TYPE_DEBUG, "Receiving `%s' message for `%4s'.\n", 540 LOG (GNUNET_ERROR_TYPE_DEBUG, "Receiving `%s' message for `%4s'.\n",
546 "CONNECT", GNUNET_i2s (&cim->id)); 541 "CONNECT", GNUNET_i2s (&cim->id));
547 n = neighbour_find (h, &cim->id); 542 n = neighbour_find (h, &cim->id);
@@ -555,7 +550,7 @@ demultiplexer (void *cls, const struct GNUNET_MessageHeader *msg)
555 "CONNECT", GNUNET_i2s (&cim->id), ntohl (cim->quota_out.value__)); 550 "CONNECT", GNUNET_i2s (&cim->id), ntohl (cim->quota_out.value__));
556 GNUNET_BANDWIDTH_tracker_update_quota (&n->out_tracker, cim->quota_out); 551 GNUNET_BANDWIDTH_tracker_update_quota (&n->out_tracker, cim->quota_out);
557 if (h->nc_cb != NULL) 552 if (h->nc_cb != NULL)
558 h->nc_cb (h->cls, &n->id, ats, ats_count); 553 h->nc_cb (h->cls, &n->id, NULL, 0);
559 break; 554 break;
560 case GNUNET_MESSAGE_TYPE_TRANSPORT_DISCONNECT: 555 case GNUNET_MESSAGE_TYPE_TRANSPORT_DISCONNECT:
561 if (size != sizeof (struct DisconnectInfoMessage)) 556 if (size != sizeof (struct DisconnectInfoMessage))