diff options
Diffstat (limited to 'src/exchangedb/plugin_exchangedb_common.c')
-rw-r--r-- | src/exchangedb/plugin_exchangedb_common.c | 61 |
1 files changed, 43 insertions, 18 deletions
diff --git a/src/exchangedb/plugin_exchangedb_common.c b/src/exchangedb/plugin_exchangedb_common.c index ca5903501..562710eaa 100644 --- a/src/exchangedb/plugin_exchangedb_common.c +++ b/src/exchangedb/plugin_exchangedb_common.c @@ -19,16 +19,14 @@ * included in each plugin. * @author Christian Grothoff */ +#include "platform.h" +#include "plugin_exchangedb_common.h" -/** - * Free memory associated with the given reserve history. - * - * @param cls the @e cls of this struct with the plugin-specific state (unused) - * @param rh history to free. - */ -static void -common_free_reserve_history (void *cls, - struct TALER_EXCHANGEDB_ReserveHistory *rh) + +void +TEH_COMMON_free_reserve_history ( + void *cls, + struct TALER_EXCHANGEDB_ReserveHistory *rh) { (void) cls; while (NULL != rh) @@ -87,6 +85,22 @@ common_free_reserve_history (void *cls, GNUNET_free (history); break; } + case TALER_EXCHANGEDB_RO_OPEN_REQUEST: + { + struct TALER_EXCHANGEDB_OpenRequest *or; + + or = rh->details.open_request; + GNUNET_free (or); + break; + } + case TALER_EXCHANGEDB_RO_CLOSE_REQUEST: + { + struct TALER_EXCHANGEDB_CloseRequest *cr; + + cr = rh->details.close_request; + GNUNET_free (cr); + break; + } } { struct TALER_EXCHANGEDB_ReserveHistory *next; @@ -99,15 +113,10 @@ common_free_reserve_history (void *cls, } -/** - * Free linked list of transactions. - * - * @param cls the @e cls of this struct with the plugin-specific state (unused) - * @param tl list to free - */ -static void -common_free_coin_transaction_list (void *cls, - struct TALER_EXCHANGEDB_TransactionList *tl) +void +TEH_COMMON_free_coin_transaction_list ( + void *cls, + struct TALER_EXCHANGEDB_TransactionList *tl) { (void) cls; while (NULL != tl) @@ -159,6 +168,22 @@ common_free_coin_transaction_list (void *cls, GNUNET_free (deposit); break; } + case TALER_EXCHANGEDB_TT_PURSE_REFUND: + { + struct TALER_EXCHANGEDB_PurseRefundListEntry *prefund; + + prefund = tl->details.purse_refund; + GNUNET_free (prefund); + break; + } + case TALER_EXCHANGEDB_TT_RESERVE_OPEN: + { + struct TALER_EXCHANGEDB_ReserveOpenListEntry *role; + + role = tl->details.reserve_open; + GNUNET_free (role); + break; + } } { struct TALER_EXCHANGEDB_TransactionList *next; |