aboutsummaryrefslogtreecommitdiff
path: root/src/namestore/plugin_namestore_postgres.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/namestore/plugin_namestore_postgres.c')
-rw-r--r--src/namestore/plugin_namestore_postgres.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/namestore/plugin_namestore_postgres.c b/src/namestore/plugin_namestore_postgres.c
index 358fd35d6..bdbaf96b3 100644
--- a/src/namestore/plugin_namestore_postgres.c
+++ b/src/namestore/plugin_namestore_postgres.c
@@ -195,13 +195,14 @@ namestore_postgres_store_records (void *cls,
195 0, 195 0,
196 sizeof(pkey)); 196 sizeof(pkey));
197 for (unsigned int i = 0; i < rd_count; i++) 197 for (unsigned int i = 0; i < rd_count; i++)
198 if (GNUNET_GNSRECORD_TYPE_PKEY == rd[i].record_type) 198 if (GNUNET_YES ==
199 GNUNET_GNSRECORD_is_zonekey_type (rd[i].record_type))
199 { 200 {
200 GNUNET_break (sizeof(struct GNUNET_IDENTITY_PublicKey) == 201 GNUNET_break (GNUNET_OK ==
201 rd[i].data_size); 202 GNUNET_GNSRECORD_identity_from_data (rd[i].data,
202 GNUNET_memcpy (&pkey, 203 rd[i].data_size,
203 rd[i].data, 204 rd[i].record_type,
204 rd[i].data_size); 205 &pkey));
205 break; 206 break;
206 } 207 }
207 rvalue = GNUNET_CRYPTO_random_u64 (GNUNET_CRYPTO_QUALITY_WEAK, 208 rvalue = GNUNET_CRYPTO_random_u64 (GNUNET_CRYPTO_QUALITY_WEAK,