From 920b7f6c8d43d32a6ad604a223bb8aa8a3da12d7 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Fri, 27 Aug 2010 12:20:27 +0000 Subject: fixes --- src/datacache/plugin_datacache_postgres.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/datacache/plugin_datacache_postgres.c') 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); -- cgit v1.2.3-70-g09d2