(no commit message)
authorMatthias Wachs <wachs@net.in.tum.de>
Thu, 22 Mar 2012 11:05:22 +0000 (11:05 +0000)
committerMatthias Wachs <wachs@net.in.tum.de>
Thu, 22 Mar 2012 11:05:22 +0000 (11:05 +0000)
src/include/gnunet_namestore_service.h
src/namestore/gnunet-service-namestore.c
src/namestore/namestore.h
src/namestore/namestore_common.c

index 1b5f89cb37bdd2d29452fbc72d5f9b71b6832041..4f6f6a57d2f3343cb9d728d1ff9df6b5c3b57064 100644 (file)
@@ -254,7 +254,7 @@ GNUNET_NAMESTORE_record_create (struct GNUNET_NAMESTORE_Handle *h,
  * @param h handle to the namestore
  * @param pkey private key of the zone
  * @param name name that is being mapped (at most 255 characters long)
- * @param rd record data
+ * @param rd record data, remove specific record,  NULL to remove the name and all records
  * @param cont continuation to call when done
  * @param cont_cls closure for cont
  * @return handle to abort the request
index 493d1f57446dad55d1b82353e8d86fd54c55f2e1..84ecb8ea112690c8b2eaddb826a0ce11b0c832dc 100644 (file)
@@ -1453,6 +1453,8 @@ void zone_iteration_proc (void *cls,
   GNUNET_HashCode long_hash;
   int authoritative = GNUNET_NO;
 
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "ZONE RESULT `%s'\n", name);
+
   if ((zone_key == NULL) && (name == NULL))
   {
     struct ZoneIterationResponseMessage zir_msg;
@@ -1518,7 +1520,6 @@ void zone_iteration_proc (void *cls,
       authoritative = GNUNET_YES;
     }
 
-
     zir_msg->gns_header.header.type = htons (GNUNET_MESSAGE_TYPE_NAMESTORE_ZONE_ITERATION_RESPONSE);
     zir_msg->gns_header.header.size = htons (msg_size);
     zir_msg->gns_header.r_id = htonl(zi->request_id);
index a4fb5613625df3bbf8bdc4cd4ade5eb032d72185..5a42c14d70abec23f68ff76bc537aac37cf21cc1 100644 (file)
@@ -77,6 +77,7 @@ GNUNET_NAMESTORE_create_signature (const struct GNUNET_CRYPTO_RsaPrivateKey *key
     const struct GNUNET_NAMESTORE_RecordData *rd,
     unsigned int rd_count);
 
+
 /**
  * Compares if two records are equal
  *
index 831f52f8353dbeee265ccab30feffa66c72c7533..023f20f431e8772e84f2110674dbcdbee9cd1886 100644 (file)
@@ -277,6 +277,21 @@ GNUNET_NAMESTORE_create_signature (const struct GNUNET_CRYPTO_RsaPrivateKey *key
   return sig;
 }
 
+/**
+ * Checks if a name is wellformed
+ *
+ * @param name the name to check
+ * @return GNUNET_OK on success, GNUNET_SYSERR on error
+ */
+int
+GNUNET_NAMESTORE_check_name (const char * name)
+{
+  int res = GNUNET_OK;
+  if (strlen (name) > 63)
+    res = GNUNET_SYSERR;
+  return res;
+}
+
 
 /**
  * Convert the 'value' of a record to a string.