#include "config.h"
#include "ws2tcpip.h"
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "winhttp.h"
#include "wine/debug.h"
#include "winhttp_private.h"
Go to the source code of this file.
◆ HANDLE_CHUNK_SIZE
#define HANDLE_CHUNK_SIZE 0x10 |
◆ addref_object()
Definition at line 49 of file handle.c.
50{
52 TRACE(
"%p -> refcount = %d\n",
hdr, refs);
54}
#define InterlockedIncrement
Referenced by alloc_handle(), grab_object(), WinHttpConnect(), WinHttpOpenRequest(), WinHttpQueryDataAvailable(), WinHttpReadData(), WinHttpReceiveResponse(), WinHttpSendRequest(), and WinHttpWriteData().
◆ alloc_handle()
Definition at line 88 of file handle.c.
89{
92
95
98 {
103 }
105 {
110 }
113
117
121}
static void list_init(struct list_entry *head)
static CRITICAL_SECTION handle_cs
#define HANDLE_CHUNK_SIZE
static struct object_header ** handles
static ULONG_PTR max_handles
struct object_header * addref_object(struct object_header *hdr)
static ULONG_PTR next_handle
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
◆ free_handle()
Definition at line 123 of file handle.c.
124{
128
130
132 {
135 {
137 TRACE(
"destroying handle 0x%lx for object %p\n",
handle + 1,
hdr);
140 }
141 }
142
144
146 {
148 {
149 TRACE(
"freeing child handle %p for parent handle 0x%lx\n",
child->handle,
handle + 1);
151 }
153 }
154
158
160}
BOOL free_handle(HINTERNET hinternet)
void release_object(struct object_header *hdr)
static unsigned __int64 next
#define LIST_FOR_EACH_ENTRY_SAFE(cursor, cursor2, list, type, field)
Referenced by free_handle(), pqInsert(), and WinHttpCloseHandle().
◆ grab_object()
Definition at line 56 of file handle.c.
Referenced by WinHttpAddRequestHeaders(), WinHttpCloseHandle(), WinHttpConnect(), WinHttpGetProxyForUrl(), WinHttpOpenRequest(), WinHttpQueryAuthSchemes(), WinHttpQueryDataAvailable(), WinHttpQueryHeaders(), WinHttpQueryOption(), WinHttpReadData(), WinHttpReceiveResponse(), WinHttpSendRequest(), WinHttpSetCredentials(), WinHttpSetOption(), WinHttpSetStatusCallback(), WinHttpSetTimeouts(), and WinHttpWriteData().
◆ release_object()
Definition at line 72 of file handle.c.
73{
75 TRACE(
"object %p refcount = %d\n",
hdr, refs);
76 if (!refs)
77 {
79
81
82 TRACE(
"destroying object %p\n",
hdr);
85 }
86}
#define InterlockedDecrement
static void list_remove(struct list_entry *entry)
void send_callback(struct object_header *hdr, DWORD status, void *info, DWORD buflen)
static void close_connection(void)
#define WINHTTP_HANDLE_TYPE_REQUEST
#define WINHTTP_HANDLE_TYPE_SESSION
#define WINHTTP_CALLBACK_STATUS_HANDLE_CLOSING
Referenced by connect_destroy(), free_handle(), request_destroy(), task_proc(), WinHttpAddRequestHeaders(), WinHttpCloseHandle(), WinHttpConnect(), WinHttpGetProxyForUrl(), WinHttpOpen(), WinHttpOpenRequest(), WinHttpQueryAuthSchemes(), WinHttpQueryDataAvailable(), WinHttpQueryHeaders(), WinHttpQueryOption(), WinHttpReadData(), WinHttpReceiveResponse(), WinHttpSendRequest(), WinHttpSetCredentials(), WinHttpSetOption(), WinHttpSetStatusCallback(), WinHttpSetTimeouts(), and WinHttpWriteData().
◆ WINE_DEFAULT_DEBUG_CHANNEL()
WINE_DEFAULT_DEBUG_CHANNEL |
( |
winhttp |
| ) |
|
◆ handle_cs
◆ handle_cs_debug
Initial value:=
{
0, 0, { (
ULONG_PTR)(__FILE__
": handle_cs") }
}
static CRITICAL_SECTION_DEBUG handle_cs_debug
LIST_ENTRY ProcessLocksList
Definition at line 37 of file handle.c.
◆ handles
◆ max_handles
◆ next_handle