gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [taler-exchange] branch master updated (a249d58 -> f7deeac)


From: gnunet
Subject: [GNUnet-SVN] [taler-exchange] branch master updated (a249d58 -> f7deeac)
Date: Sat, 26 May 2018 10:51:47 +0200

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

marcello pushed a change to branch master
in repository exchange.

    from a249d58  Commenting the "bank check" CMD.
     new cdd4294  Command "withdraw" CMD.
     new 69f05ae  Commenting the "auditor sign" CMD.
     new effa3db  Commenting the "keyup" CMD.
     new 199bca5  Commenting the "wirewatch" CMD.
     new a53e825  Commenting the "aggregator" CMD
     new f7deeac  minor edit

The 6 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 src/exchange-lib/testing_api_cmd_exec_aggregator.c | 45 +++++++++-------
 .../testing_api_cmd_exec_auditor-sign.c            | 42 ++++++++-------
 src/exchange-lib/testing_api_cmd_exec_keyup.c      | 44 ++++++++--------
 src/exchange-lib/testing_api_cmd_exec_wirewatch.c  | 48 ++++++++---------
 .../testing_api_cmd_fakebank_transfer.c            |  6 +--
 src/exchange-lib/testing_api_cmd_withdraw.c        | 61 +++++++++++++---------
 6 files changed, 131 insertions(+), 115 deletions(-)

diff --git a/src/exchange-lib/testing_api_cmd_exec_aggregator.c 
b/src/exchange-lib/testing_api_cmd_exec_aggregator.c
index 8d2131b..0de9669 100644
--- a/src/exchange-lib/testing_api_cmd_exec_aggregator.c
+++ b/src/exchange-lib/testing_api_cmd_exec_aggregator.c
@@ -30,31 +30,30 @@
 #include "taler_testing_lib.h"
 
 
+/**
+ * State for a "aggregator" CMD.
+ */
 struct AggregatorState
 {
 
   /**
-   * Process for the aggregator.
+   * Aggregator process.
    */
   struct GNUNET_OS_Process *aggregator_proc;
 
   /**
-   * Which configuration file should we pass to the process?
+   * Configuration file used by the aggregator.
    */
   const char *config_filename;
-
 };
 
 
 /**
- * Runs the command.  Note that upon return, the interpreter
- * will not automatically run the next command, as the command
- * may continue asynchronously in other scheduler tasks.  Thus,
- * the command must ensure to eventually call
- * #TALER_TESTING_interpreter_next() or
- * #TALER_TESTING_interpreter_fail().
+ * Run the command.  Use the `taler-exchange-aggregator' program.
  *
- * @param is interpreter state
+ * @param cls closure.
+ * @param cmd command being run.
+ * @param is interpreter state.
  */
 static void
 aggregator_run (void *cls,
@@ -83,10 +82,11 @@ aggregator_run (void *cls,
 
 
 /**
- * Clean up after the command.  Run during forced termination
- * (CTRL-C) or test failure or test success.
+ * Free the state of a "aggregator" CMD, and possibly kill its
+ * process if it did not terminate correctly.
  *
- * @param cls closure
+ * @param cls closure.
+ * @param cmd the command being freed.
  */
 static void
 aggregator_cleanup (void *cls,
@@ -108,15 +108,15 @@ aggregator_cleanup (void *cls,
 
 
 /**
- * Extract information from a command that is useful for other
- * commands.
+ * Offer "aggregator" CMD internal data to other commands.
  *
- * @param cls closure
- * @param ret[out] result (could be anything)
- * @param trait name of the trait
+ * @param cls closure.
+ * @param ret[out] result (could be anything).
+ * @param trait name of the trait.
  * @param selector more detailed information about which object
  *                 to return in case there were multiple generated
- *                 by the command
+ *                 by the command.
+ *
  * @return #GNUNET_OK on success
  */
 static int
@@ -139,8 +139,13 @@ aggregator_traits (void *cls,
 
 
 /**
- * Execute taler-exchange-wirewatch process.
+ * Make a "aggregator" CMD.
+ *
+ * @param label command label.
+ * @param config_filename configuration file for the
+ *                        aggregator to use.
  *
+ * @return the command.
  */
 struct TALER_TESTING_Command
 TALER_TESTING_cmd_exec_aggregator (const char *label,
diff --git a/src/exchange-lib/testing_api_cmd_exec_auditor-sign.c 
b/src/exchange-lib/testing_api_cmd_exec_auditor-sign.c
index 98ce116..eed1fcb 100644
--- a/src/exchange-lib/testing_api_cmd_exec_auditor-sign.c
+++ b/src/exchange-lib/testing_api_cmd_exec_auditor-sign.c
@@ -30,16 +30,20 @@
 #include "taler_testing_lib.h"
 
 
+
+/**
+ * State for a "auditor sign" CMD.
+ */
 struct AuditorSignState
 {
 
   /**
-   * Process for the "auditor sign" command.
+   * Handle to the process making the signature.
    */
   struct GNUNET_OS_Process *auditor_sign_proc;
 
   /**
-   * Which configuration file should we pass to the process?
+   * Configuration file used by the command.
    */
   const char *config_filename;
 
@@ -47,14 +51,11 @@ struct AuditorSignState
 
 
 /**
- * Runs the command.  Note that upon return, the interpreter
- * will not automatically run the next command, as the command
- * may continue asynchronously in other scheduler tasks.  Thus,
- * the command must ensure to eventually call
- * #TALER_TESTING_interpreter_next() or
- * #TALER_TESTING_interpreter_fail().
+ * Run the command; calls the `taler-auditor-sign' program.
  *
- * @param is interpreter state
+ * @param cls closure.
+ * @param cmd the command.
+ * @param is interpreter state.
  */
 static void
 auditor_sign_run (void *cls,
@@ -139,10 +140,11 @@ auditor_sign_run (void *cls,
 
 
 /**
- * Clean up after the command.  Run during forced termination
- * (CTRL-C) or test failure or test success.
+ * Free the state of a "auditor sign" CMD, and possibly
+ * kill its process if it did not terminate correctly.
  *
- * @param cls closure
+ * @param cls closure.
+ * @param cmd the command being freed.
  */
 static void
 auditor_sign_cleanup (void *cls,
@@ -163,16 +165,16 @@ auditor_sign_cleanup (void *cls,
 
 
 /**
- * Extract information from a command that is useful for other
- * commands.
+ * Offer "auditor sign" CMD internal data to other commands.
  *
- * @param cls closure
- * @param ret[out] result (could be anything)
- * @param trait name of the trait
+ * @param cls closure.
+ * @param ret[out] result (could be anything).
+ * @param trait name of the trait.
  * @param selector more detailed information about which object
  *                 to return in case there were multiple generated
- *                 by the command
- * @return #GNUNET_OK on success
+ *                 by the command.
+ *
+ * @return #GNUNET_OK on success.
  */
 static int
 auditor_sign_traits (void *cls,
@@ -194,7 +196,7 @@ auditor_sign_traits (void *cls,
 
 
 /**
- * Execute taler-auditor-sign process.
+ * Make a "auditor sign" CMD.
  *
  * @param label command label
  * @param config_filename configuration filename
diff --git a/src/exchange-lib/testing_api_cmd_exec_keyup.c 
b/src/exchange-lib/testing_api_cmd_exec_keyup.c
index 9398dd4..6b2c81e 100644
--- a/src/exchange-lib/testing_api_cmd_exec_keyup.c
+++ b/src/exchange-lib/testing_api_cmd_exec_keyup.c
@@ -31,6 +31,9 @@
 #include "taler_testing_lib.h"
 
 
+/**
+ * State for a "keyup" CMD.
+ */
 struct KeyupState
 {
 
@@ -40,22 +43,18 @@ struct KeyupState
   struct GNUNET_OS_Process *keyup_proc;
 
   /**
-   * Which configuration file should we pass to the process?
+   * Configuration file used by the command.
    */
   const char *config_filename;
-
 };
 
 
 /**
- * Runs the command.  Note that upon return, the interpreter
- * will not automatically run the next command, as the command
- * may continue asynchronously in other scheduler tasks.  Thus,
- * the command must ensure to eventually call
- * #TALER_TESTING_interpreter_next() or
- * #TALER_TESTING_interpreter_fail().
+ * Run the command; calls the `taler-exchange-keyup' program.
  *
- * @param is interpreter state
+ * @param cls closure.
+ * @param cmd the commaind being run.
+ * @param is interpreter state.
  */
 static void
 keyup_run (void *cls,
@@ -85,10 +84,11 @@ keyup_run (void *cls,
 
 
 /**
- * Clean up after the command.  Run during forced termination
- * (CTRL-C) or test failure or test success.
+ * Free the state of a "keyup" CMD, and possibly kills its
+ * process if it did not terminate correctly.
  *
- * @param cls closure
+ * @param cls closure.
+ * @param cmd the command being freed.
  */
 static void
 keyup_cleanup (void *cls,
@@ -110,16 +110,16 @@ keyup_cleanup (void *cls,
 
 
 /**
- * Extract information from a command that is useful for other
- * commands.
+ * Offer "keyup" CMD internal data to other commands.
  *
- * @param cls closure
- * @param ret[out] result (could be anything)
- * @param trait name of the trait
+ * @param cls closure.
+ * @param ret[out] result (could be anything).
+ * @param trait name of the trait.
  * @param selector more detailed information about which object
  *                 to return in case there were multiple generated
- *                 by the command
- * @return #GNUNET_OK on success
+ *                 by the command.
+ *
+ * @return #GNUNET_OK on success.
  */
 static int
 keyup_traits (void *cls,
@@ -141,10 +141,10 @@ keyup_traits (void *cls,
 
 
 /**
- * Execute taler-exchange-keyup process.
+ * Make the "keyup" CMD.
  *
- * @param label command label
- * @param config_filename configuration filename
+ * @param label command label.
+ * @param config_filename configuration filename.
  *
  * @return the command.
  */
diff --git a/src/exchange-lib/testing_api_cmd_exec_wirewatch.c 
b/src/exchange-lib/testing_api_cmd_exec_wirewatch.c
index fd8404b..989dae0 100644
--- a/src/exchange-lib/testing_api_cmd_exec_wirewatch.c
+++ b/src/exchange-lib/testing_api_cmd_exec_wirewatch.c
@@ -28,6 +28,10 @@
 #include "taler_testing_lib.h"
 
 
+
+/**
+ * State for a "wirewatch" CMD.
+ */
 struct WirewatchState
 {
 
@@ -37,22 +41,17 @@ struct WirewatchState
   struct GNUNET_OS_Process *wirewatch_proc;
 
   /**
-   * Which configuration file should we pass to the process?
+   * Configuration file used by the wirewatcher.
    */
   const char *config_filename;
-
 };
 
-
 /**
- * Runs the command.  Note that upon return, the interpreter
- * will not automatically run the next command, as the command
- * may continue asynchronously in other scheduler tasks.  Thus,
- * the command must ensure to eventually call
- * #TALER_TESTING_interpreter_next() or
- * #TALER_TESTING_interpreter_fail().
+ * Run the command; use the `taler-exchange-wirewatch' program.
  *
- * @param is interpreter state
+ * @param cls closure.
+ * @param cmd command currently being executed.
+ * @param is interpreter state.
  */
 static void
 wirewatch_run (void *cls,
@@ -81,10 +80,11 @@ wirewatch_run (void *cls,
 
 
 /**
- * Clean up after the command.  Run during forced termination
- * (CTRL-C) or test failure or test success.
+ * Free the state of a "wirewatch" CMD, and possibly
+ * kills its process if it did not terminate regularly.
  *
- * @param cls closure
+ * @param cls closure.
+ * @param cmd the command being freed.
  */
 static void
 wirewatch_cleanup (void *cls,
@@ -106,16 +106,16 @@ wirewatch_cleanup (void *cls,
 
 
 /**
- * Extract information from a command that is useful for other
- * commands.
+ * Offer "wirewatch" CMD internal data to other commands.
  *
- * @param cls closure
- * @param ret[out] result (could be anything)
- * @param trait name of the trait
+ * @param cls closure.
+ * @param ret[out] result (could be anything).
+ * @param trait name of the trait.
  * @param selector more detailed information about which object
  *                 to return in case there were multiple generated
- *                 by the command
- * @return #GNUNET_OK on success
+ *                 by the command.
+ *
+ * @return #GNUNET_OK on success.
  */
 static int
 wirewatch_traits (void *cls,
@@ -138,12 +138,12 @@ wirewatch_traits (void *cls,
 
 
 /**
- * Execute taler-exchange-wirewatch process.
+ * Make a "wirewatch" CMD.
  *
- * @param label command label
- * @param config_filename configuration filename
+ * @param label command label.
+ * @param config_filename configuration filename.
  *
- * @return the command
+ * @return the command.
  */
 struct TALER_TESTING_Command
 TALER_TESTING_cmd_exec_wirewatch (const char *label,
diff --git a/src/exchange-lib/testing_api_cmd_fakebank_transfer.c 
b/src/exchange-lib/testing_api_cmd_fakebank_transfer.c
index 733ceb4..0b0734b 100644
--- a/src/exchange-lib/testing_api_cmd_fakebank_transfer.c
+++ b/src/exchange-lib/testing_api_cmd_fakebank_transfer.c
@@ -34,7 +34,7 @@
 #include "taler_testing_bank_lib.h"
 
 /**
- *
+ * State for a "fakebank transfer" CMD.
  */
 struct FakebankTransferState
 {
@@ -90,7 +90,7 @@ struct FakebankTransferState
   struct TALER_ReservePrivateKeyP reserve_priv;
 
   /**
-   * Set to the API's handle during the operation.
+   * Handle to the pending request at the fakebank.
    */
   struct TALER_BANK_AdminAddIncomingHandle *aih;
 
@@ -105,7 +105,7 @@ struct FakebankTransferState
   uint64_t serial_id;
 
   /**
-   * Exchange URL.
+   * Exchange URL.  FIXME: explaing this data purpose.
    */
   const char *exchange_url;
 
diff --git a/src/exchange-lib/testing_api_cmd_withdraw.c 
b/src/exchange-lib/testing_api_cmd_withdraw.c
index 8ab5e1d..456ac6b 100644
--- a/src/exchange-lib/testing_api_cmd_withdraw.c
+++ b/src/exchange-lib/testing_api_cmd_withdraw.c
@@ -30,6 +30,10 @@
 #include "taler_testing_lib.h"
 
 
+
+/**
+ * State for a "withdraw" CMD.
+ */
 struct WithdrawState
 {
 
@@ -92,17 +96,15 @@ struct WithdrawState
 
 
 /**
- * Function called upon completion of our /reserve/withdraw
- * request.
+ * "reserve withdraw" operation callback; checks that the
+ * response code is expected and store the exchange signature
+ * in the state.
  *
- * @param cls closure with the withdraw state
- * @param http_status HTTP response code, #MHD_HTTP_OK (200) for
- *        successful status request; 0 if the exchange's reply is
- *        bogus (fails to follow the protocol)
- * @param ec taler-specific error code, #TALER_EC_NONE on success
- * @param sig signature over the coin, NULL on error
- * @param full_response full response from the exchange (for
- *        logging, in case of errors)
+ * @param cls closure.
+ * @param http_status HTTP response code.
+ * @param ec taler-specific error code.
+ * @param sig signature over the coin, NULL on error.
+ * @param full_response raw response.
  */
 static void
 reserve_withdraw_cb (void *cls,
@@ -156,14 +158,11 @@ reserve_withdraw_cb (void *cls,
 
 
 /**
- * Runs the command.  Note that upon return, the interpreter
- * will not automatically run the next command, as the command
- * may continue asynchronously in other scheduler tasks.  Thus,
- * the command must ensure to eventually call
- * #TALER_TESTING_interpreter_next() or
- * #TALER_TESTING_interpreter_fail().
+ * Run the command.
  *
- * @param is interpreter state
+ * @param cls closure.
+ * @param cmd the commaind being run.
+ * @param is interpreter state.
  */
 static void
 withdraw_run (void *cls,
@@ -210,10 +209,11 @@ withdraw_run (void *cls,
 
 
 /**
- * Clean up after the command.  Run during forced termination
- * (CTRL-C) or test failure or test success.
+ * Free the state of a "withdraw" CMD, and possibly cancel
+ * a pending operation thereof.
  *
- * @param cls closure
+ * @param cls closure.
+ * @param cmd the command being freed.
  */
 static void
 withdraw_cleanup (void *cls,
@@ -240,7 +240,7 @@ withdraw_cleanup (void *cls,
 
 
 /**
- * Extract information from a command that is useful for other
+ * Offer internal data to a "withdraw" CMD state to other
  * commands.
  *
  * @param cls closure
@@ -249,6 +249,7 @@ withdraw_cleanup (void *cls,
  * @param selector more detailed information about which object
  *                 to return in case there were multiple generated
  *                 by the command
+ *
  * @return #GNUNET_OK on success
  */
 static int
@@ -307,10 +308,10 @@ withdraw_traits (void *cls,
 
 
 /**
- * Create a withdraw command.
+ * Create a withdraw command, letting the caller specify
+ * the desired amount as string.
  *
- * @param label command label, used by other commands to
- *        reference this.
+ * @param label command label.
  * @param exchange handle to the exchange.
  * @param amount how much we withdraw.
  * @param expected_response_code which HTTP response code
@@ -366,8 +367,17 @@ TALER_TESTING_cmd_withdraw_amount
 
 
 /**
- * Create withdraw command.
+ * Create withdraw command, letting the caller specify the
+ * amount by a denomination key.
+ *
+ * @param label command label.
+ * @param exchange connection handle to the exchange.
+ * @param reserve_reference reference to the reserve to withdraw
+ *        from; will provide reserve priv to sign the request.
+ * @param dk denomination public key.
+ * @param expected_response_code expected HTTP response code.
  *
+ * @return the command.
  */
 struct TALER_TESTING_Command
 TALER_TESTING_cmd_withdraw_denomination
@@ -402,5 +412,4 @@ TALER_TESTING_cmd_withdraw_denomination
   return cmd;
 }
 
-
 /* end of testing_api_cmd_withdraw.c */

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



reply via email to

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