From: Stephan Bosch Date: Sat, 7 Oct 2017 15:07:58 +0000 (+0200) Subject: doveadm-server: http: Moved client_connection_destroy_http(). X-Git-Tag: 2.3.0.rc1~751 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ee063d66134c3ad0cec5e3919f7a0efe007406c6;p=thirdparty%2Fdovecot%2Fcore.git doveadm-server: http: Moved client_connection_destroy_http(). --- diff --git a/src/doveadm/client-connection-http.c b/src/doveadm/client-connection-http.c index 9731aa0410..aac00c3c91 100644 --- a/src/doveadm/client-connection-http.c +++ b/src/doveadm/client-connection-http.c @@ -116,6 +116,18 @@ static struct doveadm_http_server_mount doveadm_http_server_mounts[] = { static void doveadm_http_server_send_response(void *context); +void client_connection_destroy_http(struct client_connection *conn) +{ + struct client_connection_http *hconn = + (struct client_connection_http *)conn; + + if (hconn->http_client != NULL) { + /* We're not in the lib-http/server's connection destroy callback. */ + http_server_connection_close(&hconn->http_client, + "Server shutting down"); + } +} + struct client_connection * client_connection_http_create(int fd, bool ssl) { @@ -137,18 +149,6 @@ client_connection_http_create(int fd, bool ssl) return &conn->conn; } -void client_connection_destroy_http(struct client_connection *conn) -{ - struct client_connection_http *hconn = - (struct client_connection_http *)conn; - - if (hconn->http_client != NULL) { - /* We're not in the lib-http/server's connection destroy callback. */ - http_server_connection_close(&hconn->http_client, - "Server shutting down"); - } -} - static void doveadm_http_server_connection_destroy(void *context, const char *reason ATTR_UNUSED)