diff options
Diffstat (limited to 'src/namestore/gnunet-namestore.c')
-rw-r--r-- | src/namestore/gnunet-namestore.c | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/src/namestore/gnunet-namestore.c b/src/namestore/gnunet-namestore.c index 1ed203f1d..45e721b89 100644 --- a/src/namestore/gnunet-namestore.c +++ b/src/namestore/gnunet-namestore.c | |||
@@ -100,12 +100,12 @@ static struct GNUNET_NAMESTORE_ZoneIterator *list_it; | |||
100 | static int del; | 100 | static int del; |
101 | 101 | ||
102 | /** | 102 | /** |
103 | * Is record public (opposite of #GNUNET_NAMESTORE_RF_PRIVATE) | 103 | * Is record public (opposite of #GNUNET_GNSRECORD_RF_PRIVATE) |
104 | */ | 104 | */ |
105 | static int public; | 105 | static int public; |
106 | 106 | ||
107 | /** | 107 | /** |
108 | * Is record a shadow record (#GNUNET_NAMESTORE_RF_SHADOW_RECORD) | 108 | * Is record a shadow record (#GNUNET_GNSRECORD_RF_SHADOW_RECORD) |
109 | */ | 109 | */ |
110 | static int shadow; | 110 | static int shadow; |
111 | 111 | ||
@@ -338,7 +338,7 @@ display_record (void *cls, | |||
338 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone_key, | 338 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone_key, |
339 | const char *name, | 339 | const char *name, |
340 | unsigned int rd_len, | 340 | unsigned int rd_len, |
341 | const struct GNUNET_NAMESTORE_RecordData *rd) | 341 | const struct GNUNET_GNSRECORD_Data *rd) |
342 | { | 342 | { |
343 | const char *typestring; | 343 | const char *typestring; |
344 | char *s; | 344 | char *s; |
@@ -368,7 +368,7 @@ display_record (void *cls, | |||
368 | (unsigned int) rd[i].record_type); | 368 | (unsigned int) rd[i].record_type); |
369 | continue; | 369 | continue; |
370 | } | 370 | } |
371 | if (0 != (rd[i].flags & GNUNET_NAMESTORE_RF_RELATIVE_EXPIRATION)) | 371 | if (0 != (rd[i].flags & GNUNET_GNSRECORD_RF_RELATIVE_EXPIRATION)) |
372 | { | 372 | { |
373 | rt.rel_value_us = rd[i].expiration_time; | 373 | rt.rel_value_us = rd[i].expiration_time; |
374 | ets = GNUNET_STRINGS_relative_time_to_string (rt, GNUNET_YES); | 374 | ets = GNUNET_STRINGS_relative_time_to_string (rt, GNUNET_YES); |
@@ -417,10 +417,10 @@ get_existing_record (void *cls, | |||
417 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone_key, | 417 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone_key, |
418 | const char *rec_name, | 418 | const char *rec_name, |
419 | unsigned int rd_count, | 419 | unsigned int rd_count, |
420 | const struct GNUNET_NAMESTORE_RecordData *rd) | 420 | const struct GNUNET_GNSRECORD_Data *rd) |
421 | { | 421 | { |
422 | struct GNUNET_NAMESTORE_RecordData rdn[rd_count + 1]; | 422 | struct GNUNET_GNSRECORD_Data rdn[rd_count + 1]; |
423 | struct GNUNET_NAMESTORE_RecordData *rde; | 423 | struct GNUNET_GNSRECORD_Data *rde; |
424 | 424 | ||
425 | if ( (NULL != zone_key) && | 425 | if ( (NULL != zone_key) && |
426 | (0 != strcmp (rec_name, name)) ) | 426 | (0 != strcmp (rec_name, name)) ) |
@@ -428,8 +428,8 @@ get_existing_record (void *cls, | |||
428 | GNUNET_NAMESTORE_zone_iterator_next (add_zit); | 428 | GNUNET_NAMESTORE_zone_iterator_next (add_zit); |
429 | return; | 429 | return; |
430 | } | 430 | } |
431 | memset (rdn, 0, sizeof (struct GNUNET_NAMESTORE_RecordData)); | 431 | memset (rdn, 0, sizeof (struct GNUNET_GNSRECORD_Data)); |
432 | memcpy (&rdn[1], rd, rd_count * sizeof (struct GNUNET_NAMESTORE_RecordData)); | 432 | memcpy (&rdn[1], rd, rd_count * sizeof (struct GNUNET_GNSRECORD_Data)); |
433 | /* FIXME: should add some logic to overwrite records if there | 433 | /* FIXME: should add some logic to overwrite records if there |
434 | can only be one record of a particular type, and to check | 434 | can only be one record of a particular type, and to check |
435 | if the combination of records is valid to begin with... */ | 435 | if the combination of records is valid to begin with... */ |
@@ -438,13 +438,13 @@ get_existing_record (void *cls, | |||
438 | rde->data_size = data_size; | 438 | rde->data_size = data_size; |
439 | rde->record_type = type; | 439 | rde->record_type = type; |
440 | if (1 != shadow) | 440 | if (1 != shadow) |
441 | rde->flags |= GNUNET_NAMESTORE_RF_SHADOW_RECORD; | 441 | rde->flags |= GNUNET_GNSRECORD_RF_SHADOW_RECORD; |
442 | if (1 != public) | 442 | if (1 != public) |
443 | rde->flags |= GNUNET_NAMESTORE_RF_PRIVATE; | 443 | rde->flags |= GNUNET_GNSRECORD_RF_PRIVATE; |
444 | if (GNUNET_YES == etime_is_rel) | 444 | if (GNUNET_YES == etime_is_rel) |
445 | { | 445 | { |
446 | rde->expiration_time = etime_rel.rel_value_us; | 446 | rde->expiration_time = etime_rel.rel_value_us; |
447 | rde->flags |= GNUNET_NAMESTORE_RF_RELATIVE_EXPIRATION; | 447 | rde->flags |= GNUNET_GNSRECORD_RF_RELATIVE_EXPIRATION; |
448 | } | 448 | } |
449 | else if (GNUNET_NO == etime_is_rel) | 449 | else if (GNUNET_NO == etime_is_rel) |
450 | rde->expiration_time = etime_abs.abs_value_us; | 450 | rde->expiration_time = etime_abs.abs_value_us; |
@@ -477,7 +477,7 @@ get_existing_record (void *cls, | |||
477 | static void | 477 | static void |
478 | display_records_from_block (void *cls, | 478 | display_records_from_block (void *cls, |
479 | unsigned int rd_len, | 479 | unsigned int rd_len, |
480 | const struct GNUNET_NAMESTORE_RecordData *rd) | 480 | const struct GNUNET_GNSRECORD_Data *rd) |
481 | { | 481 | { |
482 | const char *typestring; | 482 | const char *typestring; |
483 | char *s; | 483 | char *s; |
@@ -523,7 +523,7 @@ display_records_from_block (void *cls, | |||
523 | */ | 523 | */ |
524 | static void | 524 | static void |
525 | handle_block (void *cls, | 525 | handle_block (void *cls, |
526 | const struct GNUNET_NAMESTORE_Block *block) | 526 | const struct GNUNET_GNSRECORD_Block *block) |
527 | { | 527 | { |
528 | struct GNUNET_CRYPTO_EcdsaPublicKey zone_pubkey; | 528 | struct GNUNET_CRYPTO_EcdsaPublicKey zone_pubkey; |
529 | 529 | ||
@@ -536,7 +536,7 @@ handle_block (void *cls, | |||
536 | "No matching block found\n"); | 536 | "No matching block found\n"); |
537 | } | 537 | } |
538 | else if (GNUNET_OK != | 538 | else if (GNUNET_OK != |
539 | GNUNET_NAMESTORE_block_decrypt (block, | 539 | GNUNET_GNSRECORD_block_decrypt (block, |
540 | &zone_pubkey, | 540 | &zone_pubkey, |
541 | name, | 541 | name, |
542 | &display_records_from_block, | 542 | &display_records_from_block, |
@@ -564,7 +564,7 @@ handle_reverse_lookup (void *cls, | |||
564 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone, | 564 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone, |
565 | const char *label, | 565 | const char *label, |
566 | unsigned int rd_count, | 566 | unsigned int rd_count, |
567 | const struct GNUNET_NAMESTORE_RecordData *rd) | 567 | const struct GNUNET_GNSRECORD_Data *rd) |
568 | { | 568 | { |
569 | reverse_qe = NULL; | 569 | reverse_qe = NULL; |
570 | if (NULL == label) | 570 | if (NULL == label) |
@@ -593,7 +593,7 @@ testservice_task (void *cls, | |||
593 | { | 593 | { |
594 | const struct GNUNET_CONFIGURATION_Handle *cfg = cls; | 594 | const struct GNUNET_CONFIGURATION_Handle *cfg = cls; |
595 | struct GNUNET_CRYPTO_EcdsaPublicKey pub; | 595 | struct GNUNET_CRYPTO_EcdsaPublicKey pub; |
596 | struct GNUNET_NAMESTORE_RecordData rd; | 596 | struct GNUNET_GNSRECORD_Data rd; |
597 | 597 | ||
598 | if (GNUNET_YES != result) | 598 | if (GNUNET_YES != result) |
599 | { | 599 | { |
@@ -743,7 +743,7 @@ testservice_task (void *cls, | |||
743 | 743 | ||
744 | GNUNET_CRYPTO_ecdsa_key_get_public (&zone_pkey, | 744 | GNUNET_CRYPTO_ecdsa_key_get_public (&zone_pkey, |
745 | &zone_pubkey); | 745 | &zone_pubkey); |
746 | GNUNET_NAMESTORE_query_from_public_key (&zone_pubkey, | 746 | GNUNET_GNSRECORD_query_from_public_key (&zone_pubkey, |
747 | name, | 747 | name, |
748 | &query); | 748 | &query); |
749 | list_qe = GNUNET_NAMESTORE_lookup_block (ns, | 749 | list_qe = GNUNET_NAMESTORE_lookup_block (ns, |
@@ -799,14 +799,14 @@ testservice_task (void *cls, | |||
799 | if (GNUNET_YES == etime_is_rel) | 799 | if (GNUNET_YES == etime_is_rel) |
800 | { | 800 | { |
801 | rd.expiration_time = etime_rel.rel_value_us; | 801 | rd.expiration_time = etime_rel.rel_value_us; |
802 | rd.flags |= GNUNET_NAMESTORE_RF_RELATIVE_EXPIRATION; | 802 | rd.flags |= GNUNET_GNSRECORD_RF_RELATIVE_EXPIRATION; |
803 | } | 803 | } |
804 | else if (GNUNET_NO == etime_is_rel) | 804 | else if (GNUNET_NO == etime_is_rel) |
805 | rd.expiration_time = etime_abs.abs_value_us; | 805 | rd.expiration_time = etime_abs.abs_value_us; |
806 | else | 806 | else |
807 | rd.expiration_time = GNUNET_TIME_UNIT_FOREVER_ABS.abs_value_us; | 807 | rd.expiration_time = GNUNET_TIME_UNIT_FOREVER_ABS.abs_value_us; |
808 | if (1 != shadow) | 808 | if (1 != shadow) |
809 | rd.flags |= GNUNET_NAMESTORE_RF_SHADOW_RECORD; | 809 | rd.flags |= GNUNET_GNSRECORD_RF_SHADOW_RECORD; |
810 | add_qe_uri = GNUNET_NAMESTORE_records_store (ns, | 810 | add_qe_uri = GNUNET_NAMESTORE_records_store (ns, |
811 | &zone_pkey, | 811 | &zone_pkey, |
812 | sname, | 812 | sname, |