summaryrefslogtreecommitdiff
path: root/src/namestore/namestore_api.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2013-07-08 22:36:00 +0000
committerChristian Grothoff <christian@grothoff.org>2013-07-08 22:36:00 +0000
commitc8b184df65f4ce954ab571a2a174db3ea0d5c1d6 (patch)
tree351fcb9c770ad65c9990b043c4e4bf529784e78e /src/namestore/namestore_api.c
parent8f31d00ecb420926db5363a2882b5302d8635246 (diff)
downloadgnunet-c8b184df65f4ce954ab571a2a174db3ea0d5c1d6.tar.gz
gnunet-c8b184df65f4ce954ab571a2a174db3ea0d5c1d6.zip
-get rid of iteration response, use lookup response instead, message formats were identical to begin with
Diffstat (limited to 'src/namestore/namestore_api.c')
-rw-r--r--src/namestore/namestore_api.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/namestore/namestore_api.c b/src/namestore/namestore_api.c
index 97d34aa24..54cc8ec66 100644
--- a/src/namestore/namestore_api.c
+++ b/src/namestore/namestore_api.c
@@ -514,7 +514,7 @@ manage_record_operations (struct GNUNET_NAMESTORE_QueueEntry *qe,
514 */ 514 */
515static int 515static int
516handle_zone_iteration_response (struct GNUNET_NAMESTORE_ZoneIterator *ze, 516handle_zone_iteration_response (struct GNUNET_NAMESTORE_ZoneIterator *ze,
517 const struct ZoneIterationResponseMessage *msg, 517 const struct LookupNameResponseMessage *msg,
518 size_t size) 518 size_t size)
519{ 519{
520 struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded pubdummy; 520 struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded pubdummy;
@@ -534,13 +534,12 @@ handle_zone_iteration_response (struct GNUNET_NAMESTORE_ZoneIterator *ze,
534 rd_count = ntohs (msg->rd_count); 534 rd_count = ntohs (msg->rd_count);
535 name_len = ntohs (msg->name_len); 535 name_len = ntohs (msg->name_len);
536 expire = GNUNET_TIME_absolute_ntoh (msg->expire); 536 expire = GNUNET_TIME_absolute_ntoh (msg->expire);
537 exp_msg_len = sizeof (struct ZoneIterationResponseMessage) + name_len + rd_len; 537 exp_msg_len = sizeof (struct LookupNameResponseMessage) + name_len + rd_len;
538 if (msg_len != exp_msg_len) 538 if (msg_len != exp_msg_len)
539 { 539 {
540 GNUNET_break (0); 540 GNUNET_break (0);
541 return GNUNET_SYSERR; 541 return GNUNET_SYSERR;
542 } 542 }
543 GNUNET_break (0 == ntohs (msg->reserved));
544 memset (&pubdummy, '\0', sizeof (pubdummy)); 543 memset (&pubdummy, '\0', sizeof (pubdummy));
545 if ((0 == name_len) && (0 == (memcmp (&msg->public_key, &pubdummy, sizeof (pubdummy))))) 544 if ((0 == name_len) && (0 == (memcmp (&msg->public_key, &pubdummy, sizeof (pubdummy)))))
546 { 545 {
@@ -589,13 +588,13 @@ manage_zone_operations (struct GNUNET_NAMESTORE_ZoneIterator *ze,
589 /* handle different message type */ 588 /* handle different message type */
590 switch (type) 589 switch (type)
591 { 590 {
592 case GNUNET_MESSAGE_TYPE_NAMESTORE_ZONE_ITERATION_RESPONSE: 591 case GNUNET_MESSAGE_TYPE_NAMESTORE_LOOKUP_NAME_RESPONSE:
593 if (size < sizeof (struct ZoneIterationResponseMessage)) 592 if (size < sizeof (struct LookupNameResponseMessage))
594 { 593 {
595 GNUNET_break (0); 594 GNUNET_break (0);
596 return GNUNET_SYSERR; 595 return GNUNET_SYSERR;
597 } 596 }
598 return handle_zone_iteration_response (ze, (const struct ZoneIterationResponseMessage *) msg, size); 597 return handle_zone_iteration_response (ze, (const struct LookupNameResponseMessage *) msg, size);
599 default: 598 default:
600 GNUNET_break (0); 599 GNUNET_break (0);
601 return GNUNET_SYSERR; 600 return GNUNET_SYSERR;