gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r20670 - in gnunet/src: include namestore


From: gnunet
Subject: [GNUnet-SVN] r20670 - in gnunet/src: include namestore
Date: Thu, 22 Mar 2012 12:05:22 +0100

Author: wachs
Date: 2012-03-22 12:05:22 +0100 (Thu, 22 Mar 2012)
New Revision: 20670

Modified:
   gnunet/src/include/gnunet_namestore_service.h
   gnunet/src/namestore/gnunet-service-namestore.c
   gnunet/src/namestore/namestore.h
   gnunet/src/namestore/namestore_common.c
Log:


Modified: gnunet/src/include/gnunet_namestore_service.h
===================================================================
--- gnunet/src/include/gnunet_namestore_service.h       2012-03-22 11:02:59 UTC 
(rev 20669)
+++ gnunet/src/include/gnunet_namestore_service.h       2012-03-22 11:05:22 UTC 
(rev 20670)
@@ -254,7 +254,7 @@
  * @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

Modified: gnunet/src/namestore/gnunet-service-namestore.c
===================================================================
--- gnunet/src/namestore/gnunet-service-namestore.c     2012-03-22 11:02:59 UTC 
(rev 20669)
+++ gnunet/src/namestore/gnunet-service-namestore.c     2012-03-22 11:05:22 UTC 
(rev 20670)
@@ -1453,6 +1453,8 @@
   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 @@
       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);

Modified: gnunet/src/namestore/namestore.h
===================================================================
--- gnunet/src/namestore/namestore.h    2012-03-22 11:02:59 UTC (rev 20669)
+++ gnunet/src/namestore/namestore.h    2012-03-22 11:05:22 UTC (rev 20670)
@@ -77,6 +77,7 @@
     const struct GNUNET_NAMESTORE_RecordData *rd,
     unsigned int rd_count);
 
+
 /**
  * Compares if two records are equal
  *

Modified: gnunet/src/namestore/namestore_common.c
===================================================================
--- gnunet/src/namestore/namestore_common.c     2012-03-22 11:02:59 UTC (rev 
20669)
+++ gnunet/src/namestore/namestore_common.c     2012-03-22 11:05:22 UTC (rev 
20670)
@@ -277,7 +277,22 @@
   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.
  *




reply via email to

[Prev in Thread] Current Thread [Next in Thread]