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
f7c9d08d
Commit
f7c9d08d
authored
Sep 19, 2018
by
Nikolay Sivov
Committed by
Alexandre Julliard
Sep 19, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
opcservices/uri: Fix IsEqual() to work with OPC URI objects.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
06fd9bb3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
4 deletions
+27
-4
opcservices.c
dlls/opcservices/tests/opcservices.c
+12
-3
uri.c
dlls/opcservices/uri.c
+15
-1
No files found.
dlls/opcservices/tests/opcservices.c
View file @
f7c9d08d
...
...
@@ -521,7 +521,7 @@ static void test_rel_part_uri(void)
IOpcPartUri
*
rel_uri2
;
IOpcUri
*
source_uri2
;
IUnknown
*
unk
=
NULL
;
BOOL
ret
=
FALSE
;
BOOL
ret
;
BSTR
str
;
hr
=
IOpcPartUri_GetSourceUri
(
rel_uri
,
&
source_uri
);
...
...
@@ -529,11 +529,20 @@ static void test_rel_part_uri(void)
hr
=
IOpcPartUri_GetSourceUri
(
rel_uri
,
&
source_uri2
);
ok
(
SUCCEEDED
(
hr
),
"Failed to get source uri, hr %#x.
\n
"
,
hr
);
ok
(
source_uri
!=
source_uri2
,
"Unexpected instance.
\n
"
);
hr
=
IOpcUri_IsEqual
(
source_uri
,
NULL
,
NULL
);
ok
(
hr
==
E_POINTER
,
"Unexpected hr %#x.
\n
"
,
hr
);
ret
=
123
;
hr
=
IOpcUri_IsEqual
(
source_uri
,
NULL
,
&
ret
);
ok
(
is_root
?
hr
==
E_POINTER
:
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
ok
(
is_root
?
ret
==
123
:
!
ret
,
"Unexpected result.
\n
"
);
ret
=
FALSE
;
hr
=
IOpcUri_IsEqual
(
source_uri
,
(
IUri
*
)
source_uri2
,
&
ret
);
todo_wine
{
ok
(
SUCCEEDED
(
hr
),
"IsEqual failed, hr %#x.
\n
"
,
hr
);
ok
(
ret
,
"Expected equal uris.
\n
"
);
}
hr
=
IOpcUri_QueryInterface
(
source_uri
,
&
IID_IOpcPartUri
,
(
void
**
)
&
unk
);
ok
(
hr
==
(
is_root
?
E_NOINTERFACE
:
S_OK
),
"Unexpected hr %#x, %s.
\n
"
,
hr
,
rel_part_uri_tests
[
i
].
uri
);
if
(
unk
)
...
...
dlls/opcservices/uri.c
View file @
f7c9d08d
...
...
@@ -312,7 +312,21 @@ static HRESULT WINAPI opc_uri_IsEqual(IOpcPartUri *iface, IUri *comparand, BOOL
TRACE
(
"iface %p, comparand %p, is_equal %p.
\n
"
,
iface
,
comparand
,
is_equal
);
return
IUri_IsEqual
(
uri
->
uri
,
comparand
,
is_equal
);
if
(
!
is_equal
)
return
E_POINTER
;
if
(
!
comparand
)
{
if
(
uri
->
is_part_uri
)
{
*
is_equal
=
FALSE
;
return
S_OK
;
}
return
E_POINTER
;
}
return
IUri_IsEqual
(
comparand
,
uri
->
uri
,
is_equal
);
}
static
HRESULT
WINAPI
opc_uri_GetRelationshipsPartUri
(
IOpcPartUri
*
iface
,
IOpcPartUri
**
part_uri
)
...
...
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