GNUNET_DATACACHE_destroy (ret);
return NULL;
}
- GNUNET_assert (ret->api->get != NULL);
return ret;
}
{
uint32_t used;
- GNUNET_assert (h->api->get != NULL);
used = h->api->put (h->api->cls,
key,
size,
GNUNET_DATACACHE_Iterator iter,
void *iter_cls)
{
- GNUNET_assert (h->api->get != NULL);
GNUNET_STATISTICS_update (h->stats,
gettext_noop ("# requests received"),
1,
GNUNET_NO);
return 0; /* can not be present */
}
- GNUNET_assert (h->api->get != NULL);
return h->api->get (h->api->cls,
key,
type,
PQclear (res);
return 0;
}
+ if (iter == NULL)
+ return cnt;
if ( (3 != PQnfields (res)) ||
(sizeof (uint64_t) != PQfsize (res, 0)) ||
(sizeof (uint32_t) != PQfsize (res, 1)))
return GNUNET_SYSERR;
}
if ( (3 != PQnfields (res)) ||
- (sizeof (uint32_t) != PQfsize (res, 0)) ||
- (sizeof (uint32_t) != PQfsize (res, 1)) ||
- (sizeof (GNUNET_HashCode) != PQfsize (res, 2)) )
+ (sizeof (size) != PQfsize (res, 0)) ||
+ (sizeof (oid) != PQfsize (res, 1)) ||
+ (sizeof (GNUNET_HashCode) != PQgetlength (res, 0, 2)) )
{
GNUNET_break (0);
PQclear (res);