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
5a6cb381
Commit
5a6cb381
authored
Sep 07, 2018
by
Nikolay Sivov
Committed by
Alexandre Julliard
Sep 07, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
opcservices: Fix argument handling in CreatePackageRootUri().
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
39084721
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
4 deletions
+22
-4
factory.c
dlls/opcservices/factory.c
+3
-0
opcservices.c
dlls/opcservices/tests/opcservices.c
+17
-4
uri.c
dlls/opcservices/uri.c
+2
-0
No files found.
dlls/opcservices/factory.c
View file @
5a6cb381
...
...
@@ -312,6 +312,9 @@ static HRESULT WINAPI opc_factory_CreatePackageRootUri(IOpcFactory *iface, IOpcU
{
TRACE
(
"iface %p, uri %p.
\n
"
,
iface
,
uri
);
if
(
!
uri
)
return
E_POINTER
;
return
opc_root_uri_create
(
uri
);
}
...
...
dlls/opcservices/tests/opcservices.c
View file @
5a6cb381
...
...
@@ -41,16 +41,18 @@ static void test_package(void)
static
const
WCHAR
typeW
[]
=
{
't'
,
'y'
,
'p'
,
'e'
,
'/'
,
's'
,
'u'
,
'b'
,
't'
,
'y'
,
'p'
,
'e'
,
0
};
static
const
WCHAR
targetW
[]
=
{
't'
,
'a'
,
'r'
,
'g'
,
'e'
,
't'
,
0
};
static
const
WCHAR
uriW
[]
=
{
'/'
,
'u'
,
'r'
,
'i'
,
0
};
static
const
WCHAR
rootW
[]
=
{
'/'
,
0
};
IOpcRelationshipSet
*
relset
,
*
relset2
;
IOpcPartSet
*
partset
,
*
partset2
;
IOpcRelationship
*
rel
;
IOpcPartUri
*
part_uri
;
IOpcFactory
*
factory
;
IOpcPackage
*
package
;
IOpcUri
*
source_uri
;
IUri
*
target_uri
;
IOpcPart
*
part
;
IOpcUri
*
uri
;
HRESULT
hr
;
BSTR
str
;
BOOL
ret
;
factory
=
create_factory
();
...
...
@@ -93,11 +95,11 @@ static void test_package(void)
hr
=
IOpcRelationshipSet_CreateRelationship
(
relset
,
NULL
,
typeW
,
target_uri
,
OPC_URI_TARGET_MODE_INTERNAL
,
&
rel
);
ok
(
SUCCEEDED
(
hr
),
"Failed to create relationship, hr %#x.
\n
"
,
hr
);
hr
=
IOpcRelationship_GetSourceUri
(
rel
,
&
source_
uri
);
hr
=
IOpcRelationship_GetSourceUri
(
rel
,
&
uri
);
ok
(
SUCCEEDED
(
hr
),
"Failed to get source uri, hr %#x.
\n
"
,
hr
);
ok
(
source_
uri
==
(
IOpcUri
*
)
part_uri
,
"Unexpected source uri.
\n
"
);
ok
(
uri
==
(
IOpcUri
*
)
part_uri
,
"Unexpected source uri.
\n
"
);
IOpcUri_Release
(
source_
uri
);
IOpcUri_Release
(
uri
);
IOpcRelationship_Release
(
rel
);
IUri_Release
(
target_uri
);
...
...
@@ -126,6 +128,17 @@ todo_wine {
IOpcPackage_Release
(
package
);
/* Root uri */
hr
=
IOpcFactory_CreatePackageRootUri
(
factory
,
NULL
);
ok
(
hr
==
E_POINTER
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IOpcFactory_CreatePackageRootUri
(
factory
,
&
uri
);
ok
(
SUCCEEDED
(
hr
),
"Failed to create root uri, hr %#x.
\n
"
,
hr
);
hr
=
IOpcUri_GetRawUri
(
uri
,
&
str
);
ok
(
SUCCEEDED
(
hr
),
"Failed to get raw uri, hr %#x.
\n
"
,
hr
);
ok
(
!
lstrcmpW
(
str
,
rootW
),
"Unexpected uri %s.
\n
"
,
wine_dbgstr_w
(
str
));
SysFreeString
(
str
);
IOpcUri_Release
(
uri
);
IOpcFactory_Release
(
factory
);
}
...
...
dlls/opcservices/uri.c
View file @
5a6cb381
...
...
@@ -552,6 +552,8 @@ HRESULT opc_root_uri_create(IOpcUri **out)
HRESULT
hr
;
IUri
*
uri
;
*
out
=
NULL
;
if
(
!
(
obj
=
heap_alloc_zero
(
sizeof
(
*
obj
))))
return
E_OUTOFMEMORY
;
...
...
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