From: Timo Sirainen Date: Fri, 15 Dec 2017 12:10:43 +0000 (+0200) Subject: lib-http: Change http_client_init() to use the global shared client context X-Git-Tag: 2.3.9~2656 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e7bc4ce82122c30696e60789432ffeb2e26b265b;p=thirdparty%2Fdovecot%2Fcore.git lib-http: Change http_client_init() to use the global shared client context This is most likely what is usually wanted. --- diff --git a/src/lib-http/http-client.c b/src/lib-http/http-client.c index 35fd347359..f3c2a605f7 100644 --- a/src/lib-http/http-client.c +++ b/src/lib-http/http-client.c @@ -209,7 +209,7 @@ http_client_init_shared(struct http_client_context *cctx, struct http_client * http_client_init(const struct http_client_settings *set) { - return http_client_init_shared(NULL, set); + return http_client_init_shared(http_client_get_global_context(), set); } void http_client_deinit(struct http_client **_client) diff --git a/src/lib-http/http-client.h b/src/lib-http/http-client.h index 234cd577c7..f4a0f4f813 100644 --- a/src/lib-http/http-client.h +++ b/src/lib-http/http-client.h @@ -422,6 +422,7 @@ void http_client_request_start_tunnel(struct http_client_request *req, * Client */ +/* Create a client using the global shared client context. */ struct http_client * http_client_init(const struct http_client_settings *set); struct http_client *