diff options
Diffstat (limited to 'src/namestore/plugin_namestore_postgres.c')
-rw-r--r-- | src/namestore/plugin_namestore_postgres.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/namestore/plugin_namestore_postgres.c b/src/namestore/plugin_namestore_postgres.c index 070549b33..64bfa631c 100644 --- a/src/namestore/plugin_namestore_postgres.c +++ b/src/namestore/plugin_namestore_postgres.c | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * This file is part of GNUnet | 2 | * This file is part of GNUnet |
3 | * (C) 2009, 2011, 2012 Christian Grothoff (and other contributing authors) | 3 | * (C) 2009-2013 Christian Grothoff (and other contributing authors) |
4 | * | 4 | * |
5 | * GNUnet is free software; you can redistribute it and/or modify | 5 | * GNUnet is free software; you can redistribute it and/or modify |
6 | * it under the terms of the GNU General Public License as published | 6 | * it under the terms of the GNU General Public License as published |
@@ -269,7 +269,7 @@ namestore_postgres_remove_records (void *cls, | |||
269 | */ | 269 | */ |
270 | static int | 270 | static int |
271 | namestore_postgres_put_records (void *cls, | 271 | namestore_postgres_put_records (void *cls, |
272 | const struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded *zone_key, | 272 | const struct GNUNET_CRYPTO_EccPublicKey *zone_key, |
273 | struct GNUNET_TIME_Absolute expire, | 273 | struct GNUNET_TIME_Absolute expire, |
274 | const char *name, | 274 | const char *name, |
275 | unsigned int rd_count, | 275 | unsigned int rd_count, |
@@ -287,7 +287,7 @@ namestore_postgres_put_records (void *cls, | |||
287 | unsigned int i; | 287 | unsigned int i; |
288 | 288 | ||
289 | GNUNET_CRYPTO_short_hash (zone_key, | 289 | GNUNET_CRYPTO_short_hash (zone_key, |
290 | sizeof (struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded), | 290 | sizeof (struct GNUNET_CRYPTO_EccPublicKey), |
291 | &zone); | 291 | &zone); |
292 | (void) namestore_postgres_remove_records (plugin, &zone, name); | 292 | (void) namestore_postgres_remove_records (plugin, &zone, name); |
293 | name_len = strlen (name); | 293 | name_len = strlen (name); |
@@ -327,7 +327,7 @@ namestore_postgres_put_records (void *cls, | |||
327 | (const char *) &rvalue_be | 327 | (const char *) &rvalue_be |
328 | }; | 328 | }; |
329 | int paramLengths[] = { | 329 | int paramLengths[] = { |
330 | sizeof (struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded), | 330 | sizeof (struct GNUNET_CRYPTO_EccPublicKey), |
331 | name_len, | 331 | name_len, |
332 | sizeof (uint32_t), | 332 | sizeof (uint32_t), |
333 | data_size, | 333 | data_size, |
@@ -378,7 +378,7 @@ get_record_and_call_iterator (struct Plugin *plugin, | |||
378 | { | 378 | { |
379 | unsigned int record_count; | 379 | unsigned int record_count; |
380 | size_t data_size; | 380 | size_t data_size; |
381 | const struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded *zone_key; | 381 | const struct GNUNET_CRYPTO_EccPublicKey *zone_key; |
382 | const struct GNUNET_CRYPTO_EccSignature *sig; | 382 | const struct GNUNET_CRYPTO_EccSignature *sig; |
383 | struct GNUNET_TIME_Absolute expiration; | 383 | struct GNUNET_TIME_Absolute expiration; |
384 | const char *data; | 384 | const char *data; |
@@ -406,7 +406,7 @@ get_record_and_call_iterator (struct Plugin *plugin, | |||
406 | } | 406 | } |
407 | GNUNET_assert (1 == cnt); | 407 | GNUNET_assert (1 == cnt); |
408 | if ((6 != PQnfields (res)) || | 408 | if ((6 != PQnfields (res)) || |
409 | (sizeof (struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded) != PQgetlength (res, 0, 0)) || | 409 | (sizeof (struct GNUNET_CRYPTO_EccPublicKey) != PQgetlength (res, 0, 0)) || |
410 | (sizeof (uint32_t) != PQfsize (res, 2)) || | 410 | (sizeof (uint32_t) != PQfsize (res, 2)) || |
411 | (sizeof (uint64_t) != PQfsize (res, 4)) || | 411 | (sizeof (uint64_t) != PQfsize (res, 4)) || |
412 | (sizeof (struct GNUNET_CRYPTO_EccSignature) != PQgetlength (res, 0, 5))) | 412 | (sizeof (struct GNUNET_CRYPTO_EccSignature) != PQgetlength (res, 0, 5))) |
@@ -415,7 +415,7 @@ get_record_and_call_iterator (struct Plugin *plugin, | |||
415 | PQclear (res); | 415 | PQclear (res); |
416 | return GNUNET_SYSERR; | 416 | return GNUNET_SYSERR; |
417 | } | 417 | } |
418 | zone_key = (const struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded *) PQgetvalue (res, 0, 0); | 418 | zone_key = (const struct GNUNET_CRYPTO_EccPublicKey *) PQgetvalue (res, 0, 0); |
419 | name = PQgetvalue (res, 0, 1); | 419 | name = PQgetvalue (res, 0, 1); |
420 | name_len = PQgetlength (res, 0, 1); | 420 | name_len = PQgetlength (res, 0, 1); |
421 | record_count = ntohl (*(uint32_t *) PQgetvalue (res, 0, 2)); | 421 | record_count = ntohl (*(uint32_t *) PQgetvalue (res, 0, 2)); |