winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
October 2018
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
1 participants
602 discussions
Start a n
N
ew thread
Hans Leidekker : webservices: Implement WsRequestReply.
by Alexandre Julliard
31 Oct '18
31 Oct '18
Module: wine Branch: master Commit: 5a58080a66b245edcccfc18ebd03162d7877f3af URL:
https://source.winehq.org/git/wine.git/?a=commit;h=5a58080a66b245edcccfc18e…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Wed Oct 31 14:21:31 2018 +0100 webservices: Implement WsRequestReply. Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/webservices/channel.c | 115 +++++++++++++++++++++ dlls/webservices/tests/channel.c | 205 ++++++++++++++++++++++++++------------ dlls/webservices/webservices.spec | 2 +- include/webservices.h | 3 + 4 files changed, 262 insertions(+), 63 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=5a58080a66b245edcccf…
1
0
0
0
Hans Leidekker : webservices: Add support for UTF-8 encoded text in read_message_id.
by Alexandre Julliard
31 Oct '18
31 Oct '18
Module: wine Branch: master Commit: 57db798965e974d43fec84a1dbc9cf7f78f67cd7 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=57db798965e974d43fec84a1…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Wed Oct 31 14:21:30 2018 +0100 webservices: Add support for UTF-8 encoded text in read_message_id. Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/webservices/msg.c | 22 +++++++++++++++++----- dlls/webservices/reader.c | 2 +- dlls/webservices/webservices_private.h | 1 + 3 files changed, 19 insertions(+), 6 deletions(-) diff --git a/dlls/webservices/msg.c b/dlls/webservices/msg.c index 4ccf82e..a53fd92 100644 --- a/dlls/webservices/msg.c +++ b/dlls/webservices/msg.c @@ -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 ) diff --git a/dlls/webservices/reader.c b/dlls/webservices/reader.c index a5ff59a..8cf3f24 100644 --- a/dlls/webservices/reader.c +++ b/dlls/webservices/reader.c @@ -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[] = { diff --git a/dlls/webservices/webservices_private.h b/dlls/webservices/webservices_private.h index d981527..b482b5b 100644 --- a/dlls/webservices/webservices_private.h +++ b/dlls/webservices/webservices_private.h @@ -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;
1
0
0
0
Hans Leidekker : webservices: Increase the maximum size of the channel writer buffer.
by Alexandre Julliard
31 Oct '18
31 Oct '18
Module: wine Branch: master Commit: ec2ea93bbbca1f6a6de66cbec17a83173fb84ced URL:
https://source.winehq.org/git/wine.git/?a=commit;h=ec2ea93bbbca1f6a6de66cbe…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Wed Oct 31 14:21:29 2018 +0100 webservices: Increase the maximum size of the channel writer buffer. Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/webservices/channel.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/dlls/webservices/channel.c b/dlls/webservices/channel.c index b995a86..de84b0e 100644 --- a/dlls/webservices/channel.c +++ b/dlls/webservices/channel.c @@ -1316,9 +1316,14 @@ static HRESULT init_writer( struct channel *channel ) WS_XML_WRITER_BUFFER_OUTPUT buf = {{WS_XML_WRITER_OUTPUT_TYPE_BUFFER}}; WS_XML_WRITER_TEXT_ENCODING text = {{WS_XML_WRITER_ENCODING_TYPE_TEXT}, WS_CHARSET_UTF8}; WS_XML_WRITER_BINARY_ENCODING bin = {{WS_XML_WRITER_ENCODING_TYPE_BINARY}}; + WS_XML_WRITER_PROPERTY prop; + ULONG max_size = (1 << 17); HRESULT hr; - if (!channel->writer && (hr = WsCreateWriter( NULL, 0, &channel->writer, NULL )) != S_OK) return hr; + prop.id = WS_XML_WRITER_PROPERTY_BUFFER_MAX_SIZE; + prop.value = &max_size; + prop.valueSize = sizeof(max_size); + if (!channel->writer && (hr = WsCreateWriter( &prop, 1, &channel->writer, NULL )) != S_OK) return hr; switch (channel->encoding) {
1
0
0
0
Hans Leidekker : webservices: Add traces.
by Alexandre Julliard
31 Oct '18
31 Oct '18
Module: wine Branch: master Commit: 3b7fd4ffed6de134c5c0c4b7797fe0469f67ea0c URL:
https://source.winehq.org/git/wine.git/?a=commit;h=3b7fd4ffed6de134c5c0c4b7…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Wed Oct 31 14:21:28 2018 +0100 webservices: Add traces. Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/webservices/channel.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/dlls/webservices/channel.c b/dlls/webservices/channel.c index 91ffe5b..b995a86 100644 --- a/dlls/webservices/channel.c +++ b/dlls/webservices/channel.c @@ -395,6 +395,11 @@ static HRESULT create_channel( WS_CHANNEL_TYPE type, WS_CHANNEL_BINDING binding, for (i = 0; i < count; i++) { + TRACE( "property id %u value ptr %p size %u\n", properties[i].id, properties[i].value, + properties[i].valueSize ); + if (properties[i].valueSize == sizeof(ULONG) && properties[i].value) + TRACE( " value %08x\n", *(ULONG *)properties[i].value ); + switch (properties[i].id) { case WS_CHANNEL_PROPERTY_ENCODING: @@ -623,6 +628,8 @@ static HRESULT open_channel( struct channel *channel, const WS_ENDPOINT_ADDRESS return E_NOTIMPL; } + TRACE( "endpoint %s\n", debugstr_wn(endpoint->url.chars, endpoint->url.length) ); + if (!(channel->addr.url.chars = heap_alloc( endpoint->url.length * sizeof(WCHAR) ))) return E_OUTOFMEMORY; memcpy( channel->addr.url.chars, endpoint->url.chars, endpoint->url.length * sizeof(WCHAR) ); channel->addr.url.length = endpoint->url.length;
1
0
0
0
Hans Leidekker : webservices: Try to receive the whole message at once.
by Alexandre Julliard
31 Oct '18
31 Oct '18
Module: wine Branch: master Commit: 26008a7b8229710249bddb3611a9ade54168336f URL:
https://source.winehq.org/git/wine.git/?a=commit;h=26008a7b8229710249bddb36…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Wed Oct 31 14:21:27 2018 +0100 webservices: Try to receive the whole message at once. Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/webservices/channel.c | 36 +++++++++++++++++++++++++++++++++--- 1 file changed, 33 insertions(+), 3 deletions(-) diff --git a/dlls/webservices/channel.c b/dlls/webservices/channel.c index 464645b..91ffe5b 100644 --- a/dlls/webservices/channel.c +++ b/dlls/webservices/channel.c @@ -1137,9 +1137,39 @@ done: return hr; } +static void set_blocking( SOCKET socket, BOOL blocking ) +{ + ULONG state = !blocking; + ioctlsocket( socket, FIONBIO, &state ); +} + +static int sock_peek( SOCKET socket ) +{ + int ret; + char byte; + + set_blocking( socket, FALSE ); + ret = recv( socket, &byte, 1, MSG_PEEK ); + set_blocking( socket, TRUE ); + return ret; +} + +static int sock_recv( SOCKET socket, char *buf, int len ) +{ + int count, ret = 0; + for (;;) + { + if ((count = recv( socket, buf + ret, len, 0 )) <= 0) break; + ret += count; + len -= count; + if (sock_peek( socket ) != 1) break; + } + return ret; +} + static HRESULT receive_bytes( struct channel *channel, unsigned char *bytes, int len ) { - int count = recv( channel->u.tcp.socket, (char *)bytes, len, 0 ); + int count = sock_recv( channel->u.tcp.socket, (char *)bytes, len ); if (count < 0) return HRESULT_FROM_WIN32( WSAGetLastError() ); if (count != len) return WS_E_INVALID_FORMAT; return S_OK; @@ -1494,7 +1524,7 @@ static HRESULT receive_message_unsized( struct channel *channel, SOCKET socket ) if ((hr = resize_read_buffer( channel, max_len )) != S_OK) return hr; channel->read_size = 0; - if ((bytes_read = recv( socket, channel->read_buf, max_len, 0 )) < 0) + if ((bytes_read = sock_recv( socket, channel->read_buf, max_len )) < 0) { return HRESULT_FROM_WIN32( WSAGetLastError() ); } @@ -1513,7 +1543,7 @@ static HRESULT receive_message_sized( struct channel *channel, unsigned int size channel->read_size = 0; while (channel->read_size < size) { - if ((bytes_read = recv( channel->u.tcp.socket, channel->read_buf + offset, to_read, 0 )) < 0) + if ((bytes_read = sock_recv( channel->u.tcp.socket, channel->read_buf + offset, to_read )) < 0) { return HRESULT_FROM_WIN32( WSAGetLastError() ); }
1
0
0
0
Hans Leidekker : webservices: Also trace return values in the URL functions.
by Alexandre Julliard
31 Oct '18
31 Oct '18
Module: wine Branch: master Commit: bd7c86bb4ff15b4fa706dbfe697d61b378c99004 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=bd7c86bb4ff15b4fa706dbfe…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Wed Oct 31 14:21:26 2018 +0100 webservices: Also trace return values in the URL functions. Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/webservices/url.c | 67 ++++++++++++++++++++++++++++---------------------- 1 file changed, 38 insertions(+), 29 deletions(-) diff --git a/dlls/webservices/url.c b/dlls/webservices/url.c index 731b74e..fd8d33a 100644 --- a/dlls/webservices/url.c +++ b/dlls/webservices/url.c @@ -192,22 +192,22 @@ HRESULT WINAPI WsDecodeUrl( const WS_STRING *str, ULONG flags, WS_HEAP *heap, WS return E_NOTIMPL; } if (!(decoded = url_decode( str->chars, str->length, heap, &len_decoded )) || - !(url = ws_alloc( heap, sizeof(*url) ))) goto error; + !(url = ws_alloc( heap, sizeof(*url) ))) goto done; hr = WS_E_INVALID_FORMAT; p = q = decoded; len = len_decoded; while (len && *q != ':') { q++; len--; }; - if (*q != ':') goto error; - if ((url->url.scheme = scheme_type( p, q - p )) == ~0u) goto error; + if (*q != ':') goto done; + if ((url->url.scheme = scheme_type( p, q - p )) == ~0u) goto done; - if (!--len || *++q != '/') goto error; - if (!--len || *++q != '/') goto error; + if (!--len || *++q != '/') goto done; + if (!--len || *++q != '/') goto done; p = ++q; len--; while (len && *q != '/' && *q != ':' && *q != '?' && *q != '#') { q++; len--; }; - if (q == p) goto error; + if (q == p) goto done; url->host.length = q - p; url->host.chars = p; @@ -216,7 +216,7 @@ HRESULT WINAPI WsDecodeUrl( const WS_STRING *str, ULONG flags, WS_HEAP *heap, WS p = ++q; len--; while (len && isdigitW( *q )) { - if ((port = port * 10 + *q - '0') > 65535) goto error; + if ((port = port * 10 + *q - '0') > 65535) goto done; q++; len--; }; url->port = port; @@ -258,11 +258,15 @@ HRESULT WINAPI WsDecodeUrl( const WS_STRING *str, ULONG flags, WS_HEAP *heap, WS else url->fragment.length = 0; *ret = (WS_URL *)url; - return S_OK; + hr = S_OK; -error: - if (decoded != str->chars) ws_free( heap, decoded, len_decoded ); - ws_free( heap, url, sizeof(*url) ); +done: + if (hr != S_OK) + { + if (decoded != str->chars) ws_free( heap, decoded, len_decoded ); + ws_free( heap, url, sizeof(*url) ); + } + TRACE( "returning %08x\n", hr ); return hr; } @@ -420,12 +424,12 @@ HRESULT WINAPI WsEncodeUrl( const WS_URL *base, ULONG flags, WS_HEAP *heap, WS_S WS_ERROR *error ) { static const WCHAR fmtW[] = {':','%','u',0}; - ULONG len = 0, len_scheme, len_enc, ret_size; + ULONG len = 0, len_scheme, len_enc, ret_size = 0; const WS_HTTP_URL *url = (const WS_HTTP_URL *)base; const WCHAR *scheme; - WCHAR *str, *p, *q; + WCHAR *str = NULL, *p, *q; ULONG port = 0; - HRESULT hr; + HRESULT hr = WS_E_INVALID_FORMAT; TRACE( "%p %08x %p %p %p\n", base, flags, heap, ret, error ); if (error) FIXME( "ignoring error parameter\n" ); @@ -436,28 +440,32 @@ HRESULT WINAPI WsEncodeUrl( const WS_URL *base, ULONG flags, WS_HEAP *heap, WS_S FIXME( "unimplemented flags %08x\n", flags ); return E_NOTIMPL; } - if (!(scheme = scheme_str( url->url.scheme, &len_scheme ))) return WS_E_INVALID_FORMAT; + if (!(scheme = scheme_str( url->url.scheme, &len_scheme ))) goto done; len = len_scheme + 3; /* '://' */ len += 6; /* ':65535' */ if ((hr = url_encode_size( url->host.chars, url->host.length, "", &len_enc )) != S_OK) - return hr; + goto done; len += len_enc; if ((hr = url_encode_size( url->path.chars, url->path.length, "/", &len_enc )) != S_OK) - return hr; + goto done; len += len_enc; if ((hr = url_encode_size( url->query.chars, url->query.length, "/?", &len_enc )) != S_OK) - return hr; + goto done; len += len_enc + 1; /* '?' */ if ((hr = url_encode_size( url->fragment.chars, url->fragment.length, "/?", &len_enc )) != S_OK) - return hr; + goto done; len += len_enc + 1; /* '#' */ ret_size = len * sizeof(WCHAR); - if (!(str = ws_alloc( heap, ret_size ))) return WS_E_QUOTA_EXCEEDED; + if (!(str = ws_alloc( heap, ret_size ))) + { + hr = WS_E_QUOTA_EXCEEDED; + goto done; + } memcpy( str, scheme, len_scheme * sizeof(WCHAR) ); p = str + len_scheme; @@ -466,7 +474,7 @@ HRESULT WINAPI WsEncodeUrl( const WS_URL *base, ULONG flags, WS_HEAP *heap, WS_S p += 3; if ((hr = url_encode( url->host.chars, url->host.length, p, "", &len_enc )) != S_OK) - goto error; + goto done; p += len_enc; if (url->portAsString.length) @@ -478,14 +486,14 @@ HRESULT WINAPI WsEncodeUrl( const WS_URL *base, ULONG flags, WS_HEAP *heap, WS_S if ((port = port * 10 + *q - '0') > 65535) { hr = WS_E_INVALID_FORMAT; - goto error; + goto done; } q++; len--; } if (url->port && port != url->port) { hr = E_INVALIDARG; - goto error; + goto done; } } else port = url->port; @@ -499,14 +507,14 @@ HRESULT WINAPI WsEncodeUrl( const WS_URL *base, ULONG flags, WS_HEAP *heap, WS_S } if ((hr = url_encode( url->path.chars, url->path.length, p, "/", &len_enc )) != S_OK) - goto error; + goto done; p += len_enc; if (url->query.length) { *p++ = '?'; if ((hr = url_encode( url->query.chars, url->query.length, p, "/?", &len_enc )) != S_OK) - goto error; + goto done; p += len_enc; } @@ -514,15 +522,16 @@ HRESULT WINAPI WsEncodeUrl( const WS_URL *base, ULONG flags, WS_HEAP *heap, WS_S { *p++ = '#'; if ((hr = url_encode( url->fragment.chars, url->fragment.length, p, "/?", &len_enc )) != S_OK) - goto error; + goto done; p += len_enc; } ret->length = p - str; ret->chars = str; - return S_OK; + hr = S_OK; -error: - ws_free( heap, str, ret_size ); +done: + if (hr != S_OK) ws_free( heap, str, ret_size ); + TRACE( "returning %08x\n", hr ); return hr; }
1
0
0
0
Nikolay Sivov : comctl32/edit: Handle focused cue text.
by Alexandre Julliard
31 Oct '18
31 Oct '18
Module: wine Branch: master Commit: 8bd48fd6d90fbf8e1f0e92a5ab0d6dab09faf439 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=8bd48fd6d90fbf8e1f0e92a5…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Wed Oct 31 15:57:50 2018 +0300 comctl32/edit: Handle focused cue text. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/comctl32/edit.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/dlls/comctl32/edit.c b/dlls/comctl32/edit.c index 249e08b..06e1f49 100644 --- a/dlls/comctl32/edit.c +++ b/dlls/comctl32/edit.c @@ -129,7 +129,9 @@ typedef struct should be sent to the first parent. */ HWND hwndListBox; /* handle of ComboBox's listbox or NULL */ INT wheelDeltaRemainder; /* scroll wheel delta left over after scrolling whole lines */ - WCHAR *cue_banner_text; + WCHAR *cue_banner_text; + BOOL cue_banner_draw_focused; + /* * only for multi line controls */ @@ -2181,7 +2183,7 @@ static void EDIT_PaintLine(EDITSTATE *es, HDC dc, INT line, BOOL rev) } else x += EDIT_PaintText(es, dc, x, y, line, 0, ll, FALSE); - if (es->cue_banner_text && es->text_length == 0 && !(es->flags & EF_FOCUSED)) + if (es->cue_banner_text && es->text_length == 0 && (!(es->flags & EF_FOCUSED) || es->cue_banner_draw_focused)) { SetTextColor(dc, GetSysColor(COLOR_GRAYTEXT)); TextOutW(dc, x, y, es->cue_banner_text, strlenW(es->cue_banner_text)); @@ -4170,16 +4172,14 @@ static inline WCHAR *heap_strdupW(const WCHAR *str) * EM_SETCUEBANNER * */ -static BOOL EDIT_EM_SetCueBanner(EDITSTATE *es, BOOL focus, const WCHAR *cue_text) +static BOOL EDIT_EM_SetCueBanner(EDITSTATE *es, BOOL draw_focused, const WCHAR *cue_text) { if (es->style & ES_MULTILINE || !cue_text) return FALSE; - if (focus) - FIXME("cue banner for focused control not implemented.\n"); - heap_free(es->cue_banner_text); es->cue_banner_text = heap_strdupW(cue_text); + es->cue_banner_draw_focused = draw_focused; return TRUE; }
1
0
0
0
Nikolay Sivov : comctl32/edit: Add missing message macros.
by Alexandre Julliard
31 Oct '18
31 Oct '18
Module: wine Branch: master Commit: aa601fdf0ccd394dfb099e5bbf52e0f208473f25 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=aa601fdf0ccd394dfb099e5b…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Wed Oct 31 15:57:49 2018 +0300 comctl32/edit: Add missing message macros. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/comctl32/edit.c | 2 -- include/commctrl.h | 7 +++++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/dlls/comctl32/edit.c b/dlls/comctl32/edit.c index aeba9f7..249e08b 100644 --- a/dlls/comctl32/edit.c +++ b/dlls/comctl32/edit.c @@ -23,9 +23,7 @@ * * TODO: * - EDITBALLOONTIP structure - * - EM_GETCUEBANNER/Edit_GetCueBannerText * - EM_HIDEBALLOONTIP/Edit_HideBalloonTip - * - EM_SETCUEBANNER/Edit_SetCueBannerText * - EM_SHOWBALLOONTIP/Edit_ShowBalloonTip * - EM_GETIMESTATUS, EM_SETIMESTATUS * - EN_ALIGN_LTR_EC diff --git a/include/commctrl.h b/include/commctrl.h index 77f460a..73bb9fa 100644 --- a/include/commctrl.h +++ b/include/commctrl.h @@ -5259,6 +5259,13 @@ typedef struct _tagEDITBALLOONTIP #define EM_NOSETFOCUS (ECM_FIRST + 7) #define EM_TAKEFOCUS (ECM_FIRST + 8) +#define Edit_SetCueBannerText(hwnd, text) \ + (BOOL)SNDMSG((hwnd), EM_SETCUEBANNER, 0, (LPARAM)(text)) +#define Edit_SetCueBannerTextFocused(hwnd, text, drawfocused) \ + (BOOL)SNDMSG((hwnd), EM_SETCUEBANNER, (WPARAM)(drawfocused), (LPARAM)(text)) +#define Edit_GetCueBannerText(hwnd, buff, buff_size) \ + (BOOL)SNDMSG((hwnd), EM_GETCUEBANNER, (WPARAM)(buff), (LPARAM)(buff_size)) + /************************************************************************** * Listbox control */
1
0
0
0
Nikolay Sivov : dwrite: Release file streams when building collections.
by Alexandre Julliard
31 Oct '18
31 Oct '18
Module: wine Branch: master Commit: d19e34d8f072514cb903bda89767996ba078bae4 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=d19e34d8f072514cb903bda8…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Wed Oct 31 15:34:11 2018 +0300 dwrite: Release file streams when building collections. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dwrite/font.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dlls/dwrite/font.c b/dlls/dwrite/font.c index 5fc0de7..6666249 100644 --- a/dlls/dwrite/font.c +++ b/dlls/dwrite/font.c @@ -3883,6 +3883,8 @@ HRESULT create_font_collection(IDWriteFactory5 *factory, IDWriteFontFileEnumerat if (FAILED(hr)) break; } + + IDWriteFontFileStream_Release(stream); } LIST_FOR_EACH_ENTRY_SAFE(fileenum, fileenum2, &scannedfiles, struct fontfile_enum, entry) {
1
0
0
0
Dmitry Timoshkov : crypt32: CryptFreeOIDFunctionAddress should not unload a registered module.
by Alexandre Julliard
31 Oct '18
31 Oct '18
Module: wine Branch: master Commit: 3b1e55d09370926c4d73a386d2165a48a13b3875 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=3b1e55d09370926c4d73a386…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Wed Oct 31 15:43:08 2018 +0300 crypt32: CryptFreeOIDFunctionAddress should not unload a registered module. MSDN states that hModule passed to CryptInstallOIDFunctionAddress() should be used to prevent this module to be unloaded by CryptFreeOIDFunctionAddress in case the provider's DLL uses CryptRegisterOIDFunction to add its own entries. Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/crypt32/oid.c | 43 ++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 40 insertions(+), 3 deletions(-) diff --git a/dlls/crypt32/oid.c b/dlls/crypt32/oid.c index d6c411c..6dc894e 100644 --- a/dlls/crypt32/oid.c +++ b/dlls/crypt32/oid.c @@ -59,6 +59,7 @@ struct OIDFunctionSet struct OIDFunction { + HMODULE hModule; DWORD encoding; CRYPT_OID_FUNC_ENTRY entry; struct list next; @@ -271,6 +272,7 @@ BOOL WINAPI CryptInstallOIDFunctionAddress(HMODULE hModule, else func->entry.pszOID = rgFuncEntry[i].pszOID; func->entry.pvFuncAddr = rgFuncEntry[i].pvFuncAddr; + func->hModule = hModule; list_add_tail(&set->functions, &func->next); } else @@ -428,6 +430,38 @@ BOOL WINAPI CryptGetOIDFunctionAddress(HCRYPTOIDFUNCSET hFuncSet, return ret; } +static BOOL is_module_registered(HMODULE hModule) +{ + struct OIDFunctionSet *set; + BOOL ret = FALSE; + + EnterCriticalSection(&funcSetCS); + + LIST_FOR_EACH_ENTRY(set, &funcSets, struct OIDFunctionSet, next) + { + struct OIDFunction *function; + + EnterCriticalSection(&set->cs); + + LIST_FOR_EACH_ENTRY(function, &set->functions, struct OIDFunction, next) + { + if (function->hModule == hModule) + { + ret = TRUE; + break; + } + } + + LeaveCriticalSection(&set->cs); + + if (ret) break; + } + + LeaveCriticalSection(&funcSetCS); + + return ret; +} + BOOL WINAPI CryptFreeOIDFunctionAddress(HCRYPTOIDFUNCADDR hFuncAddr, DWORD dwFlags) { @@ -441,9 +475,12 @@ BOOL WINAPI CryptFreeOIDFunctionAddress(HCRYPTOIDFUNCADDR hFuncAddr, { struct FuncAddr *addr = hFuncAddr; - CryptMemFree(addr->dllList); - FreeLibrary(addr->lib); - CryptMemFree(addr); + if (!is_module_registered(addr->lib)) + { + CryptMemFree(addr->dllList); + FreeLibrary(addr->lib); + CryptMemFree(addr); + } } return TRUE; }
1
0
0
0
← Newer
1
2
3
4
5
...
61
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
Results per page:
10
25
50
100
200