diff options
| author | Christian Grothoff <christian@grothoff.org> | 2021-11-25 13:37:47 +0100 |
|---|---|---|
| committer | Christian Grothoff <christian@grothoff.org> | 2021-11-25 13:37:47 +0100 |
| commit | 94012d011c3b2c3b3dcc9527d56d1814f42fcdc7 (patch) | |
| tree | 8b82cb011155f7a131ecaeb05301dfe8a1c718b7 /src/exchange/taler-exchange-httpd.c | |
| parent | 98549cdc5aff7081f20ccc53b566802020f6fdd9 (diff) | |
add invariant checks
Diffstat (limited to 'src/exchange/taler-exchange-httpd.c')
| -rw-r--r-- | src/exchange/taler-exchange-httpd.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/exchange/taler-exchange-httpd.c b/src/exchange/taler-exchange-httpd.c index fed9efd8..0a8798ae 100644 --- a/src/exchange/taler-exchange-httpd.c +++ b/src/exchange/taler-exchange-httpd.c @@ -290,8 +290,10 @@ handle_mhd_completion_callback (void *cls, return; GNUNET_async_scope_enter (&rc->async_scope_id, &old_scope); + TEH_check_invariants (); if (NULL != rc->rh_cleaner) rc->rh_cleaner (rc); + TEH_check_invariants (); { #if MHD_VERSION >= 0x00097304 const union MHD_ConnectionInfo *ci; @@ -931,6 +933,7 @@ handle_mhd_request (void *cls, /* We're in a new async scope! */ rc = *con_cls = GNUNET_new (struct TEH_RequestContext); GNUNET_async_scope_fresh (&rc->async_scope_id); + TEH_check_invariants (); rc->url = url; rc->connection = connection; /* We only read the correlation ID on the first callback for every client */ @@ -949,6 +952,7 @@ handle_mhd_request (void *cls, GNUNET_async_scope_enter (&rc->async_scope_id, &old_scope); + TEH_check_invariants (); if (NULL != correlation_id) GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Handling request (%s) for URL '%s', correlation_id=%s\n", @@ -1802,10 +1806,12 @@ run (void *cls, MHD_OPTION_NOTIFY_CONNECTION, &connection_done, NULL, - MHD_OPTION_LISTENING_ADDRESS_REUSE, - (unsigned int) allow_address_reuse, MHD_OPTION_CONNECTION_TIMEOUT, connection_timeout, + (0 == allow_address_reuse) + ? MHD_OPTION_END + : MHD_OPTION_LISTENING_ADDRESS_REUSE, + (unsigned int) allow_address_reuse, MHD_OPTION_END); if (NULL == mhd) { |
