diff options
author | Martin Schanzenbach <mschanzenbach@posteo.de> | 2012-02-23 16:02:03 +0000 |
---|---|---|
committer | Martin Schanzenbach <mschanzenbach@posteo.de> | 2012-02-23 16:02:03 +0000 |
commit | 3136ab7fb0203540499e59f1796f113aab41af62 (patch) | |
tree | 1d5d3c34d4e67ff2423ced9d3c038d94105b1011 /src/gns/gns_api.c | |
parent | 308efe05ba94066c13062679089d9efe2fc22ee9 (diff) | |
download | gnunet-3136ab7fb0203540499e59f1796f113aab41af62.tar.gz gnunet-3136ab7fb0203540499e59f1796f113aab41af62.zip |
-fixes
Diffstat (limited to 'src/gns/gns_api.c')
-rw-r--r-- | src/gns/gns_api.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gns/gns_api.c b/src/gns/gns_api.c index 00e96a61b..ec9c15979 100644 --- a/src/gns/gns_api.c +++ b/src/gns/gns_api.c | |||
@@ -430,7 +430,7 @@ process_reply (void *cls, const GNUNET_HashCode * key, void *value) | |||
430 | const struct GNUNET_GNS_ClientResultMessage *gns_msg = cls; | 430 | const struct GNUNET_GNS_ClientResultMessage *gns_msg = cls; |
431 | struct GNUNET_GNS_LookupHandle *lookup_handle = value; | 431 | struct GNUNET_GNS_LookupHandle *lookup_handle = value; |
432 | const char *name = (const char*) &lookup_handle[1]; | 432 | const char *name = (const char*) &lookup_handle[1]; |
433 | const GNUNET_GNS_Record *records; | 433 | const struct GNUNET_NAMESTORE_RecordData *records; |
434 | uint32_t num_records; | 434 | uint32_t num_records; |
435 | size_t meta_length; | 435 | size_t meta_length; |
436 | size_t msize; | 436 | size_t msize; |
@@ -449,10 +449,10 @@ process_reply (void *cls, const GNUNET_HashCode * key, void *value) | |||
449 | num_records = ntohl (gns_msg->num_records); | 449 | num_records = ntohl (gns_msg->num_records); |
450 | meta_length = | 450 | meta_length = |
451 | sizeof (struct GNUNET_GNS_ClientResultMessage) + | 451 | sizeof (struct GNUNET_GNS_ClientResultMessage) + |
452 | sizeof (GNUNET_GNS_Record) * (num_records); | 452 | sizeof (struct GNUNET_NAMESTORE_RecordData) * (num_records); |
453 | if ((msize < meta_length) || | 453 | if ((msize < meta_length) || |
454 | (num_records > | 454 | (num_records > |
455 | GNUNET_SERVER_MAX_MESSAGE_SIZE / sizeof (GNUNET_GNS_Record))) | 455 | GNUNET_SERVER_MAX_MESSAGE_SIZE / sizeof (struct GNUNET_NAMESTORE_RecordData))) |
456 | { | 456 | { |
457 | GNUNET_break (0); | 457 | GNUNET_break (0); |
458 | return GNUNET_NO; | 458 | return GNUNET_NO; |
@@ -461,7 +461,7 @@ process_reply (void *cls, const GNUNET_HashCode * key, void *value) | |||
461 | LOG (GNUNET_ERROR_TYPE_DEBUG, "Giving %u byte reply for %s to application\n", | 461 | LOG (GNUNET_ERROR_TYPE_DEBUG, "Giving %u byte reply for %s to application\n", |
462 | (unsigned int) (msize - meta_length), GNUNET_h2s (key)); | 462 | (unsigned int) (msize - meta_length), GNUNET_h2s (key)); |
463 | #endif | 463 | #endif |
464 | records = (const GNUNET_GNS_Record *) &gns_msg[1]; | 464 | records = (const struct GNUNET_NAMESTORE_RecordData *) &gns_msg[1]; |
465 | lookup_handle->iter (lookup_handle->iter_cls, name, records, num_records); | 465 | lookup_handle->iter (lookup_handle->iter_cls, name, records, num_records); |
466 | return GNUNET_YES; | 466 | return GNUNET_YES; |
467 | } | 467 | } |