aboutsummaryrefslogtreecommitdiff
path: root/src/gns/namestore_stub_api.c
diff options
context:
space:
mode:
authorMartin Schanzenbach <mschanzenbach@posteo.de>2012-02-27 22:55:08 +0000
committerMartin Schanzenbach <mschanzenbach@posteo.de>2012-02-27 22:55:08 +0000
commit8381fa958b99a56fb735850619850881d042c80d (patch)
tree4093ae07e91466e01cab608513dd724561edfcf1 /src/gns/namestore_stub_api.c
parentb175cce4bac2bea3476f84633d00f3d8496f575a (diff)
downloadgnunet-8381fa958b99a56fb735850619850881d042c80d.tar.gz
gnunet-8381fa958b99a56fb735850619850881d042c80d.zip
-integrated block plugin
Diffstat (limited to 'src/gns/namestore_stub_api.c')
-rw-r--r--src/gns/namestore_stub_api.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gns/namestore_stub_api.c b/src/gns/namestore_stub_api.c
index b1fd77683..c61aa6f0a 100644
--- a/src/gns/namestore_stub_api.c
+++ b/src/gns/namestore_stub_api.c
@@ -249,12 +249,14 @@ GNUNET_NAMESTORE_record_create (struct GNUNET_NAMESTORE_Handle *h,
249 249
250 zone_hash = GNUNET_malloc(sizeof(GNUNET_HashCode)); 250 zone_hash = GNUNET_malloc(sizeof(GNUNET_HashCode));
251 251
252 GNUNET_CRYPTO_hash(pkey, GNUNET_CRYPTO_RSA_KEY_LENGTH, zone_hash); 252 GNUNET_CRYPTO_hash(pkey, sizeof(struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded),
253 zone_hash);
253 254
254 sr = h->records_head; 255 sr = h->records_head;
255 for (; sr != NULL; sr = sr->next) 256 for (; sr != NULL; sr = sr->next)
256 { 257 {
257 if (strcmp(sr->name, name) && (sr->zone == zone_hash)) 258 if ((strcmp(sr->name, name) == 0) &&
259 (0 == GNUNET_CRYPTO_hash_cmp(sr->zone, zone_hash)))
258 { 260 {
259 //Dangerous 261 //Dangerous
260 memcpy (&(sr->rd[sr->rd_count-1]), rd, 262 memcpy (&(sr->rd[sr->rd_count-1]), rd,