aboutsummaryrefslogtreecommitdiff
path: root/src/datacache/plugin_datacache_postgres.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/datacache/plugin_datacache_postgres.c')
-rw-r--r--src/datacache/plugin_datacache_postgres.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/datacache/plugin_datacache_postgres.c b/src/datacache/plugin_datacache_postgres.c
index 6bf3c70111..1269790690 100644
--- a/src/datacache/plugin_datacache_postgres.c
+++ b/src/datacache/plugin_datacache_postgres.c
@@ -406,6 +406,8 @@ postgres_plugin_get (void *cls,
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 @@ postgres_plugin_del (void *cls)
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);