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
06f5ee4b
Commit
06f5ee4b
authored
Oct 15, 2013
by
Jacek Caban
Committed by
Alexandre Julliard
Oct 15, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypt32: Store list entry directly in context_t.
parent
988e8a78
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
26 additions
and
50 deletions
+26
-50
collectionstore.c
dlls/crypt32/collectionstore.c
+0
-1
context.c
dlls/crypt32/context.c
+20
-45
crl.c
dlls/crypt32/crl.c
+1
-1
crypt32_private.h
dlls/crypt32/crypt32_private.h
+5
-0
provstore.c
dlls/crypt32/provstore.c
+0
-1
regstore.c
dlls/crypt32/regstore.c
+0
-1
store.c
dlls/crypt32/store.c
+0
-1
No files found.
dlls/crypt32/collectionstore.c
View file @
06f5ee4b
...
@@ -20,7 +20,6 @@
...
@@ -20,7 +20,6 @@
#include "winbase.h"
#include "winbase.h"
#include "wincrypt.h"
#include "wincrypt.h"
#include "wine/debug.h"
#include "wine/debug.h"
#include "wine/list.h"
#include "crypt32_private.h"
#include "crypt32_private.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
crypt
);
WINE_DEFAULT_DEBUG_CHANNEL
(
crypt
);
...
...
dlls/crypt32/context.c
View file @
06f5ee4b
...
@@ -21,7 +21,6 @@
...
@@ -21,7 +21,6 @@
#include "winbase.h"
#include "winbase.h"
#include "wincrypt.h"
#include "wincrypt.h"
#include "wine/debug.h"
#include "wine/debug.h"
#include "wine/list.h"
#include "crypt32_private.h"
#include "crypt32_private.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
context
);
WINE_DEFAULT_DEBUG_CHANNEL
(
context
);
...
@@ -163,50 +162,30 @@ struct ContextList *ContextList_Create(
...
@@ -163,50 +162,30 @@ struct ContextList *ContextList_Create(
return
list
;
return
list
;
}
}
static
inline
struct
list
*
ContextList_ContextToEntry
(
const
struct
ContextList
*
list
,
const
void
*
context
)
{
struct
list
*
ret
;
if
(
context
)
ret
=
Context_GetExtra
(
context
,
list
->
contextSize
);
else
ret
=
NULL
;
return
ret
;
}
static
inline
void
*
ContextList_EntryToContext
(
const
struct
ContextList
*
list
,
struct
list
*
entry
)
{
return
(
LPBYTE
)
entry
-
list
->
contextSize
;
}
void
*
ContextList_Add
(
struct
ContextList
*
list
,
void
*
toLink
,
void
*
toReplace
)
void
*
ContextList_Add
(
struct
ContextList
*
list
,
void
*
toLink
,
void
*
toReplace
)
{
{
context_t
*
context
;
context_t
*
context
;
TRACE
(
"(%p, %p, %p)
\n
"
,
list
,
toLink
,
toReplace
);
TRACE
(
"(%p, %p, %p)
\n
"
,
list
,
toLink
,
toReplace
);
context
=
Context_CreateLinkContext
(
list
->
contextSize
,
context_from_ptr
(
toLink
),
sizeof
(
struct
list
)
);
context
=
Context_CreateLinkContext
(
list
->
contextSize
,
context_from_ptr
(
toLink
),
0
);
if
(
context
)
if
(
context
)
{
{
struct
list
*
entry
=
ContextList_ContextToEntry
(
list
,
CONTEXT_FROM_BASE_CONTEXT
(
context
));
TRACE
(
"adding %p
\n
"
,
context
);
TRACE
(
"adding %p
\n
"
,
context
);
EnterCriticalSection
(
&
list
->
cs
);
EnterCriticalSection
(
&
list
->
cs
);
if
(
toReplace
)
if
(
toReplace
)
{
{
struct
list
*
existing
=
ContextList_ContextToEntry
(
list
,
toReplace
);
context_t
*
existing
=
context_from_ptr
(
toReplace
);
entry
->
prev
=
existing
->
prev
;
context
->
u
.
entry
.
prev
=
existing
->
u
.
entry
.
prev
;
entry
->
next
=
existing
->
next
;
context
->
u
.
entry
.
next
=
existing
->
u
.
entry
.
next
;
entry
->
prev
->
next
=
entry
;
context
->
u
.
entry
.
prev
->
next
=
&
context
->
u
.
entry
;
entry
->
next
->
prev
=
entry
;
context
->
u
.
entry
.
next
->
prev
=
&
context
->
u
.
entry
;
existing
->
prev
=
existing
->
next
=
existing
;
list_init
(
&
existing
->
u
.
entry
)
;
Context_Release
(
context_from_ptr
(
toReplace
));
Context_Release
(
context_from_ptr
(
toReplace
));
}
}
else
else
list_add_head
(
&
list
->
contexts
,
entry
);
list_add_head
(
&
list
->
contexts
,
&
context
->
u
.
entry
);
LeaveCriticalSection
(
&
list
->
cs
);
LeaveCriticalSection
(
&
list
->
cs
);
}
}
return
CONTEXT_FROM_BASE_CONTEXT
(
context
);
return
CONTEXT_FROM_BASE_CONTEXT
(
context
);
...
@@ -220,9 +199,7 @@ void *ContextList_Enum(struct ContextList *list, void *pPrev)
...
@@ -220,9 +199,7 @@ void *ContextList_Enum(struct ContextList *list, void *pPrev)
EnterCriticalSection
(
&
list
->
cs
);
EnterCriticalSection
(
&
list
->
cs
);
if
(
pPrev
)
if
(
pPrev
)
{
{
struct
list
*
prevEntry
=
ContextList_ContextToEntry
(
list
,
pPrev
);
listNext
=
list_next
(
&
list
->
contexts
,
&
context_from_ptr
(
pPrev
)
->
u
.
entry
);
listNext
=
list_next
(
&
list
->
contexts
,
prevEntry
);
Context_Release
(
context_from_ptr
(
pPrev
));
Context_Release
(
context_from_ptr
(
pPrev
));
}
}
else
else
...
@@ -231,7 +208,7 @@ void *ContextList_Enum(struct ContextList *list, void *pPrev)
...
@@ -231,7 +208,7 @@ void *ContextList_Enum(struct ContextList *list, void *pPrev)
if
(
listNext
)
if
(
listNext
)
{
{
ret
=
C
ontextList_EntryToContext
(
list
,
listNext
);
ret
=
C
ONTEXT_FROM_BASE_CONTEXT
(
LIST_ENTRY
(
listNext
,
context_t
,
u
.
entry
)
);
Context_AddRef
(
context_from_ptr
(
ret
));
Context_AddRef
(
context_from_ptr
(
ret
));
}
}
else
else
...
@@ -239,35 +216,33 @@ void *ContextList_Enum(struct ContextList *list, void *pPrev)
...
@@ -239,35 +216,33 @@ void *ContextList_Enum(struct ContextList *list, void *pPrev)
return
ret
;
return
ret
;
}
}
BOOL
ContextList_Remove
(
struct
ContextList
*
list
,
void
*
c
ontext
)
BOOL
ContextList_Remove
(
struct
ContextList
*
list
,
void
*
c
tx
)
{
{
struct
list
*
entry
=
ContextList_ContextToEntry
(
list
,
context
);
context_t
*
context
=
context_from_ptr
(
ctx
);
BOOL
inList
=
FALSE
;
BOOL
inList
=
FALSE
;
EnterCriticalSection
(
&
list
->
cs
);
EnterCriticalSection
(
&
list
->
cs
);
if
(
!
list_empty
(
entry
))
if
(
!
list_empty
(
&
context
->
u
.
entry
))
{
{
list_remove
(
entry
);
list_remove
(
&
context
->
u
.
entry
);
list_init
(
&
context
->
u
.
entry
);
inList
=
TRUE
;
inList
=
TRUE
;
}
}
LeaveCriticalSection
(
&
list
->
cs
);
LeaveCriticalSection
(
&
list
->
cs
);
if
(
inList
)
list_init
(
entry
);
return
inList
;
return
inList
;
}
}
static
void
ContextList_Empty
(
struct
ContextList
*
list
)
static
void
ContextList_Empty
(
struct
ContextList
*
list
)
{
{
struct
list
*
entry
,
*
next
;
context_t
*
context
,
*
next
;
EnterCriticalSection
(
&
list
->
cs
);
EnterCriticalSection
(
&
list
->
cs
);
LIST_FOR_EACH_
SAFE
(
entry
,
next
,
&
list
->
contexts
)
LIST_FOR_EACH_
ENTRY_SAFE
(
context
,
next
,
&
list
->
contexts
,
context_t
,
u
.
entry
)
{
{
const
void
*
context
=
ContextList_EntryToContext
(
list
,
entry
);
TRACE
(
"removing %p
\n
"
,
context
);
TRACE
(
"removing %p
\n
"
,
context
);
list_remove
(
entry
);
list_remove
(
&
context
->
u
.
entry
);
Context_Release
(
context
_from_ptr
(
context
)
);
Context_Release
(
context
);
}
}
LeaveCriticalSection
(
&
list
->
cs
);
LeaveCriticalSection
(
&
list
->
cs
);
}
}
...
...
dlls/crypt32/crl.c
View file @
06f5ee4b
...
@@ -343,7 +343,7 @@ PCCRL_CONTEXT WINAPI CertDuplicateCRLContext(PCCRL_CONTEXT pCrlContext)
...
@@ -343,7 +343,7 @@ PCCRL_CONTEXT WINAPI CertDuplicateCRLContext(PCCRL_CONTEXT pCrlContext)
return
pCrlContext
;
return
pCrlContext
;
}
}
BOOL
WINAPI
CertFreeCRLContext
(
PCCRL_CONTEXT
pCrlContext
)
BOOL
WINAPI
CertFreeCRLContext
(
PCCRL_CONTEXT
pCrlContext
)
{
{
BOOL
ret
=
TRUE
;
BOOL
ret
=
TRUE
;
...
...
dlls/crypt32/crypt32_private.h
View file @
06f5ee4b
...
@@ -19,6 +19,8 @@
...
@@ -19,6 +19,8 @@
#ifndef __CRYPT32_PRIVATE_H__
#ifndef __CRYPT32_PRIVATE_H__
#define __CRYPT32_PRIVATE_H__
#define __CRYPT32_PRIVATE_H__
#include "wine/list.h"
/* a few asn.1 tags we need */
/* a few asn.1 tags we need */
#define ASN_BOOL (ASN_UNIVERSAL | ASN_PRIMITIVE | 0x01)
#define ASN_BOOL (ASN_UNIVERSAL | ASN_PRIMITIVE | 0x01)
#define ASN_BITSTRING (ASN_UNIVERSAL | ASN_PRIMITIVE | 0x03)
#define ASN_BITSTRING (ASN_UNIVERSAL | ASN_PRIMITIVE | 0x03)
...
@@ -170,6 +172,9 @@ typedef struct _context_t {
...
@@ -170,6 +172,9 @@ typedef struct _context_t {
LONG
ref
;
LONG
ref
;
struct
_context_t
*
linked
;
struct
_context_t
*
linked
;
CONTEXT_PROPERTY_LIST
*
properties
;
CONTEXT_PROPERTY_LIST
*
properties
;
union
{
struct
list
entry
;
}
u
;
}
BASE_CONTEXT
;
}
BASE_CONTEXT
;
static
inline
context_t
*
context_from_ptr
(
const
void
*
ptr
)
static
inline
context_t
*
context_from_ptr
(
const
void
*
ptr
)
...
...
dlls/crypt32/provstore.c
View file @
06f5ee4b
...
@@ -20,7 +20,6 @@
...
@@ -20,7 +20,6 @@
#include "winbase.h"
#include "winbase.h"
#include "wincrypt.h"
#include "wincrypt.h"
#include "wine/debug.h"
#include "wine/debug.h"
#include "wine/list.h"
#include "crypt32_private.h"
#include "crypt32_private.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
crypt
);
WINE_DEFAULT_DEBUG_CHANNEL
(
crypt
);
...
...
dlls/crypt32/regstore.c
View file @
06f5ee4b
...
@@ -23,7 +23,6 @@
...
@@ -23,7 +23,6 @@
#include "winreg.h"
#include "winreg.h"
#include "winuser.h"
#include "winuser.h"
#include "wine/debug.h"
#include "wine/debug.h"
#include "wine/list.h"
#include "crypt32_private.h"
#include "crypt32_private.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
crypt
);
WINE_DEFAULT_DEBUG_CHANNEL
(
crypt
);
...
...
dlls/crypt32/store.c
View file @
06f5ee4b
...
@@ -35,7 +35,6 @@
...
@@ -35,7 +35,6 @@
#include "winuser.h"
#include "winuser.h"
#include "wincrypt.h"
#include "wincrypt.h"
#include "wine/debug.h"
#include "wine/debug.h"
#include "wine/list.h"
#include "wine/exception.h"
#include "wine/exception.h"
#include "crypt32_private.h"
#include "crypt32_private.h"
...
...
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