From 915270d77a6f176caae2660f53c8ac9f908156ef Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sat, 4 Jul 2015 21:34:50 +0200 Subject: [PATCH] more small bugfixes --- src/mint-lib/mint_api_admin.c | 10 ++++++---- src/mint-lib/mint_api_deposit.c | 7 ++++++- src/mint-lib/mint_api_withdraw.c | 14 ++++++++++++-- src/mint-lib/test_mint_api.c | 3 ++- src/mint/taler-mint-httpd_responses.c | 4 ---- 5 files changed, 26 insertions(+), 12 deletions(-) diff --git a/src/mint-lib/mint_api_admin.c b/src/mint-lib/mint_api_admin.c index 09cb3fa80..c35a9c5f0 100644 --- a/src/mint-lib/mint_api_admin.c +++ b/src/mint-lib/mint_api_admin.c @@ -115,9 +115,7 @@ handle_admin_add_incoming_finished (void *cls, json_error_t error; json_t *json; - fprintf (stderr, - "FINISHED AAI request\n"); - + aai->job = NULL; json = NULL; if (0 == aai->eno) { @@ -326,7 +324,11 @@ TALER_MINT_admin_add_incoming (struct TALER_MINT_Handle *mint, void TALER_MINT_admin_add_incoming_cancel (struct TALER_MINT_AdminAddIncomingHandle *aai) { - MAC_job_cancel (aai->job); + if (NULL != aai->job) + { + MAC_job_cancel (aai->job); + aai->job = NULL; + } curl_slist_free_all (aai->headers); GNUNET_free (aai->url); GNUNET_free (aai->json_enc); diff --git a/src/mint-lib/mint_api_deposit.c b/src/mint-lib/mint_api_deposit.c index 8c823bd01..ad828ea39 100644 --- a/src/mint-lib/mint_api_deposit.c +++ b/src/mint-lib/mint_api_deposit.c @@ -316,6 +316,7 @@ handle_deposit_finished (void *cls, json_error_t error; json_t *json; + dh->job = NULL; json = NULL; if (0 == dh->eno) { @@ -709,7 +710,11 @@ TALER_MINT_deposit (struct TALER_MINT_Handle *mint, void TALER_MINT_deposit_cancel (struct TALER_MINT_DepositHandle *deposit) { - MAC_job_cancel (deposit->job); + if (NULL != deposit->job) + { + MAC_job_cancel (deposit->job); + deposit->job = NULL; + } curl_slist_free_all (deposit->headers); GNUNET_free (deposit->url); GNUNET_free (deposit->json_enc); diff --git a/src/mint-lib/mint_api_withdraw.c b/src/mint-lib/mint_api_withdraw.c index c79f57dad..a7c302c75 100644 --- a/src/mint-lib/mint_api_withdraw.c +++ b/src/mint-lib/mint_api_withdraw.c @@ -297,6 +297,7 @@ handle_withdraw_status_finished (void *cls, json_error_t error; json_t *json; + wsh->job = NULL; json = NULL; if (0 == wsh->eno) { @@ -540,7 +541,11 @@ TALER_MINT_withdraw_status (struct TALER_MINT_Handle *mint, void TALER_MINT_withdraw_status_cancel (struct TALER_MINT_WithdrawStatusHandle *wsh) { - MAC_job_cancel (wsh->job); + if (NULL != wsh->job) + { + MAC_job_cancel (wsh->job); + wsh->job = NULL; + } GNUNET_free (wsh->url); GNUNET_free (wsh); } @@ -793,6 +798,7 @@ handle_withdraw_sign_finished (void *cls, json_error_t error; json_t *json; + wsh->job = NULL; json = NULL; if (0 == wsh->eno) { @@ -1067,7 +1073,11 @@ TALER_MINT_withdraw_sign (struct TALER_MINT_Handle *mint, void TALER_MINT_withdraw_sign_cancel (struct TALER_MINT_WithdrawSignHandle *sign) { - MAC_job_cancel (sign->job); + if (NULL != sign->job) + { + MAC_job_cancel (sign->job); + sign->job = NULL; + } curl_slist_free_all (sign->headers); GNUNET_free (sign->url); GNUNET_free (sign->json_enc); diff --git a/src/mint-lib/test_mint_api.c b/src/mint-lib/test_mint_api.c index cbcf83797..97e2eb8f0 100644 --- a/src/mint-lib/test_mint_api.c +++ b/src/mint-lib/test_mint_api.c @@ -382,7 +382,6 @@ interpreter_run (void *cls, { case OC_END: result = GNUNET_OK; - GNUNET_free (is); GNUNET_SCHEDULER_shutdown (); return; case OC_ADMIN_ADD_INCOMING: @@ -441,9 +440,11 @@ interpreter_run (void *cls, return; case OC_WITHDRAW_SIGN: GNUNET_break (0); // to be implemented! + is->ip++; break; case OC_DEPOSIT: GNUNET_break (0); // to be implemented! + is->ip++; break; default: GNUNET_log (GNUNET_ERROR_TYPE_ERROR, diff --git a/src/mint/taler-mint-httpd_responses.c b/src/mint/taler-mint-httpd_responses.c index 477db86ed..74ecd15d1 100644 --- a/src/mint/taler-mint-httpd_responses.c +++ b/src/mint/taler-mint-httpd_responses.c @@ -60,10 +60,6 @@ TMH_RESPONSE_reply_json (struct MHD_Connection *connection, ret = MHD_queue_response (connection, response_code, resp); - fprintf (stderr, - "Queued response %u (%d)\n", - response_code, - ret); MHD_destroy_response (resp); return ret; }