Commit a6edca34 authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

winhttp: Get rid of hostdata_t.

parent eb78033a
......@@ -179,7 +179,7 @@ static void set_blocking( netconn_t *conn, BOOL blocking )
ioctlsocket( conn->socket, FIONBIO, &state );
}
netconn_t *netconn_create( hostdata_t *host, const struct sockaddr_storage *sockaddr, int timeout )
netconn_t *netconn_create( struct hostdata *host, const struct sockaddr_storage *sockaddr, int timeout )
{
netconn_t *conn;
unsigned int addr_len;
......
......@@ -1487,7 +1487,7 @@ static CRITICAL_SECTION connection_pool_cs = { &connection_pool_debug, -1, 0, 0,
static struct list connection_pool = LIST_INIT( connection_pool );
void release_host( hostdata_t *host )
void release_host( struct hostdata *host )
{
LONG ref;
......@@ -1507,7 +1507,7 @@ static DWORD WINAPI connection_collector(void *arg)
{
unsigned int remaining_connections;
netconn_t *netconn, *next_netconn;
hostdata_t *host, *next_host;
struct hostdata *host, *next_host;
ULONGLONG now;
do
......@@ -1519,7 +1519,7 @@ static DWORD WINAPI connection_collector(void *arg)
EnterCriticalSection(&connection_pool_cs);
LIST_FOR_EACH_ENTRY_SAFE(host, next_host, &connection_pool, hostdata_t, entry)
LIST_FOR_EACH_ENTRY_SAFE(host, next_host, &connection_pool, struct hostdata, entry)
{
LIST_FOR_EACH_ENTRY_SAFE(netconn, next_netconn, &host->connections, netconn_t, entry)
{
......@@ -1617,7 +1617,7 @@ static BOOL ensure_cred_handle( session_t *session )
static BOOL open_connection( request_t *request )
{
BOOL is_secure = request->hdr.flags & WINHTTP_FLAG_SECURE;
hostdata_t *host = NULL, *iter;
struct hostdata *host = NULL, *iter;
netconn_t *netconn = NULL;
connect_t *connect;
WCHAR *addressW = NULL;
......@@ -1631,7 +1631,7 @@ static BOOL open_connection( request_t *request )
EnterCriticalSection( &connection_pool_cs );
LIST_FOR_EACH_ENTRY( iter, &connection_pool, hostdata_t, entry )
LIST_FOR_EACH_ENTRY( iter, &connection_pool, struct hostdata, entry )
{
if (iter->port == port && !strcmpW( connect->servername, iter->hostname ) && !is_secure == !iter->secure)
{
......
......@@ -65,14 +65,15 @@ struct object_header
struct list children;
};
typedef struct {
struct hostdata
{
struct list entry;
LONG ref;
WCHAR *hostname;
INTERNET_PORT port;
BOOL secure;
struct list connections;
} hostdata_t;
};
typedef struct
{
......@@ -116,7 +117,7 @@ typedef struct
int socket;
struct sockaddr_storage sockaddr;
BOOL secure; /* SSL active on connection? */
hostdata_t *host;
struct hostdata *host;
ULONGLONG keep_until;
CtxtHandle ssl_ctx;
SecPkgContext_StreamSizes ssl_sizes;
......@@ -270,7 +271,7 @@ void send_callback( struct object_header *, DWORD, LPVOID, DWORD ) DECLSPEC_HIDD
void close_connection( request_t * ) DECLSPEC_HIDDEN;
void netconn_close( netconn_t * ) DECLSPEC_HIDDEN;
netconn_t *netconn_create( hostdata_t *, const struct sockaddr_storage *, int ) DECLSPEC_HIDDEN;
netconn_t *netconn_create( struct hostdata *, const struct sockaddr_storage *, int ) DECLSPEC_HIDDEN;
void netconn_unload( void ) DECLSPEC_HIDDEN;
ULONG netconn_query_data_available( netconn_t * ) DECLSPEC_HIDDEN;
BOOL netconn_recv( netconn_t *, void *, size_t, int, int * ) DECLSPEC_HIDDEN;
......@@ -289,7 +290,7 @@ void destroy_cookies( session_t * ) DECLSPEC_HIDDEN;
BOOL set_server_for_hostname( connect_t *, LPCWSTR, INTERNET_PORT ) DECLSPEC_HIDDEN;
void destroy_authinfo( struct authinfo * ) DECLSPEC_HIDDEN;
void release_host( hostdata_t *host ) DECLSPEC_HIDDEN;
void release_host( struct hostdata *host ) DECLSPEC_HIDDEN;
extern HRESULT WinHttpRequest_create( void ** ) DECLSPEC_HIDDEN;
void release_typelib( void ) DECLSPEC_HIDDEN;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment