diff options
author | Christian Grothoff <christian@grothoff.org> | 2015-03-24 12:00:40 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2015-03-24 12:00:40 +0100 |
commit | 7f79310aa153ae18f431d2b125dd91928c9ef03c (patch) | |
tree | e88dc4158f69e30acb78255712e265066a703710 | |
parent | 6e28917a45fbeafe4e6515af07bac9ee484fb86c (diff) | |
download | exchange-7f79310aa153ae18f431d2b125dd91928c9ef03c.tar.xz |
fix #3728
-rw-r--r-- | src/mint/plugin_mintdb_common.c | 35 | ||||
-rw-r--r-- | src/mint/taler_mintdb_plugin.h | 2 |
2 files changed, 33 insertions, 4 deletions
diff --git a/src/mint/plugin_mintdb_common.c b/src/mint/plugin_mintdb_common.c index e326c0f41..a95cf4be2 100644 --- a/src/mint/plugin_mintdb_common.c +++ b/src/mint/plugin_mintdb_common.c @@ -68,7 +68,15 @@ static void common_free_link_data_list (void *cls, struct LinkDataList *ldl) { - GNUNET_break (0); // FIXME (#3728) + struct LinkDataList *next; + + while (NULL != ldl) + { + next = ldl->next; + GNUNET_free (ldl->link_data_enc); + GNUNET_free (ldl); + ldl = next; + } } @@ -82,8 +90,29 @@ static void common_free_coin_transaction_list (void *cls, struct TALER_MINT_DB_TransactionList *list) { - // FIXME: implement! // FIXME (#3728) - GNUNET_break (0); + struct TALER_MINT_DB_TransactionList *next; + + while (NULL != list) + { + next = list->next; + + switch (list->type) + { + case TALER_MINT_DB_TT_DEPOSIT: + json_decref (list->details.deposit->wire); + GNUNET_free (list->details.deposit); + break; + case TALER_MINT_DB_TT_REFRESH_MELT: + GNUNET_free (list->details.melt); + break; + case TALER_MINT_DB_TT_LOCK: + GNUNET_free (list->details.lock); + /* FIXME: look at this again once locking is implemented (#3625) */ + break; + } + GNUNET_free (list); + list = next; + } } /* end of plugin_mintdb_common.c */ diff --git a/src/mint/taler_mintdb_plugin.h b/src/mint/taler_mintdb_plugin.h index b9c6bdfac..078238515 100644 --- a/src/mint/taler_mintdb_plugin.h +++ b/src/mint/taler_mintdb_plugin.h @@ -211,7 +211,7 @@ struct Deposit /** * Detailed wire information for executing the transaction. */ - const json_t *wire; + json_t *wire; /** * Merchant-generated transaction ID to detect duplicate |