[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r12750 - gnunet/src/datacache
From: |
gnunet |
Subject: |
[GNUnet-SVN] r12750 - gnunet/src/datacache |
Date: |
Fri, 27 Aug 2010 14:20:27 +0200 |
Author: grothoff
Date: 2010-08-27 14:20:27 +0200 (Fri, 27 Aug 2010)
New Revision: 12750
Modified:
gnunet/src/datacache/datacache.c
gnunet/src/datacache/plugin_datacache_postgres.c
gnunet/src/datacache/test_datacache_quota.c
Log:
fixes
Modified: gnunet/src/datacache/datacache.c
===================================================================
--- gnunet/src/datacache/datacache.c 2010-08-27 11:42:09 UTC (rev 12749)
+++ gnunet/src/datacache/datacache.c 2010-08-27 12:20:27 UTC (rev 12750)
@@ -191,7 +191,6 @@
GNUNET_DATACACHE_destroy (ret);
return NULL;
}
- GNUNET_assert (ret->api->get != NULL);
return ret;
}
@@ -245,7 +244,6 @@
{
uint32_t used;
- GNUNET_assert (h->api->get != NULL);
used = h->api->put (h->api->cls,
key,
size,
@@ -287,7 +285,6 @@
GNUNET_DATACACHE_Iterator iter,
void *iter_cls)
{
- GNUNET_assert (h->api->get != NULL);
GNUNET_STATISTICS_update (h->stats,
gettext_noop ("# requests received"),
1,
@@ -301,7 +298,6 @@
GNUNET_NO);
return 0; /* can not be present */
}
- GNUNET_assert (h->api->get != NULL);
return h->api->get (h->api->cls,
key,
type,
Modified: gnunet/src/datacache/plugin_datacache_postgres.c
===================================================================
--- gnunet/src/datacache/plugin_datacache_postgres.c 2010-08-27 11:42:09 UTC
(rev 12749)
+++ gnunet/src/datacache/plugin_datacache_postgres.c 2010-08-27 12:20:27 UTC
(rev 12750)
@@ -406,6 +406,8 @@
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)))
@@ -494,9 +496,9 @@
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);
Modified: gnunet/src/datacache/test_datacache_quota.c
===================================================================
--- gnunet/src/datacache/test_datacache_quota.c 2010-08-27 11:42:09 UTC (rev
12749)
+++ gnunet/src/datacache/test_datacache_quota.c 2010-08-27 12:20:27 UTC (rev
12750)
@@ -88,7 +88,6 @@
buf,
1+i,
exp));
- fprintf (stderr, "G");
ASSERT (0 < GNUNET_DATACACHE_get (h,
&k, 1+i,
NULL, NULL));
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r12750 - gnunet/src/datacache,
gnunet <=