gnunet-svn
[Top][All Lists]
Advanced

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

[taler-exchange] branch master updated: rename constants


From: gnunet
Subject: [taler-exchange] branch master updated: rename constants
Date: Tue, 07 Apr 2020 13:09:24 +0200

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

grothoff pushed a commit to branch master
in repository exchange.

The following commit(s) were added to refs/heads/master by this push:
     new 64a8bb6a rename constants
64a8bb6a is described below

commit 64a8bb6a863efa5a2e6c813cc46478d077be2d8d
Author: Christian Grothoff <address@hidden>
AuthorDate: Tue Apr 7 13:09:22 2020 +0200

    rename constants
---
 src/lib/exchange_api_handle.c | 26 +++++++++++++-------------
 1 file changed, 13 insertions(+), 13 deletions(-)

diff --git a/src/lib/exchange_api_handle.c b/src/lib/exchange_api_handle.c
index 5c69ee97..ed12f6af 100644
--- a/src/lib/exchange_api_handle.c
+++ b/src/lib/exchange_api_handle.c
@@ -39,18 +39,18 @@
  * Which version of the Taler protocol is implemented
  * by this library?  Used to determine compatibility.
  */
-#define TALER_PROTOCOL_CURRENT 7
+#define EXCHANGE_PROTOCOL_CURRENT 7
 
 /**
  * How many versions are we backwards compatible with?
  */
-#define TALER_PROTOCOL_AGE 0
+#define EXCHANGE_PROTOCOL_AGE 0
 
 /**
  * Current version for (local) JSON serialization of persisted
  * /keys data.
  */
-#define TALER_SERIALIZATION_FORMAT_VERSION 0
+#define EXCHANGE_SERIALIZATION_FORMAT_VERSION 0
 
 
 /**
@@ -816,9 +816,6 @@ decode_keys_json (const json_t *resp_obj,
   struct TALER_ExchangeSignatureP sig;
   struct GNUNET_HashContext *hash_context;
   struct TALER_ExchangePublicKeyP pub;
-  unsigned int age;
-  unsigned int revision;
-  unsigned int current;
   struct GNUNET_JSON_Specification mspec[] = {
     GNUNET_JSON_spec_fixed_auto ("eddsa_sig",
                                  &sig),
@@ -843,6 +840,9 @@ decode_keys_json (const json_t *resp_obj,
   /* check the version */
   {
     const char *ver;
+    unsigned int age;
+    unsigned int revision;
+    unsigned int current;
     struct GNUNET_JSON_Specification spec[] = {
       GNUNET_JSON_spec_string ("version",
                                &ver),
@@ -867,16 +867,16 @@ decode_keys_json (const json_t *resp_obj,
       return GNUNET_SYSERR;
     }
     *vc = TALER_EXCHANGE_VC_MATCH;
-    if (TALER_PROTOCOL_CURRENT < current)
+    if (EXCHANGE_PROTOCOL_CURRENT < current)
     {
       *vc |= TALER_EXCHANGE_VC_NEWER;
-      if (TALER_PROTOCOL_CURRENT < current - age)
+      if (EXCHANGE_PROTOCOL_CURRENT < current - age)
         *vc |= TALER_EXCHANGE_VC_INCOMPATIBLE;
     }
-    if (TALER_PROTOCOL_CURRENT > current)
+    if (EXCHANGE_PROTOCOL_CURRENT > current)
     {
       *vc |= TALER_EXCHANGE_VC_OLDER;
-      if (TALER_PROTOCOL_CURRENT - TALER_PROTOCOL_AGE > current)
+      if (EXCHANGE_PROTOCOL_CURRENT - EXCHANGE_PROTOCOL_AGE > current)
         *vc |= TALER_EXCHANGE_VC_INCOMPATIBLE;
     }
     key_data->version = GNUNET_strdup (ver);
@@ -1317,8 +1317,8 @@ keys_completed_cb (void *cls,
                          aold->num_denom_keys);
       memcpy (anew->denom_keys,
               aold->denom_keys,
-              aold->num_denom_keys * sizeof (struct
-                                             
TALER_EXCHANGE_AuditorDenominationInfo));
+              aold->num_denom_keys
+              * sizeof (struct TALER_EXCHANGE_AuditorDenominationInfo));
     }
 
     /* Old auditors got just copied into new ones.  */
@@ -1868,7 +1868,7 @@ TALER_EXCHANGE_serialize_data (struct 
TALER_EXCHANGE_Handle *exchange)
   }
   return json_pack ("{s:I, s:o, s:s, s:o}",
                     "version",
-                    (json_int_t) TALER_SERIALIZATION_FORMAT_VERSION,
+                    (json_int_t) EXCHANGE_SERIALIZATION_FORMAT_VERSION,
                     "expire",
                     GNUNET_JSON_from_time_abs (exchange->key_data_expiration),
                     "exchange_url",

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



reply via email to

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