aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2012-03-22 11:05:22 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2012-03-22 11:05:22 +0000
commita2f68ea8b627e2d009ac5624837b958694f335ff (patch)
tree77f3a1653540d954938a6a023ded8984b660a948 /src
parent5dc75820d20dafd62e8247cb8719bd3224244b52 (diff)
downloadgnunet-a2f68ea8b627e2d009ac5624837b958694f335ff.tar.gz
gnunet-a2f68ea8b627e2d009ac5624837b958694f335ff.zip
Diffstat (limited to 'src')
-rw-r--r--src/include/gnunet_namestore_service.h2
-rw-r--r--src/namestore/gnunet-service-namestore.c3
-rw-r--r--src/namestore/namestore.h1
-rw-r--r--src/namestore/namestore_common.c15
4 files changed, 19 insertions, 2 deletions
diff --git a/src/include/gnunet_namestore_service.h b/src/include/gnunet_namestore_service.h
index 1b5f89cb3..4f6f6a57d 100644
--- a/src/include/gnunet_namestore_service.h
+++ b/src/include/gnunet_namestore_service.h
@@ -254,7 +254,7 @@ GNUNET_NAMESTORE_record_create (struct GNUNET_NAMESTORE_Handle *h,
254 * @param h handle to the namestore 254 * @param h handle to the namestore
255 * @param pkey private key of the zone 255 * @param pkey private key of the zone
256 * @param name name that is being mapped (at most 255 characters long) 256 * @param name name that is being mapped (at most 255 characters long)
257 * @param rd record data 257 * @param rd record data, remove specific record, NULL to remove the name and all records
258 * @param cont continuation to call when done 258 * @param cont continuation to call when done
259 * @param cont_cls closure for cont 259 * @param cont_cls closure for cont
260 * @return handle to abort the request 260 * @return handle to abort the request
diff --git a/src/namestore/gnunet-service-namestore.c b/src/namestore/gnunet-service-namestore.c
index 493d1f574..84ecb8ea1 100644
--- a/src/namestore/gnunet-service-namestore.c
+++ b/src/namestore/gnunet-service-namestore.c
@@ -1453,6 +1453,8 @@ void zone_iteration_proc (void *cls,
1453 GNUNET_HashCode long_hash; 1453 GNUNET_HashCode long_hash;
1454 int authoritative = GNUNET_NO; 1454 int authoritative = GNUNET_NO;
1455 1455
1456 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "ZONE RESULT `%s'\n", name);
1457
1456 if ((zone_key == NULL) && (name == NULL)) 1458 if ((zone_key == NULL) && (name == NULL))
1457 { 1459 {
1458 struct ZoneIterationResponseMessage zir_msg; 1460 struct ZoneIterationResponseMessage zir_msg;
@@ -1518,7 +1520,6 @@ void zone_iteration_proc (void *cls,
1518 authoritative = GNUNET_YES; 1520 authoritative = GNUNET_YES;
1519 } 1521 }
1520 1522
1521
1522 zir_msg->gns_header.header.type = htons (GNUNET_MESSAGE_TYPE_NAMESTORE_ZONE_ITERATION_RESPONSE); 1523 zir_msg->gns_header.header.type = htons (GNUNET_MESSAGE_TYPE_NAMESTORE_ZONE_ITERATION_RESPONSE);
1523 zir_msg->gns_header.header.size = htons (msg_size); 1524 zir_msg->gns_header.header.size = htons (msg_size);
1524 zir_msg->gns_header.r_id = htonl(zi->request_id); 1525 zir_msg->gns_header.r_id = htonl(zi->request_id);
diff --git a/src/namestore/namestore.h b/src/namestore/namestore.h
index a4fb56136..5a42c14d7 100644
--- a/src/namestore/namestore.h
+++ b/src/namestore/namestore.h
@@ -77,6 +77,7 @@ GNUNET_NAMESTORE_create_signature (const struct GNUNET_CRYPTO_RsaPrivateKey *key
77 const struct GNUNET_NAMESTORE_RecordData *rd, 77 const struct GNUNET_NAMESTORE_RecordData *rd,
78 unsigned int rd_count); 78 unsigned int rd_count);
79 79
80
80/** 81/**
81 * Compares if two records are equal 82 * Compares if two records are equal
82 * 83 *
diff --git a/src/namestore/namestore_common.c b/src/namestore/namestore_common.c
index 831f52f83..023f20f43 100644
--- a/src/namestore/namestore_common.c
+++ b/src/namestore/namestore_common.c
@@ -277,6 +277,21 @@ GNUNET_NAMESTORE_create_signature (const struct GNUNET_CRYPTO_RsaPrivateKey *key
277 return sig; 277 return sig;
278} 278}
279 279
280/**
281 * Checks if a name is wellformed
282 *
283 * @param name the name to check
284 * @return GNUNET_OK on success, GNUNET_SYSERR on error
285 */
286int
287GNUNET_NAMESTORE_check_name (const char * name)
288{
289 int res = GNUNET_OK;
290 if (strlen (name) > 63)
291 res = GNUNET_SYSERR;
292 return res;
293}
294
280 295
281/** 296/**
282 * Convert the 'value' of a record to a string. 297 * Convert the 'value' of a record to a string.