diff options
author | Christian Grothoff <christian@grothoff.org> | 2023-07-30 12:32:42 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2023-07-30 12:32:42 +0200 |
commit | b5cd1d1102e0c3e88604d5ba9d39090ddebc8b58 (patch) | |
tree | 0c6ed463fb712c0d75665d825f47eef1fb7e8476 /src/backend/taler-merchant-webhook.c | |
parent | 85a8cdb4f78336016b9dd8dabaf2afd536b8bb44 (diff) |
-remove _tuple suffix
Diffstat (limited to 'src/backend/taler-merchant-webhook.c')
-rw-r--r-- | src/backend/taler-merchant-webhook.c | 130 |
1 files changed, 65 insertions, 65 deletions
diff --git a/src/backend/taler-merchant-webhook.c b/src/backend/taler-merchant-webhook.c index d25965cc..721153fa 100644 --- a/src/backend/taler-merchant-webhook.c +++ b/src/backend/taler-merchant-webhook.c @@ -179,28 +179,28 @@ handle_webhook_response (void *cls, w->webhook_pending_serial); GNUNET_free (w); switch (qs) - { - case GNUNET_DB_STATUS_HARD_ERROR: - case GNUNET_DB_STATUS_SOFT_ERROR: - GNUNET_log (GNUNET_ERROR_TYPE_ERROR, - "Failed!\n"); - GNUNET_log (GNUNET_ERROR_TYPE_INFO, + { + case GNUNET_DB_STATUS_HARD_ERROR: + case GNUNET_DB_STATUS_SOFT_ERROR: + GNUNET_log (GNUNET_ERROR_TYPE_ERROR, + "Failed!\n"); + GNUNET_log (GNUNET_ERROR_TYPE_INFO, + "Delete returned: %d\n", + qs); + global_ret = EXIT_FAILURE; + GNUNET_SCHEDULER_shutdown (); + return; + case GNUNET_DB_STATUS_SUCCESS_ONE_RESULT: + GNUNET_log (GNUNET_ERROR_TYPE_INFO, + "Delete returned: %d\n", + qs); + return; + case GNUNET_DB_STATUS_SUCCESS_NO_RESULTS: + GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Delete returned: %d\n", qs); - global_ret = EXIT_FAILURE; - GNUNET_SCHEDULER_shutdown (); - return; - case GNUNET_DB_STATUS_SUCCESS_ONE_RESULT: - GNUNET_log (GNUNET_ERROR_TYPE_INFO, - "Delete returned: %d\n", - qs); - return; - case GNUNET_DB_STATUS_SUCCESS_NO_RESULTS: - GNUNET_log (GNUNET_ERROR_TYPE_INFO, - "Delete returned: %d\n", - qs); - return; - } + return; + } GNUNET_assert (0); } @@ -208,50 +208,51 @@ handle_webhook_response (void *cls, struct GNUNET_TIME_Relative next_attempt; enum GNUNET_DB_QueryStatus qs; switch (response_code) - { - case MHD_HTTP_BAD_REQUEST: - next_attempt = GNUNET_TIME_UNIT_FOREVER_REL; // never try again - break; - case MHD_HTTP_INTERNAL_SERVER_ERROR: - next_attempt = GNUNET_TIME_UNIT_MINUTES; - break; - case MHD_HTTP_FORBIDDEN: - next_attempt = GNUNET_TIME_UNIT_MINUTES; - break; - default: - next_attempt = GNUNET_TIME_UNIT_HOURS; - break; - } + { + case MHD_HTTP_BAD_REQUEST: + next_attempt = GNUNET_TIME_UNIT_FOREVER_REL; // never try again + break; + case MHD_HTTP_INTERNAL_SERVER_ERROR: + next_attempt = GNUNET_TIME_UNIT_MINUTES; + break; + case MHD_HTTP_FORBIDDEN: + next_attempt = GNUNET_TIME_UNIT_MINUTES; + break; + default: + next_attempt = GNUNET_TIME_UNIT_HOURS; + break; + } qs = db_plugin->update_pending_webhook (db_plugin->cls, w->webhook_pending_serial, - GNUNET_TIME_relative_to_absolute (next_attempt)); + GNUNET_TIME_relative_to_absolute ( + next_attempt)); GNUNET_free (w); switch (qs) - { - case GNUNET_DB_STATUS_HARD_ERROR: - case GNUNET_DB_STATUS_SOFT_ERROR: - GNUNET_log (GNUNET_ERROR_TYPE_ERROR, - "Failed!\n"); - GNUNET_log (GNUNET_ERROR_TYPE_INFO, + { + case GNUNET_DB_STATUS_HARD_ERROR: + case GNUNET_DB_STATUS_SOFT_ERROR: + GNUNET_log (GNUNET_ERROR_TYPE_ERROR, + "Failed!\n"); + GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Next in %s Rval: %d\n", GNUNET_TIME_relative2s (next_attempt, true), qs); - global_ret = EXIT_FAILURE; - GNUNET_SCHEDULER_shutdown (); - return; - case GNUNET_DB_STATUS_SUCCESS_ONE_RESULT: - GNUNET_log (GNUNET_ERROR_TYPE_INFO, - "Next in %s Rval: %d\n", - GNUNET_TIME_relative2s (next_attempt, true), - qs); - return; - case GNUNET_DB_STATUS_SUCCESS_NO_RESULTS: - GNUNET_log (GNUNET_ERROR_TYPE_INFO, - "Next in %s Rval: %d\n", - GNUNET_TIME_relative2s (next_attempt, true), - qs); - return; - } + global_ret = EXIT_FAILURE; + GNUNET_SCHEDULER_shutdown (); + return; + case GNUNET_DB_STATUS_SUCCESS_ONE_RESULT: + GNUNET_log (GNUNET_ERROR_TYPE_INFO, + "Next in %s Rval: %d\n", + GNUNET_TIME_relative2s (next_attempt, true), + qs); + return; + case GNUNET_DB_STATUS_SUCCESS_NO_RESULTS: + GNUNET_log (GNUNET_ERROR_TYPE_INFO, + "Next in %s Rval: %d\n", + GNUNET_TIME_relative2s (next_attempt, true), + qs); + return; + } GNUNET_assert (0); } } @@ -322,11 +323,11 @@ pending_webhooks_cb (void *cls, for (const char *tok = strtok (header_copy, "\n"); NULL != tok; tok = strtok (NULL, "\n")) - { - // extract all Key: value from 'header_copy'! - job_headers = curl_slist_append (job_headers, - tok); - } + { + // extract all Key: value from 'header_copy'! + job_headers = curl_slist_append (job_headers, + tok); + } GNUNET_free (header_copy); GNUNET_assert (CURLE_OK == curl_easy_setopt (eh, @@ -423,8 +424,6 @@ future_webhook_cb (void *cls, } - - static void select_work (void *cls) { @@ -455,7 +454,8 @@ select_work (void *cls) qs = db_plugin->lookup_future_webhook (db_plugin->cls, &future_webhook_cb, NULL); - switch (qs) { + switch (qs) + { case GNUNET_DB_STATUS_HARD_ERROR: case GNUNET_DB_STATUS_SOFT_ERROR: GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |