Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
d13fed31
Commit
d13fed31
authored
Feb 05, 2009
by
Francois Gouget
Committed by
Alexandre Julliard
Feb 05, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rsaenh: {alloc,release}_handle_table() are not used so remove them.
parent
678a0e1e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
85 deletions
+1
-85
handle.c
dlls/rsaenh/handle.c
+1
-83
handle.h
dlls/rsaenh/handle.h
+0
-2
No files found.
dlls/rsaenh/handle.c
View file @
d13fed31
...
...
@@ -44,10 +44,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(handle);
* lpTable [I] Pointer to the HANDLETABLE structure, which is to be initalized.
*
* NOTES
* Note that alloc_handle_table calls init_handle_table on it's own, which
* means that you only have to call init_handle_table, if you use a global
* variable of type HANDLETABLE for your handle table. However, in this
* case you have to call destroy_handle_table when you don't need the table
* You have to call destroy_handle_table when you don't need the table
* any more.
*/
void
init_handle_table
(
HANDLETABLE
*
lpTable
)
...
...
@@ -68,9 +65,6 @@ void init_handle_table(HANDLETABLE *lpTable)
*
* PARAMS
* lpTable [I] Pointer to the handle table, which is to be destroyed.
*
* NOTES
* Note that release_handle_table takes care of this.
*/
void
destroy_handle_table
(
HANDLETABLE
*
lpTable
)
{
...
...
@@ -124,82 +118,6 @@ exit:
}
/******************************************************************************
* release_all_handles
*
* Releases all valid handles in the given handle table and shrinks the table
* to zero size.
*
* PARAMS
* lpTable [I] The table of which all valid handles shall be released.
*/
static
void
release_all_handles
(
HANDLETABLE
*
lpTable
)
{
unsigned
int
i
;
TRACE
(
"(lpTable=%p)
\n
"
,
lpTable
);
EnterCriticalSection
(
&
lpTable
->
mutex
);
for
(
i
=
0
;
i
<
lpTable
->
iEntries
;
i
++
)
if
(
lpTable
->
paEntries
[
i
].
pObject
)
release_handle
(
lpTable
,
lpTable
->
paEntries
[
i
].
pObject
->
dwType
,
INDEX2HANDLE
(
i
));
LeaveCriticalSection
(
&
lpTable
->
mutex
);
}
/******************************************************************************
* alloc_handle_table
*
* Allocates a new handle table
*
* PARAMS
* lplpTable [O] Pointer to the variable, to which the pointer to the newly
* allocated handle table is written.
* RETURNS
* non zero, if successful
* zero, if not successful (out of process heap memory)
*
* NOTES
* If all you need is a single handle table, you may as well declare a global
* variable of type HANDLETABLE and call init_handle_table on your own.
*/
int
alloc_handle_table
(
HANDLETABLE
**
lplpTable
)
{
TRACE
(
"(lplpTable=%p)
\n
"
,
lplpTable
);
*
lplpTable
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
HANDLETABLE
));
if
(
*
lplpTable
)
{
init_handle_table
(
*
lplpTable
);
return
1
;
}
else
return
0
;
}
/******************************************************************************
* release_handle_table
*
* Releases a handle table and frees the resources it used.
*
* PARAMS
* lpTable [I] Pointer to the handle table, which is to be released.
*
* RETURNS
* non zero, if successful
* zero, if not successful
*
* NOTES
* All valid handles still in the table are released also.
*/
int
release_handle_table
(
HANDLETABLE
*
lpTable
)
{
TRACE
(
"(lpTable=%p)
\n
"
,
lpTable
);
release_all_handles
(
lpTable
);
destroy_handle_table
(
lpTable
);
return
HeapFree
(
GetProcessHeap
(),
0
,
lpTable
);
}
/******************************************************************************
* grow_handle_table [Internal]
*
* Grows the number of entries in the given table by TABLE_SIZE_INCREMENT
...
...
dlls/rsaenh/handle.h
View file @
d13fed31
...
...
@@ -56,9 +56,7 @@ typedef struct tagHANDLETABLE
CRITICAL_SECTION
mutex
;
}
HANDLETABLE
;
int
alloc_handle_table
(
HANDLETABLE
**
lplpTable
);
void
init_handle_table
(
HANDLETABLE
*
lpTable
);
int
release_handle_table
(
HANDLETABLE
*
lpTable
);
void
destroy_handle_table
(
HANDLETABLE
*
lpTable
);
int
release_handle
(
HANDLETABLE
*
lpTable
,
HCRYPTKEY
handle
,
DWORD
dwType
);
int
copy_handle
(
HANDLETABLE
*
lpTable
,
HCRYPTKEY
handle
,
DWORD
dwType
,
HCRYPTKEY
*
copy
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment