const char *error);
static bool
http_client_host_is_idle(struct http_client_host *host);
+static void http_client_host_free_shared(struct http_client_host **_host);
/*
* Host (shared)
/* drop client sessions */
while (hshared->hosts_list != NULL) {
host = hshared->hosts_list;
- http_client_host_free(&host);
+ http_client_host_free_shared(&host);
}
event_unref(&hshared->event);
return host;
}
-void http_client_host_free(
- struct http_client_host **_host)
+static void http_client_host_free_shared(struct http_client_host **_host)
{
struct http_client_host *host = *_host;
struct http_client *client = host->client;
struct http_client_queue *const *queue_idx;
ARRAY_TYPE(http_client_queue) queues;
+ *_host = NULL;
+
e_debug(hshared->event, "Host session destroy");
DLLIST_REMOVE_FULL(&hshared->hosts_list,
array_free(&host->queues);
i_free(host);
+}
+
+void http_client_host_free(struct http_client_host **_host)
+{
+ struct http_client_host *host = *_host;
+ struct http_client_host_shared *hshared = host->shared;
+
+ http_client_host_free_shared(_host);
http_client_host_shared_check_idle(hshared);
- *_host = NULL;
}
static void