From: Timo Sirainen Date: Sun, 30 Jul 2023 15:32:13 +0000 (+0300) Subject: lib-http: Make http_client_request_error() public X-Git-Tag: 2.4.1~1386 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ee56a16759ef38f3711967ebcb82fbdc4f0614ff;p=thirdparty%2Fdovecot%2Fcore.git lib-http: Make http_client_request_error() public --- diff --git a/src/lib-http/http-client-private.h b/src/lib-http/http-client-private.h index efc9c377fb..391dd532be 100644 --- a/src/lib-http/http-client-private.h +++ b/src/lib-http/http-client-private.h @@ -510,8 +510,6 @@ void http_client_request_resubmit(struct http_client_request *req); void http_client_request_retry(struct http_client_request *req, unsigned int status, const char *error); void http_client_request_error_delayed(struct http_client_request **_req); -void http_client_request_error(struct http_client_request **req, - unsigned int status, const char *error); void http_client_request_redirect(struct http_client_request *req, unsigned int status, const char *location); void http_client_request_finish(struct http_client_request *req); diff --git a/src/lib-http/http-client.h b/src/lib-http/http-client.h index f3482968d3..976eda68d3 100644 --- a/src/lib-http/http-client.h +++ b/src/lib-http/http-client.h @@ -445,6 +445,10 @@ void http_client_request_submit(struct http_client_request *req); callback. It returns false if the request cannot be retried */ bool http_client_request_try_retry(struct http_client_request *req); +/* Fail the request. This can also be used instead of submitting the request to + cause the request callback to be called later on with the spcified error. */ +void http_client_request_error(struct http_client_request **req, + unsigned int status, const char *error); /* Abort the request immediately. It may still linger for a while when it is already sent to the service, but the callback will not be called anymore. */ void http_client_request_abort(struct http_client_request **req);