Skip to content

Commit

Permalink
doveadm-server: http: Moved client_connection_destroy_http().
Browse files Browse the repository at this point in the history
  • Loading branch information
stephanbosch committed Oct 24, 2017
1 parent e60c3e1 commit ee063d6
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions src/doveadm/client-connection-http.c
Expand Up @@ -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)
{
Expand All @@ -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)
Expand Down

0 comments on commit ee063d6

Please sign in to comment.