gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [gnunet] 75/171: -add policy record type


From: gnunet
Subject: [GNUnet-SVN] [gnunet] 75/171: -add policy record type
Date: Thu, 04 Jan 2018 16:09:43 +0100

This is an automated email from the git hooks/post-receive script.

martin-schanzenbach pushed a commit to branch master
in repository gnunet.

commit 315cdad26814aa1d5e35ee7c75cfa32058a04bf2
Author: Schanzenbach, Martin <address@hidden>
AuthorDate: Thu May 18 13:12:49 2017 +0200

    -add policy record type
---
 src/credential/plugin_gnsrecord_credential.c | 11 +++++++++++
 src/include/gnunet_gnsrecord_lib.h           |  4 ++--
 2 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/src/credential/plugin_gnsrecord_credential.c 
b/src/credential/plugin_gnsrecord_credential.c
index 5c3c03832..1011664cd 100644
--- a/src/credential/plugin_gnsrecord_credential.c
+++ b/src/credential/plugin_gnsrecord_credential.c
@@ -125,6 +125,10 @@ credential_value_to_string (void *cls,
      GNUNET_free (cred);
      return cred_str;
    }
+   case GNUNET_GNSRECORD_TYPE_POLICY:
+   {
+     return GNUNET_strdup (data);
+   }
    default:
    return NULL;
   }
@@ -242,6 +246,12 @@ credential_string_to_value (void *cls,
                                                              (char**)data);
         return GNUNET_OK;
       }
+    case GNUNET_GNSRECORD_TYPE_POLICY:
+      {
+        *data_size = strlen (s);
+        *data = GNUNET_strdup (s);
+        return GNUNET_OK;
+      }
     default:
       return GNUNET_SYSERR;
   }
@@ -258,6 +268,7 @@ static struct {
 } name_map[] = {
   { "CRED", GNUNET_GNSRECORD_TYPE_CREDENTIAL },
   { "ATTR", GNUNET_GNSRECORD_TYPE_ATTRIBUTE },
+  { "POLICY", GNUNET_GNSRECORD_TYPE_POLICY },
   { NULL, UINT32_MAX }
 };
 
diff --git a/src/include/gnunet_gnsrecord_lib.h 
b/src/include/gnunet_gnsrecord_lib.h
index 4f96d50d5..e33d52819 100644
--- a/src/include/gnunet_gnsrecord_lib.h
+++ b/src/include/gnunet_gnsrecord_lib.h
@@ -114,9 +114,9 @@ extern "C"
 #define GNUNET_GNSRECORD_TYPE_CREDENTIAL 65547
 
 /**
- * Record type for reverse lookups
+ * Record type for policies
  */
-#define GNUNET_GNSRECORD_TYPE_REVERSE 65548
+#define GNUNET_GNSRECORD_TYPE_POLICY 65548
 
 /**
  * Record type for reverse lookups

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

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