gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r27306 - gnunet/src/experimentation


From: gnunet
Subject: [GNUnet-SVN] r27306 - gnunet/src/experimentation
Date: Mon, 27 May 2013 10:23:02 +0200

Author: wachs
Date: 2013-05-27 10:22:58 +0200 (Mon, 27 May 2013)
New Revision: 27306

Modified:
   gnunet/src/experimentation/gnunet-daemon-experimentation_experiments.c
Log:
docu


Modified: gnunet/src/experimentation/gnunet-daemon-experimentation_experiments.c
===================================================================
--- gnunet/src/experimentation/gnunet-daemon-experimentation_experiments.c      
2013-05-27 08:19:41 UTC (rev 27305)
+++ gnunet/src/experimentation/gnunet-daemon-experimentation_experiments.c      
2013-05-27 08:22:58 UTC (rev 27306)
@@ -31,6 +31,10 @@
 #include "gnunet_statistics_service.h"
 #include "gnunet-daemon-experimentation.h"
 
+
+/**
+ * Struct to store information about a specific experiment
+ */
 struct Experiment
 {
        /* Header */
@@ -53,21 +57,28 @@
        /* TBD */
 };
 
+
+/**
+ * Struct to store information about an experiment issuer
+ */
 struct Issuer
 {
        struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded pubkey;
 };
 
+
 /**
  * Hashmap containing valid experiment issuer
  */
 static struct GNUNET_CONTAINER_MultiHashMap *valid_issuers;
 
+
 /**
  * Hashmap containing valid experiments
  */
 static struct GNUNET_CONTAINER_MultiHashMap *experiments;
 
+
 /**
  * Verify experiment signature
  *
@@ -75,7 +86,6 @@
  * @param e experiment
  * @return GNUNET_OK or GNUNET_SYSERR
  */
-
 int
 experiment_verify (struct Issuer *i, struct Experiment *e)
 {
@@ -98,6 +108,15 @@
        return GNUNET_OK;
 }
 
+
+/**
+ * Free issuer element
+ *
+ * @param cls unused
+ * @param key the key
+ * @param value the issuer element to free
+ * @return GNUNET_OK to continue
+ */
 int free_issuer (void *cls,
                                                                 const struct 
GNUNET_HashCode * key,
                                                                 void *value)
@@ -108,6 +127,7 @@
        return GNUNET_OK;
 }
 
+
 /**
  * Is peer a valid issuer
  *
@@ -123,6 +143,12 @@
 }
 
 
+/**
+ * Parse a configuration section containing experiments
+ *
+ * @param cls configuration handle
+ * @param section section name
+ */
 void exp_file_iterator (void *cls,
                                                                                
                const char *section)
 {
@@ -204,12 +230,12 @@
   GNUNET_STATISTICS_set (GSE_stats, "# experiments", 
GNUNET_CONTAINER_multihashmap_size (experiments), GNUNET_NO);
 }
 
+
 /**
  * Load experiments from file
  *
  * @param file source file
  */
-
 static void
 load_file (const char * file)
 {
@@ -223,12 +249,11 @@
                GNUNET_log (GNUNET_ERROR_TYPE_ERROR, _("Failed to parse file 
`%s'\n"), file);
                return;
        }
-
        GNUNET_CONFIGURATION_iterate_sections (exp, &exp_file_iterator, exp);
-
        GNUNET_CONFIGURATION_destroy (exp);
 }
 
+
 /**
  * Start experiments management
  */
@@ -309,12 +334,10 @@
        }
        load_file (file);
        GNUNET_free (file);
-
        return GNUNET_OK;
 }
 
 
-
 /**
  * Stop experiments management
  */




reply via email to

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