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
91690539
Commit
91690539
authored
Sep 21, 2017
by
Hans Leidekker
Committed by
Alexandre Julliard
Sep 21, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
webservices: Use separate dictionaries for sending and receiving messages.
Signed-off-by:
Hans Leidekker
<
hans@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
98a38924
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
9 deletions
+11
-9
channel.c
dlls/webservices/channel.c
+11
-9
No files found.
dlls/webservices/channel.c
View file @
91690539
...
...
@@ -105,7 +105,8 @@ struct channel
WS_MESSAGE
*
msg
;
WS_ENCODING
encoding
;
enum
session_state
session_state
;
struct
dictionary
dict
;
struct
dictionary
dict_send
;
struct
dictionary
dict_recv
;
union
{
struct
...
...
@@ -160,7 +161,8 @@ static void reset_channel( struct channel *channel )
channel
->
msg
=
NULL
;
channel
->
read_size
=
0
;
channel
->
session_state
=
SESSION_STATE_UNINITIALIZED
;
clear_dict
(
&
channel
->
dict
);
clear_dict
(
&
channel
->
dict_send
);
clear_dict
(
&
channel
->
dict_recv
);
switch
(
channel
->
binding
)
{
...
...
@@ -967,13 +969,13 @@ static HRESULT receive_preamble_ack( struct channel *channel )
static
HRESULT
send_sized_envelope
(
struct
channel
*
channel
,
BYTE
*
data
,
ULONG
len
)
{
ULONG
table_size
=
string_table_size
(
&
channel
->
dict
.
dict
);
ULONG
table_size
=
string_table_size
(
&
channel
->
dict
_send
.
dict
);
HRESULT
hr
;
if
((
hr
=
send_byte
(
channel
->
u
.
tcp
.
socket
,
FRAME_RECORD_TYPE_SIZED_ENVELOPE
))
!=
S_OK
)
return
hr
;
if
((
hr
=
send_size
(
channel
->
u
.
tcp
.
socket
,
size_length
(
table_size
)
+
table_size
+
len
))
!=
S_OK
)
return
hr
;
if
((
hr
=
send_size
(
channel
->
u
.
tcp
.
socket
,
table_size
))
!=
S_OK
)
return
hr
;
if
((
hr
=
send_string_table
(
channel
->
u
.
tcp
.
socket
,
&
channel
->
dict
.
dict
))
!=
S_OK
)
return
hr
;
if
((
hr
=
send_string_table
(
channel
->
u
.
tcp
.
socket
,
&
channel
->
dict
_send
.
dict
))
!=
S_OK
)
return
hr
;
return
send_bytes
(
channel
->
u
.
tcp
.
socket
,
data
,
len
);
}
...
...
@@ -1092,10 +1094,10 @@ static HRESULT init_writer( struct channel *channel )
case
WS_ENCODING_XML_BINARY_SESSION_1
:
if
((
hr
=
writer_enable_lookup
(
channel
->
writer
))
!=
S_OK
)
return
hr
;
clear_dict
(
&
channel
->
dict
);
clear_dict
(
&
channel
->
dict
_send
);
bin
.
staticDictionary
=
(
WS_XML_DICTIONARY
*
)
&
dict_builtin_static
.
dict
;
bin
.
dynamicStringCallback
=
dict_cb
;
bin
.
dynamicStringCallbackState
=
&
channel
->
dict
;
bin
.
dynamicStringCallbackState
=
&
channel
->
dict
_send
;
encoding
=
&
bin
.
encoding
;
break
;
...
...
@@ -1229,7 +1231,7 @@ static HRESULT init_reader( struct channel *channel )
case
WS_ENCODING_XML_BINARY_SESSION_1
:
bin
.
staticDictionary
=
(
WS_XML_DICTIONARY
*
)
&
dict_builtin_static
.
dict
;
bin
.
dynamicDictionary
=
&
channel
->
dict
.
dict
;
bin
.
dynamicDictionary
=
&
channel
->
dict
_recv
.
dict
;
/* fall through */
case
WS_ENCODING_XML_BINARY_1
:
...
...
@@ -1555,8 +1557,8 @@ static HRESULT receive_message_session_setup( struct channel *channel )
if
(
channel
->
encoding
==
WS_ENCODING_XML_BINARY_SESSION_1
)
{
ULONG
size
;
if
((
hr
=
build_dict
(
(
const
BYTE
*
)
channel
->
read_buf
,
channel
->
read_size
,
&
channel
->
dict
,
&
size
))
!=
S_OK
)
return
hr
;
if
((
hr
=
build_dict
(
(
const
BYTE
*
)
channel
->
read_buf
,
channel
->
read_size
,
&
channel
->
dict
_recv
,
&
size
))
!=
S_OK
)
return
hr
;
channel
->
read_size
-=
size
;
memmove
(
channel
->
read_buf
,
channel
->
read_buf
+
size
,
channel
->
read_size
);
}
...
...
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