diff options
author | Martin Schanzenbach <mschanzenbach@posteo.de> | 2012-03-15 13:54:04 +0000 |
---|---|---|
committer | Martin Schanzenbach <mschanzenbach@posteo.de> | 2012-03-15 13:54:04 +0000 |
commit | f619430fc962cc50f48e980841c76ca7fe1e801e (patch) | |
tree | 25718674bc95b2e6241226d9502812545a63b566 /src/gns/gns_api.c | |
parent | f815a16a9f505893ed948c775992a86fa8e5cbc0 (diff) | |
download | gnunet-f619430fc962cc50f48e980841c76ca7fe1e801e.tar.gz gnunet-f619430fc962cc50f48e980841c76ca7fe1e801e.zip |
-fixes
Diffstat (limited to 'src/gns/gns_api.c')
-rw-r--r-- | src/gns/gns_api.c | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/src/gns/gns_api.c b/src/gns/gns_api.c index 1a268f952..26870cdfd 100644 --- a/src/gns/gns_api.c +++ b/src/gns/gns_api.c | |||
@@ -440,17 +440,25 @@ process_lookup_reply (struct GNUNET_GNS_QueueEntry *qe, | |||
440 | 440 | ||
441 | len -= sizeof(struct GNUNET_GNS_ClientLookupResultMessage); | 441 | len -= sizeof(struct GNUNET_GNS_ClientLookupResultMessage); |
442 | 442 | ||
443 | GNUNET_NAMESTORE_records_deserialize (len, (char*)&msg[1], | ||
444 | rd_count, | ||
445 | rd); | ||
446 | |||
447 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
448 | "Received lookup reply from GNS service (count=%d)\n", | ||
449 | ntohl(msg->rd_count)); | ||
450 | |||
451 | GNUNET_CLIENT_receive (h->client, &process_message, h, | 443 | GNUNET_CLIENT_receive (h->client, &process_message, h, |
452 | GNUNET_TIME_UNIT_FOREVER_REL); | 444 | GNUNET_TIME_UNIT_FOREVER_REL); |
453 | qe->lookup_proc(qe->proc_cls, rd_count, rd); | 445 | if (GNUNET_SYSERR == GNUNET_NAMESTORE_records_deserialize (len, |
446 | (char*)&msg[1], | ||
447 | rd_count, | ||
448 | rd)) | ||
449 | { | ||
450 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | ||
451 | "Failed to serialize lookup reply from GNS service!\n"); | ||
452 | qe->lookup_proc(qe->proc_cls, 0, NULL); | ||
453 | } | ||
454 | else | ||
455 | { | ||
456 | |||
457 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
458 | "Received lookup reply from GNS service (count=%d)\n", | ||
459 | ntohl(msg->rd_count)); | ||
460 | qe->lookup_proc(qe->proc_cls, rd_count, rd); | ||
461 | } | ||
454 | } | 462 | } |
455 | 463 | ||
456 | /** | 464 | /** |