* Operation id for the name lookup
*/
uint32_t request_id;
-
+
+ /**
+ * Lookup status
+ */
+ uint32_t status;
};
struct GNUNET_MQ_Envelope *env;
struct LookupBlockResponseMessage *r;
size_t esize;
+ size_t bsize;
+ bsize = ntohl (block->purpose.size);
+ if (bsize <
+ (sizeof (struct GNUNET_CRYPTO_EccSignaturePurpose) + sizeof (struct GNUNET_TIME_AbsoluteNBO)))
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ "Malformed block.");
+ lnc->status = GNUNET_SYSERR;
+ return;
+ }
esize = ntohl (block->purpose.size)
- sizeof (struct GNUNET_CRYPTO_EccSignaturePurpose)
- sizeof (struct GNUNET_TIME_AbsoluteNBO);
lnc.request_id = ntohl (ln_msg->gns_header.r_id);
lnc.nc = nc;
+ lnc.status = GNUNET_OK;
if (GNUNET_SYSERR ==
(ret = GSN_database->lookup_block (GSN_database->cls,
&ln_msg->query,
GNUNET_SERVICE_client_drop (nc->client);
return;
}
- if (0 == ret)
+ if ((0 == ret) || (GNUNET_SYSERR == lnc.status))
{
/* no records match at all, generate empty response */
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,