gnunet-svn
[Top][All Lists]
Advanced

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

[taler-anastasis] 02/02: Merge branch 'master' of ssh://git.taler.net/an


From: gnunet
Subject: [taler-anastasis] 02/02: Merge branch 'master' of ssh://git.taler.net/anastasis into master
Date: Wed, 14 Oct 2020 14:51:44 +0200

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

dennis-neufeld pushed a commit to branch master
in repository anastasis.

commit a42cf50dd09435f73d3affefd2bfac74cb20ab6e
Merge: b417535 51dfaef
Author: Dennis Neufeld <dennis.neufeld@students.bfh.ch>
AuthorDate: Wed Oct 14 14:51:18 2020 +0200

    Merge branch 'master' of ssh://git.taler.net/anastasis into master

 src/include/anastasis_service.h |  55 +-----
 src/lib/anastasis_api_config.c  |  46 +++++
 src/lib/anastasis_api_redux.c   | 403 ++++++++++++++++++++++------------------
 3 files changed, 275 insertions(+), 229 deletions(-)

diff --cc src/lib/anastasis_api_redux.c
index afc897f,7b80b0e..b6c2a80
--- a/src/lib/anastasis_api_redux.c
+++ b/src/lib/anastasis_api_redux.c
@@@ -28,45 -28,38 +28,72 @@@
  #include <taler/taler_json_lib.h>
  #include "anastasis_api_redux.h"
  
 +
 +#define GENERATE_STRING(STRING) #STRING,
 +static const char *generic_strings[] = {
 +  ANASTASIS_GENERIC_STATES (GENERATE_STRING)
 +};
 +#undef GENERATE_STRING
 +
 +
 +enum ANASTASIS_GenericState
 +ANASTASIS_generic_state_from_string (const char *state_string)
 +{
 +  for (enum ANASTASIS_GenericState i = 0;
 +       i < sizeof (generic_strings) / sizeof(*generic_strings);
 +       i++)
 +    if (0 == strcmp (state_string,
 +                     generic_strings[i]))
 +      return i;
 +  return ANASTASIS_GENERIC_STATE_ERROR;
 +}
 +
 +
 +const char *
 +ANASTASIS_generic_state_to_string (enum ANASTASIS_GenericState gs)
 +{
 +  if ( (gs < 0) ||
 +       (gs >= sizeof (generic_strings) / sizeof(*generic_strings)) )
 +  {
 +    GNUNET_break_op (0);
 +    return NULL;
 +  }
 +  return generic_strings[gs];
 +}
 +
 +
  /**
-  * Server information
+  * How long do we wait at most for a /config reply from an Anastasis provider.
+  * 60s is very generous, given the tiny bandwidth required, even for the most
+  * remote locations.
   */
- struct ServerInfo
+ #define CONFIG_TIMEOUT GNUNET_TIME_UNIT_MINUTES
+ 
+ 
+ struct SelectCountryHandle;
+ 
+ /**
+  * State for a "get config" operation.
+  */
+ struct ConfigRequest
  {
+ 
+   struct ConfigRequest *next;
+ 
+   struct ConfigRequest *prev;
+ 
+   struct SelectCountryHandle *sch;
+ 
+   /**
+    * Obtained status code.
+    */
+   unsigned int http_status;
+ 
+   /**
+    * The /config GET operation handle.
+    */
+   struct ANASTASIS_ConfigOperation *co;
+ 
    /**
     * URL of the anastasis backend.
     */

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

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