diff options
author | Christian Grothoff <christian@grothoff.org> | 2010-08-27 12:20:27 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2010-08-27 12:20:27 +0000 |
commit | 920b7f6c8d43d32a6ad604a223bb8aa8a3da12d7 (patch) | |
tree | e16b689cf4e6bc4f7032993c1356f0d6e35add66 /src/datacache/plugin_datacache_postgres.c | |
parent | fb948e1e36718621b4dcc92b2a6f54c470812eb4 (diff) | |
download | gnunet-920b7f6c8d43d32a6ad604a223bb8aa8a3da12d7.tar.gz gnunet-920b7f6c8d43d32a6ad604a223bb8aa8a3da12d7.zip |
fixes
Diffstat (limited to 'src/datacache/plugin_datacache_postgres.c')
-rw-r--r-- | src/datacache/plugin_datacache_postgres.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/datacache/plugin_datacache_postgres.c b/src/datacache/plugin_datacache_postgres.c index 6bf3c7011..126979069 100644 --- a/src/datacache/plugin_datacache_postgres.c +++ b/src/datacache/plugin_datacache_postgres.c | |||
@@ -406,6 +406,8 @@ postgres_plugin_get (void *cls, | |||
406 | PQclear (res); | 406 | PQclear (res); |
407 | return 0; | 407 | return 0; |
408 | } | 408 | } |
409 | if (iter == NULL) | ||
410 | return cnt; | ||
409 | if ( (3 != PQnfields (res)) || | 411 | if ( (3 != PQnfields (res)) || |
410 | (sizeof (uint64_t) != PQfsize (res, 0)) || | 412 | (sizeof (uint64_t) != PQfsize (res, 0)) || |
411 | (sizeof (uint32_t) != PQfsize (res, 1))) | 413 | (sizeof (uint32_t) != PQfsize (res, 1))) |
@@ -494,9 +496,9 @@ postgres_plugin_del (void *cls) | |||
494 | return GNUNET_SYSERR; | 496 | return GNUNET_SYSERR; |
495 | } | 497 | } |
496 | if ( (3 != PQnfields (res)) || | 498 | if ( (3 != PQnfields (res)) || |
497 | (sizeof (uint32_t) != PQfsize (res, 0)) || | 499 | (sizeof (size) != PQfsize (res, 0)) || |
498 | (sizeof (uint32_t) != PQfsize (res, 1)) || | 500 | (sizeof (oid) != PQfsize (res, 1)) || |
499 | (sizeof (GNUNET_HashCode) != PQfsize (res, 2)) ) | 501 | (sizeof (GNUNET_HashCode) != PQgetlength (res, 0, 2)) ) |
500 | { | 502 | { |
501 | GNUNET_break (0); | 503 | GNUNET_break (0); |
502 | PQclear (res); | 504 | PQclear (res); |