Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
57db7989
Commit
57db7989
authored
Oct 31, 2018
by
Hans Leidekker
Committed by
Alexandre Julliard
Oct 31, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
webservices: Add support for UTF-8 encoded text in read_message_id.
Signed-off-by:
Hans Leidekker
<
hans@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
ec2ea93b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
6 deletions
+19
-6
msg.c
dlls/webservices/msg.c
+17
-5
reader.c
dlls/webservices/reader.c
+1
-1
webservices_private.h
dlls/webservices/webservices_private.h
+1
-0
No files found.
dlls/webservices/msg.c
View file @
57db7989
...
...
@@ -846,21 +846,33 @@ static HRESULT read_message_id( WS_XML_READER *reader, GUID *ret )
{
const
WS_XML_NODE
*
node
;
const
WS_XML_TEXT_NODE
*
text
;
const
WS_XML_UNIQUE_ID_TEXT
*
id
;
HRESULT
hr
;
if
((
hr
=
WsReadNode
(
reader
,
NULL
))
!=
S_OK
)
return
hr
;
if
((
hr
=
WsGetReaderNode
(
reader
,
&
node
,
NULL
))
!=
S_OK
)
return
hr
;
if
(
node
->
nodeType
!=
WS_XML_NODE_TYPE_TEXT
)
return
WS_E_INVALID_FORMAT
;
text
=
(
const
WS_XML_TEXT_NODE
*
)
node
;
if
(
text
->
text
->
textType
!=
WS_XML_TEXT_TYPE_UNIQUE_ID
)
switch
(
text
->
text
->
textType
)
{
case
WS_XML_TEXT_TYPE_UTF8
:
{
const
WS_XML_UTF8_TEXT
*
utf8
=
(
const
WS_XML_UTF8_TEXT
*
)
text
->
text
;
if
(
utf8
->
value
.
length
!=
45
||
memcmp
(
utf8
->
value
.
bytes
,
"urn:uuid:"
,
9
))
return
WS_E_INVALID_FORMAT
;
return
str_to_guid
(
utf8
->
value
.
bytes
+
9
,
utf8
->
value
.
length
-
9
,
ret
);
}
case
WS_XML_TEXT_TYPE_UNIQUE_ID
:
{
const
WS_XML_UNIQUE_ID_TEXT
*
id
=
(
const
WS_XML_UNIQUE_ID_TEXT
*
)
text
->
text
;
*
ret
=
id
->
value
;
return
S_OK
;
}
default:
FIXME
(
"unhandled text type %u
\n
"
,
text
->
text
->
textType
);
return
E_NOTIMPL
;
}
id
=
(
const
WS_XML_UNIQUE_ID_TEXT
*
)
text
->
text
;
*
ret
=
id
->
value
;
return
S_OK
;
}
static
HRESULT
read_envelope_start
(
struct
msg
*
msg
,
WS_XML_READER
*
reader
)
...
...
dlls/webservices/reader.c
View file @
57db7989
...
...
@@ -3841,7 +3841,7 @@ static HRESULT str_to_float( const unsigned char *str, ULONG len, float *ret )
return
S_OK
;
}
static
HRESULT
str_to_guid
(
const
unsigned
char
*
str
,
ULONG
len
,
GUID
*
ret
)
HRESULT
str_to_guid
(
const
unsigned
char
*
str
,
ULONG
len
,
GUID
*
ret
)
{
static
const
unsigned
char
hex
[]
=
{
...
...
dlls/webservices/webservices_private.h
View file @
57db7989
...
...
@@ -71,6 +71,7 @@ HRESULT read_header( WS_XML_READER *, const WS_XML_STRING *, const WS_XML_STRING
HRESULT
create_header_buffer
(
WS_XML_READER
*
,
WS_HEAP
*
,
WS_XML_BUFFER
**
)
DECLSPEC_HIDDEN
;
HRESULT
text_to_text
(
const
WS_XML_TEXT
*
,
const
WS_XML_TEXT
*
,
ULONG
*
,
WS_XML_TEXT
**
)
DECLSPEC_HIDDEN
;
HRESULT
text_to_utf8text
(
const
WS_XML_TEXT
*
,
const
WS_XML_UTF8_TEXT
*
,
ULONG
*
,
WS_XML_UTF8_TEXT
**
)
DECLSPEC_HIDDEN
;
HRESULT
str_to_guid
(
const
unsigned
char
*
,
ULONG
,
GUID
*
)
DECLSPEC_HIDDEN
;
WS_XML_UTF8_TEXT
*
alloc_utf8_text
(
const
BYTE
*
,
ULONG
)
DECLSPEC_HIDDEN
;
WS_XML_UTF16_TEXT
*
alloc_utf16_text
(
const
BYTE
*
,
ULONG
)
DECLSPEC_HIDDEN
;
WS_XML_BASE64_TEXT
*
alloc_base64_text
(
const
BYTE
*
,
ULONG
)
DECLSPEC_HIDDEN
;
...
...
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