diff options
author | Özgür Kesim <oec-taler@kesim.org> | 2022-10-04 21:31:19 +0200 |
---|---|---|
committer | Özgür Kesim <oec-taler@kesim.org> | 2022-10-04 21:31:19 +0200 |
commit | 0a089db4ef9f6c50ec3e52a667dfb0f6a3c17c59 (patch) | |
tree | 89329045ede2c9451614708030f9fb2d1a9700ba /src | |
parent | 0ad6a8cbfb4e6181a8db3547c0af42b9e914f5fc (diff) |
rename auction_brandt -> policy_auction
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile.am | 2 | ||||
-rw-r--r-- | src/extensions/age_restriction/Makefile.am | 2 | ||||
-rw-r--r-- | src/extensions/policy_auction/Makefile.am (renamed from src/extensions/auction_brandt/Makefile.am) | 12 | ||||
-rw-r--r-- | src/extensions/policy_auction/policy_auction.c (renamed from src/extensions/auction_brandt/extension_auction_brandt.c) | 24 | ||||
-rw-r--r-- | src/include/taler_extensions.h | 11 | ||||
-rw-r--r-- | src/testing/test_exchange_auction.conf | 3 |
6 files changed, 26 insertions, 28 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index 82774061..9f064665 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -32,7 +32,7 @@ SUBDIRS = \ auditor \ lib \ exchange-tools \ - extensions/auction_brandt \ + extensions/policy_auction \ extensions/age_restriction \ testing \ benchmark diff --git a/src/extensions/age_restriction/Makefile.am b/src/extensions/age_restriction/Makefile.am index c81fd0b9..e90c1962 100644 --- a/src/extensions/age_restriction/Makefile.am +++ b/src/extensions/age_restriction/Makefile.am @@ -24,7 +24,7 @@ libtaler_extension_age_restriction_la_LDFLAGS = \ libtaler_extension_age_restriction_la_SOURCES = \ extension_age_restriction.c -libtaler_extension_auctionbrandt_la_LIBADD = \ +libtaler_extension_age_restriction_la_LIBADD = \ $(top_builddir)/src/json/libtalerjson.la \ $(top_builddir)/src/util/libtalerutil.la \ -lgnunetjson \ diff --git a/src/extensions/auction_brandt/Makefile.am b/src/extensions/policy_auction/Makefile.am index f616c164..cf44b95e 100644 --- a/src/extensions/auction_brandt/Makefile.am +++ b/src/extensions/policy_auction/Makefile.am @@ -11,21 +11,21 @@ if USE_COVERAGE endif -# Auction of Brandt type as extension library +# Auction of Brandt type as an extension library plugindir = $(libdir)/taler plugin_LTLIBRARIES = \ - libtaler_extension_auction_brandt.la + libtaler_extension_policy_auction.la -libtaler_extension_auction_brandt_la_LDFLAGS = \ +libtaler_extension_policy_auction_la_LDFLAGS = \ -version-info 0:0:0 \ -no-undefined -libtaler_extension_auction_brandt_la_SOURCES = \ - extension_auction_brandt.c +libtaler_extension_policy_auction_la_SOURCES = \ + policy_auction.c -libtaler_extension_auction_brandt_la_LIBADD = \ +libtaler_extension_policy_auction_la_LIBADD = \ $(top_builddir)/src/json/libtalerjson.la \ $(top_builddir)/src/util/libtalerutil.la \ -lgnunetjson \ diff --git a/src/extensions/auction_brandt/extension_auction_brandt.c b/src/extensions/policy_auction/policy_auction.c index 358c6b7c..d1c3237c 100644 --- a/src/extensions/auction_brandt/extension_auction_brandt.c +++ b/src/extensions/policy_auction/policy_auction.c @@ -14,8 +14,8 @@ TALER; see the file COPYING. If not, see <http://www.gnu.org/licenses/> */ /** - * @file extension_auction_brandt.c - * @brief Extension for replay of auctions of type brandt + * @file policy_auction.c + * @brief Extension for replay of auctions of type Brandt * @author Özgür Kesim */ #include "platform.h" @@ -26,8 +26,8 @@ #include "stdint.h" #include <microhttpd.h> -#define AUCTION_BRANDT "auction_brandt" -#define LOG_PREFIX "[auction_brandt] " +#define POLICY_AUCTION "policy_auction" +#define LOG_PREFIX "[policy_auction] " #define MAX_RESULT_SIZE 10 * 1024 /* Path to the replay program. */ @@ -622,8 +622,8 @@ auction_http_post_handler ( /* The extension struct for auctions of brandt-style */ struct TALER_Extension TE_auction_brandt = { - .type = TALER_Extension_AuctionBrandt, - .name = AUCTION_BRANDT, + .type = TALER_Extension_PolicyAuction, + .name = POLICY_AUCTION, .critical = false, .version = "0", .enabled = false, /* disabled per default */ @@ -639,8 +639,6 @@ struct TALER_Extension TE_auction_brandt = { }; -/* TODO: sql handler */ - /** * =========================================== * Handler for GNUNET_PLUGIN_load and _unload @@ -655,7 +653,7 @@ struct TALER_Extension TE_auction_brandt = { * @return Pointer to TE_auction_brandt */ struct TALER_Extension * -libtaler_extension_auction_brandt_init (void *arg) +libtaler_extension_policy_auction_init (void *arg) { const struct GNUNET_CONFIGURATION_Handle *cfg = arg; @@ -668,12 +666,12 @@ libtaler_extension_auction_brandt_init (void *arg) if (GNUNET_SYSERR == GNUNET_CONFIGURATION_get_value_string (cfg, TALER_EXTENSION_SECTION_PREFIX - AUCTION_BRANDT, + POLICY_AUCTION, "REPLAY_PROGRAM", &replay_program)) { GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR, - TALER_EXTENSION_SECTION_PREFIX AUCTION_BRANDT, + TALER_EXTENSION_SECTION_PREFIX POLICY_AUCTION, "REPLAY_PROGRAM"); return NULL; } @@ -720,7 +718,7 @@ libtaler_extension_auction_brandt_init (void *arg) * @return null */ void * -libtaler_extension_auction_brandt_done (void *arg) +libtaler_extension_policy_auction_done (void *arg) { auction_disable (&TE_auction_brandt); GNUNET_free (replay_program); @@ -730,4 +728,4 @@ libtaler_extension_auction_brandt_done (void *arg) } -/* end of extension_auction_brandt.c */ +/* end of policy_auction.c */ diff --git a/src/include/taler_extensions.h b/src/include/taler_extensions.h index 1ae8ad1e..f81b9653 100644 --- a/src/include/taler_extensions.h +++ b/src/include/taler_extensions.h @@ -31,12 +31,11 @@ enum TALER_Extension_Type { - TALER_Extension_Refund = 0, - TALER_Extension_AgeRestriction = 1, - TALER_Extension_P2P = 2, - TALER_Extension_AuctionBrandt = 3, - TALER_Extension_Escrow = 4, - TALER_Extension_MaxPredefined = 5 // Must be last of the predefined + TALER_Extension_AgeRestriction = 0, + TALER_Extension_PolicyRefund = 1, + TALER_Extension_PolicyAuction = 2, + TALER_Extension_PolicyEscrow = 3, + TALER_Extension_MaxPredefined = 4 // Must be last of the predefined }; diff --git a/src/testing/test_exchange_auction.conf b/src/testing/test_exchange_auction.conf index ee5ef7bc..89345d97 100644 --- a/src/testing/test_exchange_auction.conf +++ b/src/testing/test_exchange_auction.conf @@ -92,7 +92,8 @@ HTTP_PORT = 9081 # default age groups: #AGE_GROUPS = "8:10:12:14:16:18:21" -[exchange-extension-auction_brandt] +# Enable policy of type auction for deposits. +[exchange-extension-policy_auction] ENABLED = YES REPLAY_PROGRAM = "/usr/local/bin/taler-exchange-auction_brandt-replay" |