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
fc97dec8
Commit
fc97dec8
authored
Jul 25, 2007
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Check existing dependencies in activation context before adding a new one.
parent
d0b21abe
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
49 additions
and
1 deletion
+49
-1
actctx.c
dlls/ntdll/actctx.c
+49
-1
No files found.
dlls/ntdll/actctx.c
View file @
fc97dec8
...
@@ -394,10 +394,58 @@ static void free_entity_array(struct entity_array *array)
...
@@ -394,10 +394,58 @@ static void free_entity_array(struct entity_array *array)
RtlFreeHeap
(
GetProcessHeap
(),
0
,
array
->
base
);
RtlFreeHeap
(
GetProcessHeap
(),
0
,
array
->
base
);
}
}
static
BOOL
is_matching_string
(
const
WCHAR
*
str1
,
const
WCHAR
*
str2
)
{
if
(
!
str1
)
return
!
str2
;
return
str2
&&
!
strcmpiW
(
str1
,
str2
);
}
static
BOOL
is_matching_identity
(
const
struct
assembly_identity
*
id1
,
const
struct
assembly_identity
*
id2
)
{
if
(
!
is_matching_string
(
id1
->
name
,
id2
->
name
))
return
FALSE
;
if
(
!
is_matching_string
(
id1
->
arch
,
id2
->
arch
))
return
FALSE
;
if
(
!
is_matching_string
(
id1
->
public_key
,
id2
->
public_key
))
return
FALSE
;
if
(
id1
->
language
&&
id2
->
language
&&
strcmpiW
(
id1
->
language
,
id2
->
language
))
{
static
const
WCHAR
wildcardW
[]
=
{
'*'
,
0
};
if
(
strcmpW
(
wildcardW
,
id1
->
language
)
&&
strcmpW
(
wildcardW
,
id2
->
language
))
return
FALSE
;
}
if
(
id1
->
version
.
major
!=
id2
->
version
.
major
)
return
FALSE
;
if
(
id1
->
version
.
minor
!=
id2
->
version
.
minor
)
return
FALSE
;
if
(
id1
->
version
.
build
>
id2
->
version
.
build
)
return
FALSE
;
if
(
id1
->
version
.
build
==
id2
->
version
.
build
&&
id1
->
version
.
revision
>
id2
->
version
.
revision
)
return
FALSE
;
return
TRUE
;
}
static
BOOL
add_dependent_assembly_id
(
struct
actctx_loader
*
acl
,
static
BOOL
add_dependent_assembly_id
(
struct
actctx_loader
*
acl
,
struct
assembly_identity
*
ai
)
struct
assembly_identity
*
ai
)
{
{
/* FIXME: should check that the passed ai isn't already in the list */
unsigned
int
i
;
/* check if we already have that assembly */
for
(
i
=
0
;
i
<
acl
->
actctx
->
num_assemblies
;
i
++
)
if
(
is_matching_identity
(
ai
,
&
acl
->
actctx
->
assemblies
[
i
].
id
))
{
TRACE
(
"reusing existing assembly for %s arch %s version %u.%u.%u.%u
\n
"
,
debugstr_w
(
ai
->
name
),
debugstr_w
(
ai
->
arch
),
ai
->
version
.
major
,
ai
->
version
.
minor
,
ai
->
version
.
build
,
ai
->
version
.
revision
);
return
TRUE
;
}
for
(
i
=
0
;
i
<
acl
->
num_dependencies
;
i
++
)
if
(
is_matching_identity
(
ai
,
&
acl
->
dependencies
[
i
]
))
{
TRACE
(
"reusing existing dependency for %s arch %s version %u.%u.%u.%u
\n
"
,
debugstr_w
(
ai
->
name
),
debugstr_w
(
ai
->
arch
),
ai
->
version
.
major
,
ai
->
version
.
minor
,
ai
->
version
.
build
,
ai
->
version
.
revision
);
return
TRUE
;
}
if
(
acl
->
num_dependencies
==
acl
->
allocated_dependencies
)
if
(
acl
->
num_dependencies
==
acl
->
allocated_dependencies
)
{
{
void
*
ptr
;
void
*
ptr
;
...
...
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