aboutsummaryrefslogtreecommitdiff
path: root/src/namestore
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2013-10-04 07:22:37 +0000
committerChristian Grothoff <christian@grothoff.org>2013-10-04 07:22:37 +0000
commit900b48c3aa80d693fd79b6ef9a3dce323ac61a57 (patch)
tree13ec8dc7d0081ba459631196613a93142814941d /src/namestore
parent4c297e9d83087fef43bb3c6cb89b8787b5d7bdc9 (diff)
downloadgnunet-900b48c3aa80d693fd79b6ef9a3dce323ac61a57.tar.gz
gnunet-900b48c3aa80d693fd79b6ef9a3dce323ac61a57.zip
-do set expiration time when storing records, works better that way...
Diffstat (limited to 'src/namestore')
-rw-r--r--src/namestore/gnunet-namestore.c9
-rw-r--r--src/namestore/gnunet-service-namestore.c12
-rw-r--r--src/namestore/namestore_api.c5
-rw-r--r--src/namestore/namestore_api_common.c145
4 files changed, 100 insertions, 71 deletions
diff --git a/src/namestore/gnunet-namestore.c b/src/namestore/gnunet-namestore.c
index 47018e2ec..37995e8c6 100644
--- a/src/namestore/gnunet-namestore.c
+++ b/src/namestore/gnunet-namestore.c
@@ -428,6 +428,15 @@ get_existing_record (void *cls,
428 rde->flags |= GNUNET_NAMESTORE_RF_SHADOW_RECORD; 428 rde->flags |= GNUNET_NAMESTORE_RF_SHADOW_RECORD;
429 if (1 != public) 429 if (1 != public)
430 rde->flags |= GNUNET_NAMESTORE_RF_PRIVATE; 430 rde->flags |= GNUNET_NAMESTORE_RF_PRIVATE;
431 if (GNUNET_YES == etime_is_rel)
432 {
433 rde->expiration_time = etime_rel.rel_value_us;
434 rde->flags |= GNUNET_NAMESTORE_RF_RELATIVE_EXPIRATION;
435 }
436 else if (GNUNET_NO == etime_is_rel)
437 rde->expiration_time = etime_abs.abs_value_us;
438 else
439 rde->expiration_time = GNUNET_TIME_UNIT_FOREVER_ABS.abs_value_us;
431 GNUNET_assert (NULL != name); 440 GNUNET_assert (NULL != name);
432 add_qe = GNUNET_NAMESTORE_records_store (ns, 441 add_qe = GNUNET_NAMESTORE_records_store (ns,
433 &zone_pkey, 442 &zone_pkey,
diff --git a/src/namestore/gnunet-service-namestore.c b/src/namestore/gnunet-service-namestore.c
index 7ca043d8a..8251a41fa 100644
--- a/src/namestore/gnunet-service-namestore.c
+++ b/src/namestore/gnunet-service-namestore.c
@@ -372,8 +372,9 @@ handle_lookup_block_it (void *cls,
372 r->derived_key = block->derived_key; 372 r->derived_key = block->derived_key;
373 memcpy (&r[1], &block[1], esize); 373 memcpy (&r[1], &block[1], esize);
374 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 374 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
375 "Sending `%s' message\n", 375 "Sending `%s' message with expiration time %s\n",
376 "NAMESTORE_LOOKUP_BLOCK_RESPONSE"); 376 "NAMESTORE_LOOKUP_BLOCK_RESPONSE",
377 GNUNET_STRINGS_absolute_time_to_string (GNUNET_TIME_absolute_ntoh (r->expire)));
377 GNUNET_SERVER_notification_context_unicast (snc, 378 GNUNET_SERVER_notification_context_unicast (snc,
378 lnc->nc->client, 379 lnc->nc->client,
379 &r->gns_header.header, 380 &r->gns_header.header,
@@ -458,9 +459,6 @@ handle_block_cache (void *cls,
458 size_t esize; 459 size_t esize;
459 int res; 460 int res;
460 461
461 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
462 "Received `%s' message\n",
463 "NAMESTORE_BLOCK_CACHE");
464 nc = client_lookup (client); 462 nc = client_lookup (client);
465 if (ntohs (message->size) < sizeof (struct BlockCacheMessage)) 463 if (ntohs (message->size) < sizeof (struct BlockCacheMessage))
466 { 464 {
@@ -477,6 +475,10 @@ handle_block_cache (void *cls,
477 sizeof (struct GNUNET_TIME_AbsoluteNBO) + 475 sizeof (struct GNUNET_TIME_AbsoluteNBO) +
478 esize); 476 esize);
479 block->expiration_time = rp_msg->expire; 477 block->expiration_time = rp_msg->expire;
478 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
479 "Received `%s' message with expiration time %s\n",
480 "NAMESTORE_BLOCK_CACHE",
481 GNUNET_STRINGS_absolute_time_to_string (GNUNET_TIME_absolute_ntoh (block->expiration_time)));
480 memcpy (&block[1], &rp_msg[1], esize); 482 memcpy (&block[1], &rp_msg[1], esize);
481 res = GSN_database->cache_block (GSN_database->cls, 483 res = GSN_database->cache_block (GSN_database->cls,
482 block); 484 block);
diff --git a/src/namestore/namestore_api.c b/src/namestore/namestore_api.c
index 1832d83f7..a1d17835f 100644
--- a/src/namestore/namestore_api.c
+++ b/src/namestore/namestore_api.c
@@ -1056,9 +1056,10 @@ GNUNET_NAMESTORE_block_cache (struct GNUNET_NAMESTORE_Handle *h,
1056 msg->derived_key = block->derived_key; 1056 msg->derived_key = block->derived_key;
1057 memcpy (&msg[1], &block[1], blen); 1057 memcpy (&msg[1], &block[1], blen);
1058 LOG (GNUNET_ERROR_TYPE_DEBUG, 1058 LOG (GNUNET_ERROR_TYPE_DEBUG,
1059 "Sending `%s' message with size %u\n", 1059 "Sending `%s' message with size %u and expiration %s\n",
1060 "NAMESTORE_BLOCK_CACHE", 1060 "NAMESTORE_BLOCK_CACHE",
1061 (unsigned int) msg_size); 1061 (unsigned int) msg_size,
1062 GNUNET_STRINGS_absolute_time_to_string (GNUNET_TIME_absolute_ntoh (msg->expire)));
1062 GNUNET_CONTAINER_DLL_insert_tail (h->pending_head, h->pending_tail, pe); 1063 GNUNET_CONTAINER_DLL_insert_tail (h->pending_head, h->pending_tail, pe);
1063 do_transmit (h); 1064 do_transmit (h);
1064 return qe; 1065 return qe;
diff --git a/src/namestore/namestore_api_common.c b/src/namestore/namestore_api_common.c
index e9d15b205..5ba8e6f37 100644
--- a/src/namestore/namestore_api_common.c
+++ b/src/namestore/namestore_api_common.c
@@ -36,7 +36,7 @@
36#include "namestore.h" 36#include "namestore.h"
37 37
38 38
39#define LOG(kind,...) GNUNET_log_from (kind, "gns-api",__VA_ARGS__) 39#define LOG(kind,...) GNUNET_log_from (kind, "namestore-api",__VA_ARGS__)
40 40
41GNUNET_NETWORK_STRUCT_BEGIN 41GNUNET_NETWORK_STRUCT_BEGIN
42 42
@@ -162,6 +162,11 @@ GNUNET_NAMESTORE_records_serialize (unsigned int rd_count,
162 off = 0; 162 off = 0;
163 for (i=0;i<rd_count;i++) 163 for (i=0;i<rd_count;i++)
164 { 164 {
165 LOG (GNUNET_ERROR_TYPE_DEBUG,
166 "Serializing record %u with flags %d and expiration time %llu\n",
167 i,
168 rd[i].flags,
169 (unsigned long long) rd[i].expiration_time);
165 rec.expiration_time = GNUNET_htonll (rd[i].expiration_time); 170 rec.expiration_time = GNUNET_htonll (rd[i].expiration_time);
166 rec.data_size = htonl ((uint32_t) rd[i].data_size); 171 rec.data_size = htonl ((uint32_t) rd[i].data_size);
167 rec.record_type = htonl (rd[i].record_type); 172 rec.record_type = htonl (rd[i].record_type);
@@ -192,44 +197,48 @@ int
192GNUNET_NAMESTORE_records_cmp (const struct GNUNET_NAMESTORE_RecordData *a, 197GNUNET_NAMESTORE_records_cmp (const struct GNUNET_NAMESTORE_RecordData *a,
193 const struct GNUNET_NAMESTORE_RecordData *b) 198 const struct GNUNET_NAMESTORE_RecordData *b)
194{ 199{
195 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 200 LOG (GNUNET_ERROR_TYPE_DEBUG,
196 "Comparing records\n"); 201 "Comparing records\n");
197 if (a->record_type != b->record_type) 202 if (a->record_type != b->record_type)
198 { 203 {
199 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 204 LOG (GNUNET_ERROR_TYPE_DEBUG,
200 "Record type %lu != %lu\n", a->record_type, b->record_type); 205 "Record type %lu != %lu\n", a->record_type, b->record_type);
201 return GNUNET_NO; 206 return GNUNET_NO;
202 } 207 }
203 if ((a->expiration_time != b->expiration_time) && 208 if ((a->expiration_time != b->expiration_time) &&
204 ((a->expiration_time != 0) && (b->expiration_time != 0))) 209 ((a->expiration_time != 0) && (b->expiration_time != 0)))
205 { 210 {
206 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 211 LOG (GNUNET_ERROR_TYPE_DEBUG,
207 "Expiration time %llu != %llu\n", a->expiration_time, b->expiration_time); 212 "Expiration time %llu != %llu\n",
213 a->expiration_time,
214 b->expiration_time);
208 return GNUNET_NO; 215 return GNUNET_NO;
209 } 216 }
210 if ((a->flags & GNUNET_NAMESTORE_RF_RCMP_FLAGS) 217 if ((a->flags & GNUNET_NAMESTORE_RF_RCMP_FLAGS)
211 != (b->flags & GNUNET_NAMESTORE_RF_RCMP_FLAGS)) 218 != (b->flags & GNUNET_NAMESTORE_RF_RCMP_FLAGS))
212 { 219 {
213 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 220 LOG (GNUNET_ERROR_TYPE_DEBUG,
214 "Flags %lu (%lu) != %lu (%lu)\n", a->flags, 221 "Flags %lu (%lu) != %lu (%lu)\n", a->flags,
215 a->flags & GNUNET_NAMESTORE_RF_RCMP_FLAGS, b->flags, 222 a->flags & GNUNET_NAMESTORE_RF_RCMP_FLAGS, b->flags,
216 b->flags & GNUNET_NAMESTORE_RF_RCMP_FLAGS); 223 b->flags & GNUNET_NAMESTORE_RF_RCMP_FLAGS);
217 return GNUNET_NO; 224 return GNUNET_NO;
218 } 225 }
219 if (a->data_size != b->data_size) 226 if (a->data_size != b->data_size)
220 { 227 {
221 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 228 LOG (GNUNET_ERROR_TYPE_DEBUG,
222 "Data size %lu != %lu\n", a->data_size, b->data_size); 229 "Data size %lu != %lu\n",
230 a->data_size,
231 b->data_size);
223 return GNUNET_NO; 232 return GNUNET_NO;
224 } 233 }
225 if (0 != memcmp (a->data, b->data, a->data_size)) 234 if (0 != memcmp (a->data, b->data, a->data_size))
226 { 235 {
227 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 236 LOG (GNUNET_ERROR_TYPE_DEBUG,
228 "Data contents do not match\n"); 237 "Data contents do not match\n");
229 return GNUNET_NO; 238 return GNUNET_NO;
230 } 239 }
231 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 240 LOG (GNUNET_ERROR_TYPE_DEBUG,
232 "Records are equal\n"); 241 "Records are equal\n");
233 return GNUNET_YES; 242 return GNUNET_YES;
234} 243}
235 244
@@ -264,11 +273,15 @@ GNUNET_NAMESTORE_records_deserialize (size_t len,
264 dest[i].record_type = ntohl (rec.record_type); 273 dest[i].record_type = ntohl (rec.record_type);
265 dest[i].flags = ntohl (rec.flags); 274 dest[i].flags = ntohl (rec.flags);
266 off += sizeof (rec); 275 off += sizeof (rec);
267
268 if (off + dest[i].data_size > len) 276 if (off + dest[i].data_size > len)
269 return GNUNET_SYSERR; 277 return GNUNET_SYSERR;
270 dest[i].data = &src[off]; 278 dest[i].data = &src[off];
271 off += dest[i].data_size; 279 off += dest[i].data_size;
280 LOG (GNUNET_ERROR_TYPE_DEBUG,
281 "Deserialized record %u with flags %d and expiration time %llu\n",
282 i,
283 dest[i].flags,
284 (unsigned long long) dest[i].expiration_time);
272 } 285 }
273 return GNUNET_OK; 286 return GNUNET_OK;
274} 287}
@@ -308,6 +321,10 @@ GNUNET_NAMESTORE_record_get_expiration_time (unsigned int rd_count,
308 } 321 }
309 expire = GNUNET_TIME_absolute_min (at, expire); 322 expire = GNUNET_TIME_absolute_min (at, expire);
310 } 323 }
324 LOG (GNUNET_ERROR_TYPE_DEBUG,
325 "Determined expiration time for block with %u records to be %s\n",
326 rd_count,
327 GNUNET_STRINGS_absolute_time_to_string (expire));
311 return expire; 328 return expire;
312} 329}
313 330
@@ -763,16 +780,16 @@ GNUNET_NAMESTORE_string_to_value (uint32_t type,
763 switch (type) 780 switch (type)
764 { 781 {
765 case 0: 782 case 0:
766 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 783 LOG (GNUNET_ERROR_TYPE_ERROR,
767 _("Unsupported record type %d\n"), 784 _("Unsupported record type %d\n"),
768 (int) type); 785 (int) type);
769 return GNUNET_SYSERR; 786 return GNUNET_SYSERR;
770 case GNUNET_DNSPARSER_TYPE_A: 787 case GNUNET_DNSPARSER_TYPE_A:
771 if (1 != inet_pton (AF_INET, s, &value_a)) 788 if (1 != inet_pton (AF_INET, s, &value_a))
772 { 789 {
773 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 790 LOG (GNUNET_ERROR_TYPE_ERROR,
774 _("Unable to parse IPv4 address `%s'\n"), 791 _("Unable to parse IPv4 address `%s'\n"),
775 s); 792 s);
776 return GNUNET_SYSERR; 793 return GNUNET_SYSERR;
777 } 794 }
778 *data = GNUNET_malloc (sizeof (struct in_addr)); 795 *data = GNUNET_malloc (sizeof (struct in_addr));
@@ -791,9 +808,9 @@ GNUNET_NAMESTORE_string_to_value (uint32_t type,
791 &off, 808 &off,
792 s)) 809 s))
793 { 810 {
794 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 811 LOG (GNUNET_ERROR_TYPE_ERROR,
795 _("Failed to serialize NS record with value `%s'\n"), 812 _("Failed to serialize NS record with value `%s'\n"),
796 s); 813 s);
797 return GNUNET_SYSERR; 814 return GNUNET_SYSERR;
798 } 815 }
799 *data_size = off; 816 *data_size = off;
@@ -813,9 +830,9 @@ GNUNET_NAMESTORE_string_to_value (uint32_t type,
813 &off, 830 &off,
814 s)) 831 s))
815 { 832 {
816 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 833 LOG (GNUNET_ERROR_TYPE_ERROR,
817 _("Failed to serialize CNAME record with value `%s'\n"), 834 _("Failed to serialize CNAME record with value `%s'\n"),
818 s); 835 s);
819 return GNUNET_SYSERR; 836 return GNUNET_SYSERR;
820 } 837 }
821 *data_size = off; 838 *data_size = off;
@@ -841,9 +858,9 @@ GNUNET_NAMESTORE_string_to_value (uint32_t type,
841 soa_rname, soa_mname, 858 soa_rname, soa_mname,
842 &soa_serial, &soa_refresh, &soa_retry, &soa_expire, &soa_min)) 859 &soa_serial, &soa_refresh, &soa_retry, &soa_expire, &soa_min))
843 { 860 {
844 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 861 LOG (GNUNET_ERROR_TYPE_ERROR,
845 _("Unable to parse SOA record `%s'\n"), 862 _("Unable to parse SOA record `%s'\n"),
846 s); 863 s);
847 return GNUNET_SYSERR; 864 return GNUNET_SYSERR;
848 } 865 }
849 soa.mname = soa_mname; 866 soa.mname = soa_mname;
@@ -860,10 +877,10 @@ GNUNET_NAMESTORE_string_to_value (uint32_t type,
860 &off, 877 &off,
861 &soa)) 878 &soa))
862 { 879 {
863 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 880 LOG (GNUNET_ERROR_TYPE_ERROR,
864 _("Failed to serialize SOA record with mname `%s' and rname `%s'\n"), 881 _("Failed to serialize SOA record with mname `%s' and rname `%s'\n"),
865 soa_mname, 882 soa_mname,
866 soa_rname); 883 soa_rname);
867 return GNUNET_SYSERR; 884 return GNUNET_SYSERR;
868 } 885 }
869 *data_size = off; 886 *data_size = off;
@@ -883,9 +900,9 @@ GNUNET_NAMESTORE_string_to_value (uint32_t type,
883 &off, 900 &off,
884 s)) 901 s))
885 { 902 {
886 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 903 LOG (GNUNET_ERROR_TYPE_ERROR,
887 _("Failed to serialize PTR record with value `%s'\n"), 904 _("Failed to serialize PTR record with value `%s'\n"),
888 s); 905 s);
889 return GNUNET_SYSERR; 906 return GNUNET_SYSERR;
890 } 907 }
891 *data_size = off; 908 *data_size = off;
@@ -903,9 +920,9 @@ GNUNET_NAMESTORE_string_to_value (uint32_t type,
903 920
904 if (2 != SSCANF(s, "%hu,%253s", &mx_pref, mxhost)) 921 if (2 != SSCANF(s, "%hu,%253s", &mx_pref, mxhost))
905 { 922 {
906 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 923 LOG (GNUNET_ERROR_TYPE_ERROR,
907 _("Unable to parse MX record `%s'\n"), 924 _("Unable to parse MX record `%s'\n"),
908 s); 925 s);
909 return GNUNET_SYSERR; 926 return GNUNET_SYSERR;
910 } 927 }
911 mx.preference = mx_pref; 928 mx.preference = mx_pref;
@@ -918,9 +935,9 @@ GNUNET_NAMESTORE_string_to_value (uint32_t type,
918 &off, 935 &off,
919 &mx)) 936 &mx))
920 { 937 {
921 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 938 LOG (GNUNET_ERROR_TYPE_ERROR,
922 _("Failed to serialize MX record with hostname `%s'\n"), 939 _("Failed to serialize MX record with hostname `%s'\n"),
923 mxhost); 940 mxhost);
924 return GNUNET_SYSERR; 941 return GNUNET_SYSERR;
925 } 942 }
926 *data_size = off; 943 *data_size = off;
@@ -935,9 +952,9 @@ GNUNET_NAMESTORE_string_to_value (uint32_t type,
935 case GNUNET_DNSPARSER_TYPE_AAAA: 952 case GNUNET_DNSPARSER_TYPE_AAAA:
936 if (1 != inet_pton (AF_INET6, s, &value_aaaa)) 953 if (1 != inet_pton (AF_INET6, s, &value_aaaa))
937 { 954 {
938 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 955 LOG (GNUNET_ERROR_TYPE_ERROR,
939 _("Unable to parse IPv6 address `%s'\n"), 956 _("Unable to parse IPv6 address `%s'\n"),
940 s); 957 s);
941 return GNUNET_SYSERR; 958 return GNUNET_SYSERR;
942 } 959 }
943 *data = GNUNET_malloc (sizeof (struct in6_addr)); 960 *data = GNUNET_malloc (sizeof (struct in6_addr));
@@ -948,9 +965,9 @@ GNUNET_NAMESTORE_string_to_value (uint32_t type,
948 if (GNUNET_OK != 965 if (GNUNET_OK !=
949 GNUNET_CRYPTO_ecc_public_sign_key_from_string (s, strlen (s), &pkey)) 966 GNUNET_CRYPTO_ecc_public_sign_key_from_string (s, strlen (s), &pkey))
950 { 967 {
951 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 968 LOG (GNUNET_ERROR_TYPE_ERROR,
952 _("Unable to parse PKEY record `%s'\n"), 969 _("Unable to parse PKEY record `%s'\n"),
953 s); 970 s);
954 return GNUNET_SYSERR; 971 return GNUNET_SYSERR;
955 } 972 }
956 *data = GNUNET_new (struct GNUNET_CRYPTO_EccPublicSignKey); 973 *data = GNUNET_new (struct GNUNET_CRYPTO_EccPublicSignKey);
@@ -969,9 +986,9 @@ GNUNET_NAMESTORE_string_to_value (uint32_t type,
969 if (3 != SSCANF (s,"%u %103s %253s", 986 if (3 != SSCANF (s,"%u %103s %253s",
970 &proto, s_peer, s_serv)) 987 &proto, s_peer, s_serv))
971 { 988 {
972 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 989 LOG (GNUNET_ERROR_TYPE_ERROR,
973 _("Unable to parse VPN record string `%s'\n"), 990 _("Unable to parse VPN record string `%s'\n"),
974 s); 991 s);
975 return GNUNET_SYSERR; 992 return GNUNET_SYSERR;
976 } 993 }
977 *data_size = sizeof (struct GNUNET_TUN_GnsVpnRecord) + strlen (s_serv) + 1; 994 *data_size = sizeof (struct GNUNET_TUN_GnsVpnRecord) + strlen (s_serv) + 1;
@@ -999,9 +1016,9 @@ GNUNET_NAMESTORE_string_to_value (uint32_t type,
999 &off, 1016 &off,
1000 s)) 1017 s))
1001 { 1018 {
1002 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 1019 LOG (GNUNET_ERROR_TYPE_ERROR,
1003 _("Failed to serialize GNS2DNS record with value `%s'\n"), 1020 _("Failed to serialize GNS2DNS record with value `%s'\n"),
1004 s); 1021 s);
1005 return GNUNET_SYSERR; 1022 return GNUNET_SYSERR;
1006 } 1023 }
1007 *data_size = off; 1024 *data_size = off;
@@ -1018,18 +1035,18 @@ GNUNET_NAMESTORE_string_to_value (uint32_t type,
1018 &tlsa->matching_type, 1035 &tlsa->matching_type,
1019 (char*)&tlsa[1])) 1036 (char*)&tlsa[1]))
1020 { 1037 {
1021 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 1038 LOG (GNUNET_ERROR_TYPE_ERROR,
1022 _("Unable to parse TLSA record string `%s'\n"), 1039 _("Unable to parse TLSA record string `%s'\n"),
1023 s); 1040 s);
1024 *data_size = 0; 1041 *data_size = 0;
1025 GNUNET_free (tlsa); 1042 GNUNET_free (tlsa);
1026 return GNUNET_SYSERR; 1043 return GNUNET_SYSERR;
1027 } 1044 }
1028 return GNUNET_OK; 1045 return GNUNET_OK;
1029 default: 1046 default:
1030 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 1047 LOG (GNUNET_ERROR_TYPE_ERROR,
1031 _("Unsupported record type %d\n"), 1048 _("Unsupported record type %d\n"),
1032 (int) type); 1049 (int) type);
1033 return GNUNET_SYSERR; 1050 return GNUNET_SYSERR;
1034 } 1051 }
1035} 1052}