ReactOS.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
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
List overview
Download
Ros-diffs
August 2016
----- 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
ros-diffs@reactos.org
20 participants
462 discussions
Start a n
N
ew thread
[akhaldi] 72358: [WSCRIPT] Sync with Wine Staging 1.9.16. CORE-11866
by akhaldi@svn.reactos.org
Author: akhaldi Date: Fri Aug 19 09:48:46 2016 New Revision: 72358 URL:
http://svn.reactos.org/svn/reactos?rev=72358&view=rev
Log: [WSCRIPT] Sync with Wine Staging 1.9.16. CORE-11866 Modified: trunk/reactos/base/applications/cmdutils/wscript/host.c trunk/reactos/media/doc/README.WINE Modified: trunk/reactos/base/applications/cmdutils/wscript/host.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/cmdutils…
============================================================================== --- trunk/reactos/base/applications/cmdutils/wscript/host.c [iso-8859-1] (original) +++ trunk/reactos/base/applications/cmdutils/wscript/host.c [iso-8859-1] Fri Aug 19 09:48:46 2016 @@ -210,8 +210,10 @@ static HRESULT WINAPI Host_Quit(IHost *iface, int ExitCode) { - WINE_FIXME("(%d)\n", ExitCode); - return E_NOTIMPL; + FIXME("(%d) semi-stub: no script engine clean up\n", ExitCode); + + ExitProcess(ExitCode); + return S_OK; } static HRESULT WINAPI Host_get_ScriptName(IHost *iface, BSTR *out_ScriptName) Modified: trunk/reactos/media/doc/README.WINE URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
============================================================================== --- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original) +++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Fri Aug 19 09:48:46 2016 @@ -233,7 +233,7 @@ reactos/base/applications/cmdutils/schtasks # Synced to WineStaging-1.9.14 reactos/base/applications/cmdutils/taskkill # Synced to WineStaging-1.9.11 reactos/base/applications/cmdutils/wmic # Synced to WineStaging-1.9.11 -reactos/base/applications/cmdutils/wscript # Synced to WineStaging-1.9.11 +reactos/base/applications/cmdutils/wscript # Synced to WineStaging-1.9.16 reactos/base/applications/cmdutils/xcopy # Synced to WineStaging-1.9.11 reactos/base/applications/games/winmine # Synced to WineStaging-1.9.11 with our own resources. reactos/base/applications/extrac32 # Synced to WineStaging-1.9.11
8 years, 4 months
1
0
0
0
[akhaldi] 72357: [WININET_WINETEST] Sync with Wine Staging 1.9.16. CORE-11866
by akhaldi@svn.reactos.org
Author: akhaldi Date: Fri Aug 19 09:46:10 2016 New Revision: 72357 URL:
http://svn.reactos.org/svn/reactos?rev=72357&view=rev
Log: [WININET_WINETEST] Sync with Wine Staging 1.9.16. CORE-11866 Modified: trunk/rostests/winetests/wininet/http.c trunk/rostests/winetests/wininet/internet.c trunk/rostests/winetests/wininet/url.c Modified: trunk/rostests/winetests/wininet/http.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/wininet/http.c?…
============================================================================== --- trunk/rostests/winetests/wininet/http.c [iso-8859-1] (original) +++ trunk/rostests/winetests/wininet/http.c [iso-8859-1] Fri Aug 19 09:46:10 2016 @@ -116,6 +116,7 @@ static HANDLE hCompleteEvent, conn_close_event, conn_wait_event, server_req_rec_event; static DWORD req_error; +static BOOL is_ie7plus = TRUE; #define TESTF_REDIRECT 0x01 #define TESTF_COMPRESSED 0x02 @@ -1084,10 +1085,12 @@ CLEAR_NOTIFIED(INTERNET_STATUS_CONNECTING_TO_SERVER); CLEAR_NOTIFIED(INTERNET_STATUS_CONNECTED_TO_SERVER); - rc = InternetReadFileExW(hor, NULL, 0, 0xdeadcafe); - ok(!rc && (GetLastError() == ERROR_INVALID_PARAMETER), - "InternetReadFileEx should have failed with ERROR_INVALID_PARAMETER instead of %s, %u\n", - rc ? "TRUE" : "FALSE", GetLastError()); + if(is_ie7plus) { + rc = InternetReadFileExW(hor, NULL, 0, 0xdeadcafe); + ok(!rc && (GetLastError() == ERROR_INVALID_PARAMETER), + "InternetReadFileEx should have failed with ERROR_INVALID_PARAMETER instead of %s, %u\n", + rc ? "TRUE" : "FALSE", GetLastError()); + } /* tests invalid dwStructSize */ inetbuffers.dwStructSize = sizeof(inetbuffers)+1; @@ -4963,6 +4966,9 @@ test_request_t req; char buf[4096]; + if(!is_ie7plus) + return; + hCompleteEvent = CreateEventW(NULL, FALSE, FALSE, NULL); conn_wait_event = CreateEventW(NULL, FALSE, FALSE, NULL); server_req_rec_event = CreateEventW(NULL, FALSE, FALSE, NULL); @@ -4994,6 +5000,47 @@ close_async_handle(req.session, hCompleteEvent, 2); + open_read_test_request(port, &req, + "HTTP/1.1 200 OK\r\n" + "Server: winetest\r\n" + "Transfer-Encoding: chunked\r\n" + "\r\n" + "9\r\n123456789"); + readex_expect_sync_data(req.request, IRF_NO_WAIT, &ib, sizeof(buf), "123456789"); + readex_expect_async(req.request, IRF_NO_WAIT, &ib, sizeof(buf)); + + send_response_and_wait("\r\n1\r\na\r\n1\r\nb\r", FALSE, &ib); + readex_expect_sync_data(req.request, IRF_NO_WAIT, &ib, sizeof(buf), "ab"); + readex_expect_async(req.request, IRF_NO_WAIT, &ib, sizeof(buf)); + + send_response_and_wait("\n3\r\nab", FALSE, &ib); + readex_expect_sync_data(req.request, IRF_NO_WAIT, &ib, sizeof(buf), "ab"); + readex_expect_async(req.request, IRF_NO_WAIT, &ib, sizeof(buf)); + + send_response_and_wait("c", FALSE, &ib); + readex_expect_sync_data(req.request, IRF_NO_WAIT, &ib, sizeof(buf), "c"); + readex_expect_async(req.request, IRF_NO_WAIT, &ib, sizeof(buf)); + + send_response_and_wait("\r\n1\r\nx\r\n0\r\n\r\n", TRUE, &ib); + readex_expect_sync_data(req.request, IRF_NO_WAIT, &ib, sizeof(buf), "x"); + readex_expect_sync_data(req.request, IRF_NO_WAIT, &ib, sizeof(buf), ""); + + close_async_handle(req.session, hCompleteEvent, 2); + + open_read_test_request(port, &req, + "HTTP/1.1 200 OK\r\n" + "Server: winetest\r\n" + "Transfer-Encoding: chunked\r\n" + "\r\n" + "3\r\n123\r\n"); + readex_expect_sync_data(req.request, IRF_NO_WAIT, &ib, sizeof(buf), "123"); + readex_expect_async(req.request, IRF_NO_WAIT, &ib, sizeof(buf)); + + send_response_and_wait("0\r\n\r\n", TRUE, &ib); + readex_expect_sync_data(req.request, IRF_NO_WAIT, &ib, sizeof(buf), ""); + + close_async_handle(req.session, hCompleteEvent, 2); + CloseHandle(hCompleteEvent); CloseHandle(conn_wait_event); CloseHandle(server_req_rec_event); @@ -5006,6 +5053,9 @@ test_request_t req; DWORD size, len; BOOL ret; + + if(!is_ie7plus) + return; memset(long_path+strlen(long_path), 'x', sizeof(long_path)-strlen(long_path)); long_path[sizeof(long_path)-1] = 0; @@ -5849,10 +5899,8 @@ * other versions never do. They also hang of following tests. We disable it for everything older * than IE7. */ - if(!pInternetGetSecurityInfoByURLA) { - win_skip("Skipping async open on too old wininet version.\n"); + if(!is_ie7plus) return; - } ctx.req = NULL; ctx.event = CreateEventA(NULL, TRUE, FALSE, "Z:_home_hans_jaman-installer.exe_ev1"); @@ -6337,6 +6385,9 @@ char buffer[128]; BOOL ret; + if(!is_ie7plus) + return; + session = InternetOpenA("winetest", INTERNET_OPEN_TYPE_DIRECT, NULL, NULL, 0); ok(session != NULL, "InternetOpen failed\n"); @@ -6512,6 +6563,11 @@ pInternetSetStatusCallbackA = (void*)GetProcAddress(hdll, "InternetSetStatusCallbackA"); pInternetSetStatusCallbackW = (void*)GetProcAddress(hdll, "InternetSetStatusCallbackW"); pInternetGetSecurityInfoByURLA = (void*)GetProcAddress(hdll, "InternetGetSecurityInfoByURLA"); + + if(!pInternetGetSecurityInfoByURLA) { + is_ie7plus = FALSE; + win_skip("IE6 found. It's too old for some tests.\n"); + } init_status_tests(); test_InternetCloseHandle(); Modified: trunk/rostests/winetests/wininet/internet.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/wininet/interne…
============================================================================== --- trunk/rostests/winetests/wininet/internet.c [iso-8859-1] (original) +++ trunk/rostests/winetests/wininet/internet.c [iso-8859-1] Fri Aug 19 09:46:10 2016 @@ -361,11 +361,13 @@ DWORD len; BOOL ret; + len = 1024; SetLastError(0xdeadbeef); ret = InternetGetCookieA("
http://www.example.com
", NULL, NULL, &len); ok(!ret && GetLastError() == ERROR_NO_MORE_ITEMS, "InternetGetCookie should have failed with %s and error %d\n", ret ? "TRUE" : "FALSE", GetLastError()); + ok(!len, "len = %u\n", len); } @@ -389,7 +391,7 @@ /* Technically illegal! domain should require 2 dots, but native wininet accepts it */ ret = InternetSetCookieA("
http://www.example.com
",NULL,"E=F;
domain=example.com
"); ok(ret == TRUE,"InternetSetCookie failed\n"); - ret = InternetSetCookieA("
http://www.example.com
",NULL,"G=H;
domain=.example.com
; path=/foo"); + ret = InternetSetCookieA("
http://www.example.com
",NULL,"G=H;
domain=.example.com
; invalid=attr; path=/foo"); ok(ret == TRUE,"InternetSetCookie failed\n"); ret = InternetSetCookieA("
http://www.example.com/bar.html
",NULL,"I=J;
domain=.example.com
"); ok(ret == TRUE,"InternetSetCookie failed\n"); @@ -1068,7 +1070,8 @@ static void test_PrivacyGetSetZonePreferenceW(void) { - DWORD ret, zone, type, template, old_template; + DWORD ret, zone, type, template, old_template, pref_size = 0; + WCHAR pref[256]; zone = 3; type = 0; @@ -1079,6 +1082,14 @@ ret = pPrivacyGetZonePreferenceW(zone, type, &old_template, NULL, NULL); ok(ret == 0, "expected ret == 0, got %u\n", ret); + trace("template %u\n", old_template); + + if(old_template == PRIVACY_TEMPLATE_ADVANCED) { + pref_size = sizeof(pref)/sizeof(WCHAR); + ret = pPrivacyGetZonePreferenceW(zone, type, &old_template, pref, &pref_size); + ok(ret == 0, "expected ret == 0, got %u\n", ret); + } + template = 5; ret = pPrivacySetZonePreferenceW(zone, type, template, NULL); ok(ret == 0, "expected ret == 0, got %u\n", ret); @@ -1089,7 +1100,7 @@ ok(template == 5, "expected template == 5, got %u\n", template); template = 5; - ret = pPrivacySetZonePreferenceW(zone, type, old_template, NULL); + ret = pPrivacySetZonePreferenceW(zone, type, old_template, pref_size ? pref : NULL); ok(ret == 0, "expected ret == 0, got %u\n", ret); } @@ -1175,6 +1186,28 @@ ok(ret == TRUE, "InternetCloseHandle failed: 0x%08x\n", GetLastError()); ret = InternetCloseHandle(ses); ok(ret == TRUE, "InternetCloseHandle failed: 0x%08x\n", GetLastError()); +} + +static void test_end_browser_session(void) +{ + DWORD len; + BOOL ret; + + ret = InternetSetCookieA("
http://www.example.com/test_end
", NULL, "A=B"); + ok(ret == TRUE, "InternetSetCookie failed\n"); + + len = 1024; + ret = InternetGetCookieA("
http://www.example.com/test_end
", NULL, NULL, &len); + ok(ret == TRUE,"InternetGetCookie failed\n"); + ok(len != 0, "len = 0\n"); + + ret = InternetSetOptionA(NULL, INTERNET_OPTION_END_BROWSER_SESSION, NULL, 0); + ok(ret, "InternetSetOptio(INTERNET_OPTION_END_BROWSER_SESSION) failed: %u\n", GetLastError()); + + len = 1024; + ret = InternetGetCookieA("
http://www.example.com/test_end
", NULL, NULL, &len); + ok(!ret && GetLastError() == ERROR_NO_MORE_ITEMS, "InternetGetCookie returned %x (%u)\n", ret, GetLastError()); + ok(!len, "len = %u\n", len); } #define verifyProxyEnable(e) r_verifyProxyEnable(__LINE__, e) @@ -1809,4 +1842,5 @@ win_skip("Privacy[SG]etZonePreferenceW are not available\n"); test_InternetSetOption(); -} + test_end_browser_session(); +} Modified: trunk/rostests/winetests/wininet/url.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/wininet/url.c?r…
============================================================================== --- trunk/rostests/winetests/wininet/url.c [iso-8859-1] (original) +++ trunk/rostests/winetests/wininet/url.c [iso-8859-1] Fri Aug 19 09:46:10 2016 @@ -534,26 +534,26 @@ * The last two (path and extrainfo) are the same for all versions * of the wininet.dll. */ - copy_compsA(&urlSrc, &urlComponents, 0, 1024, 1024, 1024, 2048, 1024); + copy_compsA(&urlSrc, &urlComponents, 0, 1024, 1024, 1024, 1024, 1024); SetLastError(0xdeadbeef); firstret = InternetCrackUrlA(TEST_URL3, 0, ICU_DECODE, &urlComponents); firstGLE = GetLastError(); - copy_compsA(&urlSrc, &urlComponents, 32, 0, 1024, 1024, 2048, 1024); + copy_compsA(&urlSrc, &urlComponents, 32, 0, 1024, 1024, 1024, 1024); SetLastError(0xdeadbeef); ret = InternetCrackUrlA(TEST_URL3, 0, ICU_DECODE, &urlComponents); GLE = GetLastError(); ok(ret==firstret && (GLE==firstGLE), "InternetCrackUrl returned %d with GLE=%d (expected to return %d)\n", ret, GLE, firstret); - copy_compsA(&urlSrc, &urlComponents, 32, 1024, 0, 1024, 2048, 1024); + copy_compsA(&urlSrc, &urlComponents, 32, 1024, 0, 1024, 1024, 1024); SetLastError(0xdeadbeef); ret = InternetCrackUrlA(TEST_URL3, 0, ICU_DECODE, &urlComponents); GLE = GetLastError(); ok(ret==firstret && (GLE==firstGLE), "InternetCrackUrl returned %d with GLE=%d (expected to return %d)\n", ret, GLE, firstret); - copy_compsA(&urlSrc, &urlComponents, 32, 1024, 1024, 0, 2048, 1024); + copy_compsA(&urlSrc, &urlComponents, 32, 1024, 1024, 0, 1024, 1024); SetLastError(0xdeadbeef); ret = InternetCrackUrlA(TEST_URL3, 0, ICU_DECODE, &urlComponents); GLE = GetLastError(); @@ -569,7 +569,7 @@ "InternetCrackUrl returned %d with GLE=%d (expected to return 0 and ERROR_INVALID_HANDLE or ERROR_INSUFFICIENT_BUFFER)\n", ret, GLE); - copy_compsA(&urlSrc, &urlComponents, 32, 1024, 1024, 1024, 2048, 0); + copy_compsA(&urlSrc, &urlComponents, 32, 1024, 1024, 1024, 1024, 0); SetLastError(0xdeadbeef); ret = InternetCrackUrlA(TEST_URL3, 0, ICU_DECODE, &urlComponents); GLE = GetLastError(); @@ -586,7 +586,7 @@ "InternetCrackUrl returned %d with GLE=%d (expected to return 0 and ERROR_INVALID_PARAMETER)\n", ret, GLE); - copy_compsA(&urlSrc, &urlComponents, 32, 1024, 1024, 1024, 2048, 1024); + copy_compsA(&urlSrc, &urlComponents, 32, 1024, 1024, 1024, 1024, 1024); ret = InternetCrackUrlA("about://host/blank", 0,0,&urlComponents); ok(ret, "InternetCrackUrl failed with %d\n", GetLastError()); ok(!strcmp(urlComponents.lpszScheme, "about"), "lpszScheme was \"%s\" instead of \"about\"\n", urlComponents.lpszScheme); @@ -595,7 +595,7 @@ /* try a NULL lpszUrl */ SetLastError(0xdeadbeef); - copy_compsA(&urlSrc, &urlComponents, 32, 1024, 1024, 1024, 2048, 1024); + copy_compsA(&urlSrc, &urlComponents, 32, 1024, 1024, 1024, 1024, 1024); ret = InternetCrackUrlA(NULL, 0, 0, &urlComponents); GLE = GetLastError(); ok(ret == FALSE, "Expected InternetCrackUrl to fail\n"); @@ -605,7 +605,7 @@ * we just need to fail and not return success */ SetLastError(0xdeadbeef); - copy_compsA(&urlSrc, &urlComponents, 32, 1024, 1024, 1024, 2048, 1024); + copy_compsA(&urlSrc, &urlComponents, 32, 1024, 1024, 1024, 1024, 1024); ret = InternetCrackUrlA("", 0, 0, &urlComponents); GLE = GetLastError(); ok(ret == FALSE, "Expected InternetCrackUrl to fail\n"); @@ -613,7 +613,7 @@ /* Invalid Call: must set size of components structure (Windows only * enforces this on the InternetCrackUrlA version of the call) */ - copy_compsA(&urlSrc, &urlComponents, 0, 1024, 1024, 1024, 2048, 1024); + copy_compsA(&urlSrc, &urlComponents, 0, 1024, 1024, 1024, 1024, 1024); SetLastError(0xdeadbeef); urlComponents.dwStructSize = 0; ret = InternetCrackUrlA(TEST_URL, 0, 0, &urlComponents); @@ -624,7 +624,7 @@ /* Invalid Call: size of dwStructSize must be one of the "standard" sizes * of the URL_COMPONENTS structure (Windows only enforces this on the * InternetCrackUrlA version of the call) */ - copy_compsA(&urlSrc, &urlComponents, 0, 1024, 1024, 1024, 2048, 1024); + copy_compsA(&urlSrc, &urlComponents, 0, 1024, 1024, 1024, 1024, 1024); SetLastError(0xdeadbeef); urlComponents.dwStructSize = sizeof(urlComponents) + 1; ret = InternetCrackUrlA(TEST_URL, 0, 0, &urlComponents); @@ -717,11 +717,7 @@ ok( comp.dwExtraInfoLength == 29, "extra length wrong\n"); urlpart[0]=0; - scheme[0]=0; - extra[0]=0; host[0]=0; - user[0]=0; - pwd[0]=0; memset(&comp, 0, sizeof comp); comp.dwStructSize = sizeof comp; comp.lpszHostName = host; @@ -739,11 +735,7 @@ ok( comp.dwExtraInfoLength == 0, "extra length wrong\n"); urlpart[0]=0; - scheme[0]=0; - extra[0]=0; host[0]=0; - user[0]=0; - pwd[0]=0; memset(&comp, 0, sizeof comp); comp.dwStructSize = sizeof comp; comp.lpszHostName = host; @@ -814,6 +806,19 @@ ok( r, "InternetCrackUrlW failed unexpectedly\n"); ok( host[0] == 'x', "host should be x.org\n"); ok( urlpart[0] == 0, "urlpart should be empty\n"); + + urlpart[0] = 0; + host[0] = 0; + memset(&comp, 0, sizeof(comp)); + comp.dwStructSize = sizeof(comp); + comp.lpszHostName = host; + comp.dwHostNameLength = sizeof(host)/sizeof(host[0]); + comp.lpszUrlPath = urlpart; + comp.dwUrlPathLength = sizeof(urlpart)/sizeof(urlpart[0]); + r = InternetCrackUrlW(url3, 0, ICU_DECODE, &comp); + ok(r, "InternetCrackUrlW failed unexpectedly\n"); + ok(!strcmp_wa(host, "x.org"), "host is %s, should be x.org\n", wine_dbgstr_w(host)); + todo_wine ok(urlpart[0] == 0, "urlpart should be empty\n"); } static void fill_url_components(URL_COMPONENTSA *lpUrlComponents)
8 years, 4 months
1
0
0
0
[akhaldi] 72356: [WININET] Sync with Wine Staging 1.9.16. CORE-11866
by akhaldi@svn.reactos.org
Author: akhaldi Date: Fri Aug 19 09:45:28 2016 New Revision: 72356 URL:
http://svn.reactos.org/svn/reactos?rev=72356&view=rev
Log: [WININET] Sync with Wine Staging 1.9.16. CORE-11866 Modified: trunk/reactos/dll/win32/wininet/cookie.c trunk/reactos/dll/win32/wininet/ftp.c trunk/reactos/dll/win32/wininet/http.c trunk/reactos/dll/win32/wininet/internet.c trunk/reactos/dll/win32/wininet/internet.h trunk/reactos/dll/win32/wininet/utility.c trunk/reactos/media/doc/README.WINE Modified: trunk/reactos/dll/win32/wininet/cookie.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wininet/cookie.c…
============================================================================== --- trunk/reactos/dll/win32/wininet/cookie.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/wininet/cookie.c [iso-8859-1] Fri Aug 19 09:45:28 2016 @@ -668,6 +668,33 @@ return res; } +static void free_cookie_domain_list(struct list *list) +{ + cookie_container_t *container; + cookie_domain_t *domain; + + while(!list_empty(list)) { + domain = LIST_ENTRY(list_head(list), cookie_domain_t, entry); + + free_cookie_domain_list(&domain->subdomain_list); + + while(!list_empty(&domain->path_list)) { + container = LIST_ENTRY(list_head(&domain->path_list), cookie_container_t, entry); + + while(!list_empty(&container->cookie_list)) + delete_cookie(LIST_ENTRY(list_head(&container->cookie_list), cookie_t, entry)); + + heap_free(container->cookie_url); + list_remove(&container->entry); + heap_free(container); + } + + heap_free(domain->domain); + list_remove(&domain->entry); + heap_free(domain); + } +} + /*********************************************************************** * InternetGetCookieExW (WININET.@) * @@ -765,7 +792,7 @@ LPSTR lpCookieData, LPDWORD lpdwSize, DWORD flags, void *reserved) { WCHAR *url, *name; - DWORD len, size; + DWORD len, size = 0; BOOL r; TRACE("(%s %s %p %p(%u) %x %p)\n", debugstr_a(lpszUrl), debugstr_a(lpszCookieName), @@ -798,12 +825,12 @@ r = FALSE; } } - *lpdwSize = size; } heap_free( szCookieData ); } } + *lpdwSize = size; heap_free( name ); heap_free( url ); return r; @@ -895,6 +922,7 @@ static const WCHAR szSecure[] = {'s','e','c','u','r','e'}; static const WCHAR szHttpOnly[] = {'h','t','t','p','o','n','l','y'}; static const WCHAR szVersion[] = {'v','e','r','s','i','o','n','='}; + static const WCHAR max_ageW[] = {'m','a','x','-','a','g','e','='}; /* Skip ';' */ if(data.len) @@ -960,9 +988,11 @@ substr_skip(&data, len); FIXME("version not handled (%s)\n",debugstr_wn(data.str, data.len)); + }else if(data.len >= (len = sizeof(max_ageW)/sizeof(WCHAR)) && !strncmpiW(data.str, max_ageW, len)) { + /* Native doesn't support Max-Age attribute. */ + WARN("Max-Age ignored\n"); }else if(data.len) { FIXME("Unknown additional option %s\n", debugstr_wn(data.str, data.len)); - break; } substr_skip(&data, end_ptr - data.str); @@ -987,6 +1017,7 @@ if ((thisCookie->flags & INTERNET_COOKIE_HTTPONLY) && !(flags & INTERNET_COOKIE_HTTPONLY)) { WARN("An attempt to override httponly cookie\n"); SetLastError(ERROR_INVALID_OPERATION); + LeaveCriticalSection(&cookie_cs); return COOKIE_STATE_REJECT; } @@ -1219,5 +1250,9 @@ void free_cookie(void) { - DeleteCriticalSection(&cookie_cs); -} + EnterCriticalSection(&cookie_cs); + + free_cookie_domain_list(&domain_list); + + LeaveCriticalSection(&cookie_cs); +} Modified: trunk/reactos/dll/win32/wininet/ftp.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wininet/ftp.c?re…
============================================================================== --- trunk/reactos/dll/win32/wininet/ftp.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/wininet/ftp.c [iso-8859-1] Fri Aug 19 09:45:28 2016 @@ -336,7 +336,7 @@ hIC = lpwfs->lpAppInfo; - SendAsyncCallback(&lpwfs->hdr, lpwfs->hdr.dwContext, INTERNET_STATUS_SENDING_REQUEST, NULL, 0); + INTERNET_SendCallback(&lpwfs->hdr, lpwfs->hdr.dwContext, INTERNET_STATUS_SENDING_REQUEST, NULL, 0); if (FTP_SendStore(lpwfs, lpszNewRemoteFile, dwFlags)) { @@ -370,7 +370,7 @@ iar.dwResult = (DWORD)bSuccess; iar.dwError = bSuccess ? ERROR_SUCCESS : INTERNET_GetLastError(); - SendAsyncCallback(&lpwfs->hdr, lpwfs->hdr.dwContext, INTERNET_STATUS_REQUEST_COMPLETE, + INTERNET_SendCallback(&lpwfs->hdr, lpwfs->hdr.dwContext, INTERNET_STATUS_REQUEST_COMPLETE, &iar, sizeof(INTERNET_ASYNC_RESULT)); } @@ -520,7 +520,7 @@ iar.dwResult = bSuccess; iar.dwError = bSuccess ? ERROR_SUCCESS : ERROR_INTERNET_EXTENDED_ERROR; - SendAsyncCallback(&lpwfs->hdr, lpwfs->hdr.dwContext, INTERNET_STATUS_REQUEST_COMPLETE, + INTERNET_SendCallback(&lpwfs->hdr, lpwfs->hdr.dwContext, INTERNET_STATUS_REQUEST_COMPLETE, &iar, sizeof(INTERNET_ASYNC_RESULT)); } return bSuccess; @@ -663,7 +663,7 @@ iar.dwResult = (DWORD)bSuccess; iar.dwError = bSuccess ? ERROR_SUCCESS : INTERNET_GetLastError(); - SendAsyncCallback(&lpwfs->hdr, lpwfs->hdr.dwContext, INTERNET_STATUS_REQUEST_COMPLETE, + INTERNET_SendCallback(&lpwfs->hdr, lpwfs->hdr.dwContext, INTERNET_STATUS_REQUEST_COMPLETE, &iar, sizeof(INTERNET_ASYNC_RESULT)); } @@ -863,13 +863,13 @@ { iar.dwResult = (DWORD_PTR)hFindNext; iar.dwError = ERROR_SUCCESS; - SendAsyncCallback(&lpwfs->hdr, lpwfs->hdr.dwContext, INTERNET_STATUS_HANDLE_CREATED, + INTERNET_SendCallback(&lpwfs->hdr, lpwfs->hdr.dwContext, INTERNET_STATUS_HANDLE_CREATED, &iar, sizeof(INTERNET_ASYNC_RESULT)); } iar.dwResult = (DWORD_PTR)hFindNext; iar.dwError = hFindNext ? ERROR_SUCCESS : INTERNET_GetLastError(); - SendAsyncCallback(&lpwfs->hdr, lpwfs->hdr.dwContext, INTERNET_STATUS_REQUEST_COMPLETE, + INTERNET_SendCallback(&lpwfs->hdr, lpwfs->hdr.dwContext, INTERNET_STATUS_REQUEST_COMPLETE, &iar, sizeof(INTERNET_ASYNC_RESULT)); } @@ -1073,7 +1073,7 @@ iar.dwResult = bSuccess; iar.dwError = bSuccess ? ERROR_SUCCESS : ERROR_INTERNET_EXTENDED_ERROR; - SendAsyncCallback(&lpwfs->hdr, lpwfs->hdr.dwContext, INTERNET_STATUS_REQUEST_COMPLETE, + INTERNET_SendCallback(&lpwfs->hdr, lpwfs->hdr.dwContext, INTERNET_STATUS_REQUEST_COMPLETE, &iar, sizeof(INTERNET_ASYNC_RESULT)); } @@ -1389,7 +1389,7 @@ { iar.dwResult = (DWORD_PTR)lpwh->hdr.hInternet; iar.dwError = ERROR_SUCCESS; - SendAsyncCallback(&lpwfs->hdr, lpwfs->hdr.dwContext, INTERNET_STATUS_HANDLE_CREATED, + INTERNET_SendCallback(&lpwfs->hdr, lpwfs->hdr.dwContext, INTERNET_STATUS_HANDLE_CREATED, &iar, sizeof(INTERNET_ASYNC_RESULT)); } @@ -1398,7 +1398,7 @@ }else { iar.dwResult = 0; iar.dwError = INTERNET_GetLastError(); - SendAsyncCallback(&lpwfs->hdr, lpwfs->hdr.dwContext, INTERNET_STATUS_REQUEST_COMPLETE, + INTERNET_SendCallback(&lpwfs->hdr, lpwfs->hdr.dwContext, INTERNET_STATUS_REQUEST_COMPLETE, &iar, sizeof(INTERNET_ASYNC_RESULT)); } } @@ -1723,7 +1723,7 @@ iar.dwResult = (DWORD)bSuccess; iar.dwError = bSuccess ? ERROR_SUCCESS : INTERNET_GetLastError(); - SendAsyncCallback(&lpwfs->hdr, lpwfs->hdr.dwContext, INTERNET_STATUS_REQUEST_COMPLETE, + INTERNET_SendCallback(&lpwfs->hdr, lpwfs->hdr.dwContext, INTERNET_STATUS_REQUEST_COMPLETE, &iar, sizeof(INTERNET_ASYNC_RESULT)); } @@ -1883,7 +1883,7 @@ iar.dwResult = (DWORD)bSuccess; iar.dwError = bSuccess ? ERROR_SUCCESS : INTERNET_GetLastError(); - SendAsyncCallback(&lpwfs->hdr, lpwfs->hdr.dwContext, INTERNET_STATUS_REQUEST_COMPLETE, + INTERNET_SendCallback(&lpwfs->hdr, lpwfs->hdr.dwContext, INTERNET_STATUS_REQUEST_COMPLETE, &iar, sizeof(INTERNET_ASYNC_RESULT)); } @@ -2026,7 +2026,7 @@ iar.dwResult = (DWORD)bSuccess; iar.dwError = bSuccess ? ERROR_SUCCESS : INTERNET_GetLastError(); - SendAsyncCallback(&lpwfs->hdr, lpwfs->hdr.dwContext, INTERNET_STATUS_REQUEST_COMPLETE, + INTERNET_SendCallback(&lpwfs->hdr, lpwfs->hdr.dwContext, INTERNET_STATUS_REQUEST_COMPLETE, &iar, sizeof(INTERNET_ASYNC_RESULT)); } @@ -2185,7 +2185,7 @@ iar.dwResult = (DWORD)bSuccess; iar.dwError = bSuccess ? ERROR_SUCCESS : INTERNET_GetLastError(); - SendAsyncCallback(&lpwfs->hdr, lpwfs->hdr.dwContext, INTERNET_STATUS_REQUEST_COMPLETE, + INTERNET_SendCallback(&lpwfs->hdr, lpwfs->hdr.dwContext, INTERNET_STATUS_REQUEST_COMPLETE, &iar, sizeof(INTERNET_ASYNC_RESULT)); } @@ -2337,7 +2337,7 @@ TRACE("\n"); - SendAsyncCallback(&lpwfs->hdr, lpwfs->hdr.dwContext, + INTERNET_SendCallback(&lpwfs->hdr, lpwfs->hdr.dwContext, INTERNET_STATUS_CLOSING_CONNECTION, 0, 0); if (lpwfs->download_in_progress != NULL) @@ -2352,7 +2352,7 @@ if (lpwfs->pasvSocket != -1) closesocket(lpwfs->pasvSocket); - SendAsyncCallback(&lpwfs->hdr, lpwfs->hdr.dwContext, + INTERNET_SendCallback(&lpwfs->hdr, lpwfs->hdr.dwContext, INTERNET_STATUS_CONNECTION_CLOSED, 0, 0); } @@ -2503,12 +2503,12 @@ iar.dwResult = (DWORD_PTR)lpwfs->hdr.hInternet; iar.dwError = ERROR_SUCCESS; - SendAsyncCallback(&hIC->hdr, dwContext, + INTERNET_SendCallback(&hIC->hdr, dwContext, INTERNET_STATUS_HANDLE_CREATED, &iar, sizeof(INTERNET_ASYNC_RESULT)); } - SendAsyncCallback(&hIC->hdr, dwContext, INTERNET_STATUS_RESOLVING_NAME, + INTERNET_SendCallback(&hIC->hdr, dwContext, INTERNET_STATUS_RESOLVING_NAME, (LPWSTR) lpszServerName, (strlenW(lpszServerName)+1) * sizeof(WCHAR)); sock_namelen = sizeof(socketAddr); @@ -2525,7 +2525,7 @@ goto lerror; } - SendAsyncCallback(&hIC->hdr, dwContext, INTERNET_STATUS_NAME_RESOLVED, + INTERNET_SendCallback(&hIC->hdr, dwContext, INTERNET_STATUS_NAME_RESOLVED, szaddr, strlen(szaddr)+1); init_winsock(); @@ -2536,7 +2536,7 @@ goto lerror; } - SendAsyncCallback(&hIC->hdr, dwContext, INTERNET_STATUS_CONNECTING_TO_SERVER, + INTERNET_SendCallback(&hIC->hdr, dwContext, INTERNET_STATUS_CONNECTING_TO_SERVER, szaddr, strlen(szaddr)+1); if (connect(nsocket, (struct sockaddr *)&socketAddr, sock_namelen) < 0) @@ -2549,7 +2549,7 @@ { TRACE("Connected to server\n"); lpwfs->sndSocket = nsocket; - SendAsyncCallback(&hIC->hdr, dwContext, INTERNET_STATUS_CONNECTED_TO_SERVER, + INTERNET_SendCallback(&hIC->hdr, dwContext, INTERNET_STATUS_CONNECTED_TO_SERVER, szaddr, strlen(szaddr)+1); sock_namelen = sizeof(lpwfs->socketAddress); @@ -2763,7 +2763,7 @@ TRACE("socket(%d)\n", lpwfs->sndSocket); - SendAsyncCallback(&lpwfs->hdr, dwContext, INTERNET_STATUS_RECEIVING_RESPONSE, NULL, 0); + INTERNET_SendCallback(&lpwfs->hdr, dwContext, INTERNET_STATUS_RECEIVING_RESPONSE, NULL, 0); while(1) { @@ -2796,7 +2796,7 @@ { rc = atoi(lpszResponse); - SendAsyncCallback(&lpwfs->hdr, dwContext, INTERNET_STATUS_RESPONSE_RECEIVED, + INTERNET_SendCallback(&lpwfs->hdr, dwContext, INTERNET_STATUS_RESPONSE_RECEIVED, &nRecv, sizeof(DWORD)); } Modified: trunk/reactos/dll/win32/wininet/http.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wininet/http.c?r…
============================================================================== --- trunk/reactos/dll/win32/wininet/http.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/wininet/http.c [iso-8859-1] Fri Aug 19 09:45:28 2016 @@ -388,7 +388,15 @@ DWORD buf_size; DWORD buf_pos; DWORD chunk_size; - BOOL end_of_data; + + enum { + CHUNKED_STREAM_STATE_READING_CHUNK_SIZE, + CHUNKED_STREAM_STATE_DISCARD_EOL_AFTER_SIZE, + CHUNKED_STREAM_STATE_READING_CHUNK, + CHUNKED_STREAM_STATE_DISCARD_EOL_AFTER_DATA, + CHUNKED_STREAM_STATE_DISCARD_EOL_AT_END, + CHUNKED_STREAM_STATE_END_OF_STREAM + } state; } chunked_stream_t; static inline void destroy_data_stream(data_stream_t *stream) @@ -1766,7 +1774,7 @@ if (!ptr) ptr = strchrW( tmp, ' ' ); if (!ptr) - ptr = tmp + strlenW(ptr); + ptr = tmp + strlenW(tmp); ret = HTTP_DomainMatches( server, substr(tmp, ptr-tmp) ); if (ret || !*ptr) break; @@ -1793,8 +1801,10 @@ if(CSTR_EQUAL != CompareStringW(LOCALE_SYSTEM_DEFAULT, NORM_IGNORECASE, proxy, strlenW(szHttp), szHttp, strlenW(szHttp))) { WCHAR *proxy_url = heap_alloc(strlenW(proxy)*sizeof(WCHAR) + sizeof(szHttp)); - if(!proxy_url) + if(!proxy_url) { + heap_free(proxy); return FALSE; + } strcpyW(proxy_url, szHttp); strcatW(proxy_url, proxy); heap_free(proxy); @@ -2691,191 +2701,179 @@ netconn_destroy }; -/* read some more data into the read buffer (the read section must be held) */ -static DWORD read_more_chunked_data(chunked_stream_t *stream, http_request_t *req, int maxlen) -{ - DWORD res; - int len; - - assert(!stream->end_of_data); - - if (stream->buf_pos) - { - /* move existing data to the start of the buffer */ - if(stream->buf_size) - memmove(stream->buf, stream->buf + stream->buf_pos, stream->buf_size); - stream->buf_pos = 0; - } - - if (maxlen == -1) maxlen = sizeof(stream->buf); - - res = NETCON_recv( req->netconn, stream->buf + stream->buf_size, - maxlen - stream->buf_size, TRUE, &len ); - if(res == ERROR_SUCCESS) - stream->buf_size += len; - - return res; -} - -/* remove some amount of data from the read buffer (the read section must be held) */ -static void remove_chunked_data(chunked_stream_t *stream, int count) -{ - if (!(stream->buf_size -= count)) stream->buf_pos = 0; - else stream->buf_pos += count; -} - -/* discard data contents until we reach end of line (the read section must be held) */ -static DWORD discard_chunked_eol(chunked_stream_t *stream, http_request_t *req) -{ - DWORD res; - - do - { - BYTE *eol = memchr(stream->buf + stream->buf_pos, '\n', stream->buf_size); - if (eol) - { - remove_chunked_data(stream, (eol + 1) - (stream->buf + stream->buf_pos)); - break; - } - stream->buf_pos = stream->buf_size = 0; /* discard everything */ - if ((res = read_more_chunked_data(stream, req, -1)) != ERROR_SUCCESS) return res; - } while (stream->buf_size); - return ERROR_SUCCESS; -} - -/* read the size of the next chunk (the read section must be held) */ -static DWORD start_next_chunk(chunked_stream_t *stream, http_request_t *req) -{ - DWORD chunk_size = 0, res; - - assert(!stream->chunk_size || stream->chunk_size == ~0u); - - if (stream->end_of_data) return ERROR_SUCCESS; - - /* read terminator for the previous chunk */ - if(!stream->chunk_size && (res = discard_chunked_eol(stream, req)) != ERROR_SUCCESS) - return res; - - for (;;) - { - while (stream->buf_size) - { - char ch = stream->buf[stream->buf_pos]; - if (ch >= '0' && ch <= '9') chunk_size = chunk_size * 16 + ch - '0'; - else if (ch >= 'a' && ch <= 'f') chunk_size = chunk_size * 16 + ch - 'a' + 10; - else if (ch >= 'A' && ch <= 'F') chunk_size = chunk_size * 16 + ch - 'A' + 10; - else if (ch == ';' || ch == '\r' || ch == '\n') - { - TRACE( "reading %u byte chunk\n", chunk_size ); - stream->chunk_size = chunk_size; - if (req->contentLength == ~0u) req->contentLength = chunk_size; - else req->contentLength += chunk_size; - - /* eat the rest of this line */ - if ((res = discard_chunked_eol(stream, req)) != ERROR_SUCCESS) - return res; - - /* if there's chunk data, return now */ - if (chunk_size) return ERROR_SUCCESS; - - /* otherwise, eat the terminator for this chunk */ - if ((res = discard_chunked_eol(stream, req)) != ERROR_SUCCESS) - return res; - - stream->end_of_data = TRUE; - return ERROR_SUCCESS; - } - remove_chunked_data(stream, 1); - } - if ((res = read_more_chunked_data(stream, req, -1)) != ERROR_SUCCESS) return res; - if (!stream->buf_size) - { - stream->chunk_size = 0; - return ERROR_SUCCESS; - } - } -} - -static DWORD chunked_get_avail_data(data_stream_t *stream, http_request_t *req) -{ - /* Allow reading only from read buffer */ - return 0; +static char next_chunked_data_char(chunked_stream_t *stream) +{ + assert(stream->buf_size); + + stream->buf_size--; + return stream->buf[stream->buf_pos++]; } static BOOL chunked_end_of_data(data_stream_t *stream, http_request_t *req) { chunked_stream_t *chunked_stream = (chunked_stream_t*)stream; - return chunked_stream->end_of_data; + return chunked_stream->state == CHUNKED_STREAM_STATE_END_OF_STREAM; } static DWORD chunked_read(data_stream_t *stream, http_request_t *req, BYTE *buf, DWORD size, DWORD *read, blocking_mode_t blocking_mode) { chunked_stream_t *chunked_stream = (chunked_stream_t*)stream; - DWORD read_bytes = 0, ret_read = 0, res = ERROR_SUCCESS; - - if(!chunked_stream->chunk_size || chunked_stream->chunk_size == ~0u) { - res = start_next_chunk(chunked_stream, req); - if(res != ERROR_SUCCESS) - return res; - } - - while(size && chunked_stream->chunk_size && !chunked_stream->end_of_data) { - if(chunked_stream->buf_size) { - read_bytes = min(size, min(chunked_stream->buf_size, chunked_stream->chunk_size)); - - /* this could block */ - if(blocking_mode == BLOCKING_DISALLOW && read_bytes == chunked_stream->chunk_size) + DWORD ret_read = 0, res = ERROR_SUCCESS; + BOOL continue_read = TRUE; + int read_bytes; + char ch; + + do { + TRACE("state %d\n", chunked_stream->state); + + /* Ensure that we have data in the buffer for states that need it. */ + if(!chunked_stream->buf_size) { + switch(chunked_stream->state) { + case CHUNKED_STREAM_STATE_READING_CHUNK_SIZE: + case CHUNKED_STREAM_STATE_DISCARD_EOL_AFTER_SIZE: + case CHUNKED_STREAM_STATE_DISCARD_EOL_AFTER_DATA: + case CHUNKED_STREAM_STATE_DISCARD_EOL_AT_END: + chunked_stream->buf_pos = 0; + res = NETCON_recv(req->netconn, chunked_stream->buf, sizeof(chunked_stream->buf), blocking_mode != BLOCKING_DISALLOW, &read_bytes); + if(res == ERROR_SUCCESS && read_bytes) { + chunked_stream->buf_size += read_bytes; + }else if(res == WSAEWOULDBLOCK) { + continue_read = FALSE; + continue; + }else { + chunked_stream->state = CHUNKED_STREAM_STATE_END_OF_STREAM; + } break; - - memcpy(buf+ret_read, chunked_stream->buf+chunked_stream->buf_pos, read_bytes); - remove_chunked_data(chunked_stream, read_bytes); - }else { + default: + break; + } + } + + switch(chunked_stream->state) { + case CHUNKED_STREAM_STATE_READING_CHUNK_SIZE: + ch = next_chunked_data_char(chunked_stream); + + if(ch >= '0' && ch <= '9') { + chunked_stream->chunk_size = chunked_stream->chunk_size * 16 + ch - '0'; + }else if(ch >= 'a' && ch <= 'f') { + chunked_stream->chunk_size = chunked_stream->chunk_size * 16 + ch - 'a' + 10; + }else if (ch >= 'A' && ch <= 'F') { + chunked_stream->chunk_size = chunked_stream->chunk_size * 16 + ch - 'A' + 10; + }else if (ch == ';' || ch == '\r' || ch == '\n') { + TRACE("reading %u byte chunk\n", chunked_stream->chunk_size); + chunked_stream->buf_size++; + chunked_stream->buf_pos--; + if(req->contentLength == ~0u) req->contentLength = chunked_stream->chunk_size; + else req->contentLength += chunked_stream->chunk_size; + chunked_stream->state = CHUNKED_STREAM_STATE_DISCARD_EOL_AFTER_SIZE; + } + break; + + case CHUNKED_STREAM_STATE_DISCARD_EOL_AFTER_SIZE: + ch = next_chunked_data_char(chunked_stream); + if(ch == '\n') + chunked_stream->state = chunked_stream->chunk_size + ? CHUNKED_STREAM_STATE_READING_CHUNK + : CHUNKED_STREAM_STATE_DISCARD_EOL_AT_END; + else if(ch != '\r') + WARN("unexpected char '%c'\n", ch); + break; + + case CHUNKED_STREAM_STATE_READING_CHUNK: + assert(chunked_stream->chunk_size); + if(!size) { + continue_read = FALSE; + break; + } read_bytes = min(size, chunked_stream->chunk_size); - if(blocking_mode == BLOCKING_DISALLOW) { - DWORD avail; - - if(!is_valid_netconn(req->netconn) || !NETCON_query_data_available(req->netconn, &avail) || !avail) + if(chunked_stream->buf_size) { + if(read_bytes > chunked_stream->buf_size) + read_bytes = chunked_stream->buf_size; + + memcpy(buf+ret_read, chunked_stream->buf+chunked_stream->buf_pos, read_bytes); + chunked_stream->buf_pos += read_bytes; + chunked_stream->buf_size -= read_bytes; + }else { + res = NETCON_recv(req->netconn, (char*)buf+ret_read, read_bytes, + blocking_mode != BLOCKING_DISALLOW, (int*)&read_bytes); + if(res != ERROR_SUCCESS) { + continue_read = FALSE; break; - if(read_bytes > avail) - read_bytes = avail; - - /* this could block */ - if(read_bytes == chunked_stream->chunk_size) - break; + } + + if(!read_bytes) { + chunked_stream->state = CHUNKED_STREAM_STATE_END_OF_STREAM; + continue; + } } - res = NETCON_recv(req->netconn, (char *)buf+ret_read, read_bytes, TRUE, (int*)&read_bytes); - if(res != ERROR_SUCCESS) - break; - } - - chunked_stream->chunk_size -= read_bytes; - size -= read_bytes; - ret_read += read_bytes; - if(size && !chunked_stream->chunk_size) { - assert(blocking_mode != BLOCKING_DISALLOW); - res = start_next_chunk(chunked_stream, req); - if(res != ERROR_SUCCESS) - break; - } - - if(blocking_mode == BLOCKING_ALLOW) - blocking_mode = BLOCKING_DISALLOW; - } - - TRACE("read %u bytes\n", ret_read); + chunked_stream->chunk_size -= read_bytes; + size -= read_bytes; + ret_read += read_bytes; + if(!chunked_stream->chunk_size) + chunked_stream->state = CHUNKED_STREAM_STATE_DISCARD_EOL_AFTER_DATA; + if(blocking_mode == BLOCKING_ALLOW) + blocking_mode = BLOCKING_DISALLOW; + break; + + case CHUNKED_STREAM_STATE_DISCARD_EOL_AFTER_DATA: + ch = next_chunked_data_char(chunked_stream); + if(ch == '\n') + chunked_stream->state = CHUNKED_STREAM_STATE_READING_CHUNK_SIZE; + else if(ch != '\r') + WARN("unexpected char '%c'\n", ch); + break; + + case CHUNKED_STREAM_STATE_DISCARD_EOL_AT_END: + ch = next_chunked_data_char(chunked_stream); + if(ch == '\n') + chunked_stream->state = CHUNKED_STREAM_STATE_END_OF_STREAM; + else if(ch != '\r') + WARN("unexpected char '%c'\n", ch); + break; + + case CHUNKED_STREAM_STATE_END_OF_STREAM: + continue_read = FALSE; + break; + } + } while(continue_read); + + if(ret_read) + res = ERROR_SUCCESS; + if(res != ERROR_SUCCESS && res != WSAEWOULDBLOCK) + return res; + + TRACE("read %d bytes\n", ret_read); *read = ret_read; - return res; + return ERROR_SUCCESS; +} + +static DWORD chunked_get_avail_data(data_stream_t *stream, http_request_t *req) +{ + chunked_stream_t *chunked_stream = (chunked_stream_t*)stream; + DWORD avail = 0; + + if(chunked_stream->state != CHUNKED_STREAM_STATE_READING_CHUNK) { + DWORD res, read; + + /* try to process to the next chunk */ + res = chunked_read(stream, req, NULL, 0, &read, BLOCKING_DISALLOW); + if(res != ERROR_SUCCESS || chunked_stream->state != CHUNKED_STREAM_STATE_READING_CHUNK) + return 0; + } + + if(is_valid_netconn(req->netconn) && chunked_stream->buf_size < chunked_stream->chunk_size) + NETCON_query_data_available(req->netconn, &avail); + + return min(avail + chunked_stream->buf_size, chunked_stream->chunk_size); } static BOOL chunked_drain_content(data_stream_t *stream, http_request_t *req) { chunked_stream_t *chunked_stream = (chunked_stream_t*)stream; - - remove_chunked_data(chunked_stream, chunked_stream->buf_size); - return chunked_stream->end_of_data; + return chunked_stream->state == CHUNKED_STREAM_STATE_END_OF_STREAM; } static void chunked_destroy(data_stream_t *stream) @@ -2924,8 +2922,8 @@ chunked_stream->data_stream.vtbl = &chunked_stream_vtbl; chunked_stream->buf_size = chunked_stream->buf_pos = 0; - chunked_stream->chunk_size = ~0u; - chunked_stream->end_of_data = FALSE; + chunked_stream->chunk_size = 0; + chunked_stream->state = CHUNKED_STREAM_STATE_READING_CHUNK_SIZE; if(request->read_size) { memcpy(chunked_stream->buf, request->read_buf+request->read_pos, request->read_size); Modified: trunk/reactos/dll/win32/wininet/internet.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wininet/internet…
============================================================================== --- trunk/reactos/dll/win32/wininet/internet.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/wininet/internet.c [iso-8859-1] Fri Aug 19 09:45:28 2016 @@ -113,7 +113,7 @@ handle_table[handle] = ret; ret->valid_handle = TRUE; - while(handle_table[next_handle] && next_handle < handle_table_size) + while(next_handle < handle_table_size && handle_table[next_handle]) next_handle++; } @@ -1896,11 +1896,7 @@ } else { - if (lpUC->lpszUrlPath && (lpUC->dwUrlPathLength > 0)) - lpUC->lpszUrlPath[0] = 0; - else if (lpUC->dwUrlPathLength > 0) - lpUC->lpszUrlPath = (WCHAR*)lpszcp; - lpUC->dwUrlPathLength = 0; + set_url_component(&lpUC->lpszUrlPath, &lpUC->dwUrlPathLength, lpszcp, 0); } TRACE("%s: scheme(%s) host(%s) path(%s) extra(%s)\n", debugstr_wn(lpszUrl,dwUrlLength), @@ -2787,7 +2783,8 @@ FIXME("Option INTERNET_OPTION_RESET_URLCACHE_SESSION: STUB\n"); break; case INTERNET_OPTION_END_BROWSER_SESSION: - FIXME("Option INTERNET_OPTION_END_BROWSER_SESSION: STUB\n"); + FIXME("Option INTERNET_OPTION_END_BROWSER_SESSION: semi-stub\n"); + free_cookie(); break; case INTERNET_OPTION_CONNECTED_STATE: FIXME("Option INTERNET_OPTION_CONNECTED_STATE: STUB\n"); Modified: trunk/reactos/dll/win32/wininet/internet.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wininet/internet…
============================================================================== --- trunk/reactos/dll/win32/wininet/internet.h [iso-8859-1] (original) +++ trunk/reactos/dll/win32/wininet/internet.h [iso-8859-1] Fri Aug 19 09:45:28 2016 @@ -500,10 +500,6 @@ DWORD INTERNET_AsyncCall(task_header_t*) DECLSPEC_HIDDEN; LPSTR INTERNET_GetResponseBuffer(void) DECLSPEC_HIDDEN; -VOID SendAsyncCallback(object_header_t *hdr, DWORD_PTR dwContext, - DWORD dwInternetStatus, LPVOID lpvStatusInfo, - DWORD dwStatusInfoLength) DECLSPEC_HIDDEN; - VOID INTERNET_SendCallback(object_header_t *hdr, DWORD_PTR dwContext, DWORD dwInternetStatus, LPVOID lpvStatusInfo, DWORD dwStatusInfoLength) DECLSPEC_HIDDEN; Modified: trunk/reactos/dll/win32/wininet/utility.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wininet/utility.…
============================================================================== --- trunk/reactos/dll/win32/wininet/utility.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/wininet/utility.c [iso-8859-1] Fri Aug 19 09:45:28 2016 @@ -263,60 +263,3 @@ if(new_info != info) heap_free(new_info); } - -typedef struct { - task_header_t hdr; - DWORD_PTR context; - DWORD status; - LPVOID status_info; - DWORD status_info_len; -} send_callback_task_t; - -static void SendAsyncCallbackProc(task_header_t *hdr) -{ - send_callback_task_t *task = (send_callback_task_t*)hdr; - - TRACE("%p\n", task->hdr.hdr); - - INTERNET_SendCallback(task->hdr.hdr, task->context, task->status, task->status_info, task->status_info_len); - - /* And frees the copy of the status info */ - heap_free(task->status_info); -} - -void SendAsyncCallback(object_header_t *hdr, DWORD_PTR dwContext, - DWORD dwInternetStatus, LPVOID lpvStatusInfo, - DWORD dwStatusInfoLength) -{ - TRACE("(%p, %08lx, %d (%s), %p, %d): %sasync call with callback %p\n", - hdr, dwContext, dwInternetStatus, get_callback_name(dwInternetStatus), - lpvStatusInfo, dwStatusInfoLength, - hdr->dwFlags & INTERNET_FLAG_ASYNC ? "" : "non ", - hdr->lpfnStatusCB); - - if (!(hdr->lpfnStatusCB)) - return; - - if (hdr->dwFlags & INTERNET_FLAG_ASYNC) - { - send_callback_task_t *task; - void *lpvStatusInfo_copy = lpvStatusInfo; - - if (lpvStatusInfo) - { - lpvStatusInfo_copy = heap_alloc(dwStatusInfoLength); - memcpy(lpvStatusInfo_copy, lpvStatusInfo, dwStatusInfoLength); - } - - task = alloc_async_task(hdr, SendAsyncCallbackProc, sizeof(*task)); - task->context = dwContext; - task->status = dwInternetStatus; - task->status_info = lpvStatusInfo_copy; - task->status_info_len = dwStatusInfoLength; - - INTERNET_AsyncCall(&task->hdr); - } - else - INTERNET_SendCallback(hdr, dwContext, dwInternetStatus, - lpvStatusInfo, dwStatusInfoLength); -} Modified: trunk/reactos/media/doc/README.WINE URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
============================================================================== --- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original) +++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Fri Aug 19 09:45:28 2016 @@ -205,7 +205,7 @@ reactos/dll/win32/winemp3.acm # Synced to WineStaging-1.9.11 reactos/dll/win32/wing32 # Synced to WineStaging-1.9.11 reactos/dll/win32/winhttp # Synced to WineStaging-1.9.16 -reactos/dll/win32/wininet # Synced to WineStaging-1.9.11 +reactos/dll/win32/wininet # Synced to WineStaging-1.9.16 reactos/dll/win32/winmm # Forked at Wine-20050628 reactos/dll/win32/winmm/midimap # Forked at Wine-20050628 reactos/dll/win32/winmm/wavemap # Forked at Wine-20050628
8 years, 4 months
1
0
0
0
[akhaldi] 72355: [WINHTTP_WINETEST] Sync with Wine Staging 1.9.16. CORE-11866
by akhaldi@svn.reactos.org
Author: akhaldi Date: Fri Aug 19 09:44:16 2016 New Revision: 72355 URL:
http://svn.reactos.org/svn/reactos?rev=72355&view=rev
Log: [WINHTTP_WINETEST] Sync with Wine Staging 1.9.16. CORE-11866 Modified: trunk/rostests/winetests/winhttp/winhttp.c Modified: trunk/rostests/winetests/winhttp/winhttp.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/winhttp/winhttp…
============================================================================== --- trunk/rostests/winetests/winhttp/winhttp.c [iso-8859-1] (original) +++ trunk/rostests/winetests/winhttp/winhttp.c [iso-8859-1] Fri Aug 19 09:44:16 2016 @@ -624,7 +624,7 @@ test_header_name, NULL, &len, &index); ok(ret == FALSE, "WinHttpQueryHeaders unexpectedly succeeded.\n"); ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "WinHttpQueryHeaders set incorrect error: expected ERROR_INSUFFICENT_BUFFER, go %u\n", GetLastError()); + "WinHttpQueryHeaders set incorrect error: expected ERROR_INSUFFICENT_BUFFER, got %u\n", GetLastError()); ok(len > 40, "WinHttpQueryHeaders returned invalid length: expected greater than 40, got %d\n", len); ok(index == 0, "WinHttpQueryHeaders incorrectly incremented header index.\n"); @@ -3830,7 +3830,9 @@ VariantInit(&ret); if (0) /* crashes */ +{ hr = IWinHttpRequest_Invoke(request, DISPID_HTTPREQUEST_OPTION, &IID_NULL, 0, DISPATCH_PROPERTYPUT, NULL, &ret, NULL, &err); +} params.cArgs = 1; hr = IWinHttpRequest_Invoke(request, DISPID_HTTPREQUEST_OPTION, &IID_NULL, 0, DISPATCH_PROPERTYPUT, ¶ms, &ret, NULL, &err);
8 years, 4 months
1
0
0
0
[akhaldi] 72354: [WINHTTP] Sync with Wine Staging 1.9.16. CORE-11866
by akhaldi@svn.reactos.org
Author: akhaldi Date: Fri Aug 19 09:43:46 2016 New Revision: 72354 URL:
http://svn.reactos.org/svn/reactos?rev=72354&view=rev
Log: [WINHTTP] Sync with Wine Staging 1.9.16. CORE-11866 Modified: trunk/reactos/dll/win32/winhttp/handle.c trunk/reactos/media/doc/README.WINE Modified: trunk/reactos/dll/win32/winhttp/handle.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/winhttp/handle.c…
============================================================================== --- trunk/reactos/dll/win32/winhttp/handle.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/winhttp/handle.c [iso-8859-1] Fri Aug 19 09:43:46 2016 @@ -77,9 +77,10 @@ HINTERNET alloc_handle( object_header_t *hdr ) { object_header_t **p; - ULONG_PTR handle = 0, num; + ULONG_PTR handle, num; list_init( &hdr->children ); + hdr->handle = NULL; EnterCriticalSection( &handle_cs ); if (!max_handles) @@ -100,11 +101,12 @@ if (handles[handle]) ERR("handle isn't free but should be\n"); handles[handle] = addref_object( hdr ); - while (handles[next_handle] && (next_handle < max_handles)) next_handle++; + hdr->handle = (HINTERNET)(handle + 1); + while ((next_handle < max_handles) && handles[next_handle]) next_handle++; end: LeaveCriticalSection( &handle_cs ); - return hdr->handle = (HINTERNET)(handle + 1); + return hdr->handle; } BOOL free_handle( HINTERNET hinternet ) Modified: trunk/reactos/media/doc/README.WINE URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
============================================================================== --- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original) +++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Fri Aug 19 09:43:46 2016 @@ -204,7 +204,7 @@ reactos/dll/win32/windowscodecsext # Synced to WineStaging-1.9.11 reactos/dll/win32/winemp3.acm # Synced to WineStaging-1.9.11 reactos/dll/win32/wing32 # Synced to WineStaging-1.9.11 -reactos/dll/win32/winhttp # Synced to WineStaging-1.9.11 +reactos/dll/win32/winhttp # Synced to WineStaging-1.9.16 reactos/dll/win32/wininet # Synced to WineStaging-1.9.11 reactos/dll/win32/winmm # Forked at Wine-20050628 reactos/dll/win32/winmm/midimap # Forked at Wine-20050628
8 years, 4 months
1
0
0
0
[akhaldi] 72353: [WINDOWSCODECS_WINETEST] Sync with Wine Staging 1.9.16. CORE-11866
by akhaldi@svn.reactos.org
Author: akhaldi Date: Fri Aug 19 09:42:48 2016 New Revision: 72353 URL:
http://svn.reactos.org/svn/reactos?rev=72353&view=rev
Log: [WINDOWSCODECS_WINETEST] Sync with Wine Staging 1.9.16. CORE-11866 Modified: trunk/rostests/winetests/windowscodecs/metadata.c trunk/rostests/winetests/windowscodecs/pngformat.c Modified: trunk/rostests/winetests/windowscodecs/metadata.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/windowscodecs/m…
============================================================================== --- trunk/rostests/winetests/windowscodecs/metadata.c [iso-8859-1] (original) +++ trunk/rostests/winetests/windowscodecs/metadata.c [iso-8859-1] Fri Aug 19 09:42:48 2016 @@ -149,6 +149,16 @@ 0xff,0xff,0xff,0xff /* chunk CRC */ }; +static const char metadata_cHRM[] = { + 0,0,0,32, /* chunk length */ + 'c','H','R','M', /* chunk type */ + 0,0,122,38, 0,0,128,132, /* white point */ + 0,0,250,0, 0,0,128,232, /* red */ + 0,0,117,48, 0,0,234,96, /* green */ + 0,0,58,152, 0,0,23,112, /* blue */ + 0xff,0xff,0xff,0xff /* chunk CRC */ +}; + static const char pngimage[285] = { 0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,0x44,0x52, 0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x08,0x02,0x00,0x00,0x00,0x90,0x77,0x53, @@ -458,6 +468,67 @@ ok(value.vt == VT_UI4, "unexpected vt: %i\n", value.vt); ok(U(value).ulVal == 33333, "unexpected value: %u\n", U(value).ulVal); PropVariantClear(&value); + + IWICMetadataReader_Release(reader); +} + +static void test_metadata_cHRM(void) +{ + HRESULT hr; + IWICMetadataReader *reader; + PROPVARIANT schema, id, value; + ULONG count; + GUID format; + int i; + static const WCHAR expected_names[8][12] = { + {'W','h','i','t','e','P','o','i','n','t','X',0}, + {'W','h','i','t','e','P','o','i','n','t','Y',0}, + {'R','e','d','X',0}, + {'R','e','d','Y',0}, + {'G','r','e','e','n','X',0}, + {'G','r','e','e','n','Y',0}, + {'B','l','u','e','X',0}, + {'B','l','u','e','Y',0}, + }; + static const ULONG expected_vals[8] = { + 31270,32900, 64000,33000, 30000,60000, 15000,6000 + }; + + PropVariantInit(&schema); + PropVariantInit(&id); + PropVariantInit(&value); + + hr = CoCreateInstance(&CLSID_WICPngChrmMetadataReader, NULL, CLSCTX_INPROC_SERVER, + &IID_IWICMetadataReader, (void**)&reader); + ok(hr == S_OK || broken(hr == REGDB_E_CLASSNOTREG) /*winxp*/, "CoCreateInstance failed, hr=%x\n", hr); + if (FAILED(hr)) return; + + load_stream((IUnknown*)reader, metadata_cHRM, sizeof(metadata_cHRM), WICPersistOptionsDefault); + + hr = IWICMetadataReader_GetMetadataFormat(reader, &format); + ok(hr == S_OK, "GetMetadataFormat failed, hr=%x\n", hr); + ok(IsEqualGUID(&format, &GUID_MetadataFormatChunkcHRM), "unexpected format %s\n", wine_dbgstr_guid(&format)); + + hr = IWICMetadataReader_GetCount(reader, &count); + ok(hr == S_OK, "GetCount failed, hr=%x\n", hr); + ok(count == 8, "unexpected count %i\n", count); + + for (i=0; i<8; i++) + { + hr = IWICMetadataReader_GetValueByIndex(reader, i, &schema, &id, &value); + ok(hr == S_OK, "GetValue failed, hr=%x\n", hr); + + ok(schema.vt == VT_EMPTY, "unexpected vt: %i\n", schema.vt); + PropVariantClear(&schema); + + ok(id.vt == VT_LPWSTR, "unexpected vt: %i\n", id.vt); + ok(!lstrcmpW(U(id).pwszVal, expected_names[i]), "got %s, expected %s\n", wine_dbgstr_w(U(id).pwszVal), wine_dbgstr_w(expected_names[i])); + PropVariantClear(&id); + + ok(value.vt == VT_UI4, "unexpected vt: %i\n", value.vt); + ok(U(value).ulVal == expected_vals[i], "got %u, expected %u\n", U(value).ulVal, expected_vals[i]); + PropVariantClear(&value); + } IWICMetadataReader_Release(reader); } @@ -1901,6 +1972,7 @@ test_metadata_unknown(); test_metadata_tEXt(); test_metadata_gAMA(); + test_metadata_cHRM(); test_metadata_IFD(); test_metadata_Exif(); test_create_reader(); Modified: trunk/rostests/winetests/windowscodecs/pngformat.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/windowscodecs/p…
============================================================================== --- trunk/rostests/winetests/windowscodecs/pngformat.c [iso-8859-1] (original) +++ trunk/rostests/winetests/windowscodecs/pngformat.c [iso-8859-1] Fri Aug 19 09:42:48 2016 @@ -1,5 +1,5 @@ /* - * Copyright 2012 Dmitry Timoshkov + * Copyright 2012,2016 Dmitry Timoshkov * Copyright 2012 Hans Leidekker for CodeWeavers * * This library is free software; you can redistribute it and/or @@ -585,6 +585,61 @@ IWICBitmapDecoder_Release(decoder); } +/* RGB 24 bpp 1x1 pixel PNG image */ +static const char png_1x1_data[] = { + 0x89,'P','N','G',0x0d,0x0a,0x1a,0x0a, + 0x00,0x00,0x00,0x0d,'I','H','D','R',0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x08,0x02,0x00,0x00,0x00,0x90,0x77,0x53,0xde, + 0x00,0x00,0x00,0x0c,'I','D','A','T',0x08,0xd7,0x63,0xf8,0xff,0xff,0x3f,0x00,0x05,0xfe,0x02,0xfe,0xdc,0xcc,0x59,0xe7, + 0x00,0x00,0x00,0x00,'I','E','N','D',0xae,0x42,0x60,0x82 +}; + +static void test_color_formats(void) +{ + static const struct + { + char bit_depth, color_type; + const GUID *format; + } td[] = + { + /* 2 - PNG_COLOR_TYPE_RGB */ + { 8, 2, &GUID_WICPixelFormat24bppBGR }, + /* 0 - PNG_COLOR_TYPE_GRAY */ + { 1, 0, &GUID_WICPixelFormatBlackWhite }, + { 2, 0, &GUID_WICPixelFormat2bppGray }, + { 4, 0, &GUID_WICPixelFormat4bppGray }, + { 8, 0, &GUID_WICPixelFormat8bppGray }, + { 16, 0, &GUID_WICPixelFormat16bppGray }, + }; + char buf[sizeof(png_1x1_data)]; + HRESULT hr; + IWICBitmapDecoder *decoder; + IWICBitmapFrameDecode *frame; + GUID format; + int i; + + for (i = 0; i < sizeof(td)/sizeof(td[0]); i++) + { + memcpy(buf, png_1x1_data, sizeof(png_1x1_data)); + buf[24] = td[i].bit_depth; + buf[25] = td[i].color_type; + + decoder = create_decoder(buf, sizeof(buf)); + ok(decoder != NULL, "Failed to load PNG image data\n"); + if (!decoder) continue; + + hr = IWICBitmapDecoder_GetFrame(decoder, 0, &frame); + ok(hr == S_OK, "GetFrame error %#x\n", hr); + + hr = IWICBitmapFrameDecode_GetPixelFormat(frame, &format); + ok(hr == S_OK, "GetPixelFormat error %#x\n", hr); + ok(IsEqualGUID(&format, td[i].format), + "expected %s, got %s\n", wine_dbgstr_guid(td[i].format), wine_dbgstr_guid(&format)); + + IWICBitmapFrameDecode_Release(frame); + IWICBitmapDecoder_Release(decoder); + } +} + START_TEST(pngformat) { HRESULT hr; @@ -597,6 +652,7 @@ test_color_contexts(); test_png_palette(); + test_color_formats(); IWICImagingFactory_Release(factory); CoUninitialize();
8 years, 4 months
1
0
0
0
[akhaldi] 72352: [WINDOWSCODECS] Sync with Wine Staging 1.9.16. CORE-11866
by akhaldi@svn.reactos.org
Author: akhaldi Date: Fri Aug 19 09:42:13 2016 New Revision: 72352 URL:
http://svn.reactos.org/svn/reactos?rev=72352&view=rev
Log: [WINDOWSCODECS] Sync with Wine Staging 1.9.16. CORE-11866 Modified: trunk/reactos/dll/win32/windowscodecs/clsfactory.c trunk/reactos/dll/win32/windowscodecs/icnsformat.c trunk/reactos/dll/win32/windowscodecs/pngformat.c trunk/reactos/dll/win32/windowscodecs/regsvr.c trunk/reactos/dll/win32/windowscodecs/wincodecs_private.h trunk/reactos/dll/win32/windowscodecs/windowscodecs_wincodec.idl trunk/reactos/dll/win32/windowscodecs/windowscodecs_wincodec.rgs trunk/reactos/media/doc/README.WINE Modified: trunk/reactos/dll/win32/windowscodecs/clsfactory.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/windowscodecs/cl…
============================================================================== --- trunk/reactos/dll/win32/windowscodecs/clsfactory.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/windowscodecs/clsfactory.c [iso-8859-1] Fri Aug 19 09:42:13 2016 @@ -42,6 +42,7 @@ {&CLSID_WineTgaDecoder, TgaDecoder_CreateInstance}, {&CLSID_WICUnknownMetadataReader, UnknownMetadataReader_CreateInstance}, {&CLSID_WICIfdMetadataReader, IfdMetadataReader_CreateInstance}, + {&CLSID_WICPngChrmMetadataReader, PngChrmReader_CreateInstance}, {&CLSID_WICPngGamaMetadataReader, PngGamaReader_CreateInstance}, {&CLSID_WICPngTextMetadataReader, PngTextReader_CreateInstance}, {&CLSID_WICLSDMetadataReader, LSDReader_CreateInstance}, Modified: trunk/reactos/dll/win32/windowscodecs/icnsformat.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/windowscodecs/ic…
============================================================================== --- trunk/reactos/dll/win32/windowscodecs/icnsformat.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/windowscodecs/icnsformat.c [iso-8859-1] Fri Aug 19 09:42:13 2016 @@ -159,8 +159,7 @@ This->encoder->outstanding_commits--; LeaveCriticalSection(&This->encoder->lock); } - if (This->icns_image != NULL) - HeapFree(GetProcessHeap(), 0, This->icns_image); + HeapFree(GetProcessHeap(), 0, This->icns_image); IWICBitmapEncoder_Release(&This->encoder->IWICBitmapEncoder_iface); HeapFree(GetProcessHeap(), 0, This); Modified: trunk/reactos/dll/win32/windowscodecs/pngformat.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/windowscodecs/pn…
============================================================================== --- trunk/reactos/dll/win32/windowscodecs/pngformat.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/windowscodecs/pngformat.c [iso-8859-1] Fri Aug 19 09:42:13 2016 @@ -201,6 +201,84 @@ HRESULT PngGamaReader_CreateInstance(REFIID iid, void** ppv) { return MetadataReader_Create(&GamaReader_Vtbl, iid, ppv); +} + +static HRESULT LoadChrmMetadata(IStream *stream, const GUID *preferred_vendor, + DWORD persist_options, MetadataItem **items, DWORD *item_count) +{ + HRESULT hr; + BYTE type[4]; + BYTE *data; + ULONG data_size; + static const WCHAR names[8][12] = { + {'W','h','i','t','e','P','o','i','n','t','X',0}, + {'W','h','i','t','e','P','o','i','n','t','Y',0}, + {'R','e','d','X',0}, + {'R','e','d','Y',0}, + {'G','r','e','e','n','X',0}, + {'G','r','e','e','n','Y',0}, + {'B','l','u','e','X',0}, + {'B','l','u','e','Y',0}, + }; + LPWSTR dyn_names[8] = {0}; + MetadataItem *result; + int i; + + hr = read_png_chunk(stream, type, &data, &data_size); + if (FAILED(hr)) return hr; + + if (data_size < 32) + { + HeapFree(GetProcessHeap(), 0, data); + return E_FAIL; + } + + result = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(MetadataItem)*8); + for (i=0; i<8; i++) + { + dyn_names[i] = HeapAlloc(GetProcessHeap(), 0, sizeof(WCHAR)*(lstrlenW(names[i])+1)); + if (!dyn_names[i]) break; + } + if (!result || i < 8) + { + HeapFree(GetProcessHeap(), 0, result); + for (i=0; i<8; i++) + HeapFree(GetProcessHeap(), 0, dyn_names[i]); + HeapFree(GetProcessHeap(), 0, data); + return E_OUTOFMEMORY; + } + + for (i=0; i<8; i++) + { + PropVariantInit(&result[i].schema); + + PropVariantInit(&result[i].id); + result[i].id.vt = VT_LPWSTR; + result[i].id.u.pwszVal = dyn_names[i]; + lstrcpyW(dyn_names[i], names[i]); + + PropVariantInit(&result[i].value); + result[i].value.vt = VT_UI4; + result[i].value.u.ulVal = read_ulong_be(&data[i*4]); + } + + *items = result; + *item_count = 8; + + HeapFree(GetProcessHeap(), 0, data); + + return S_OK; +} + +static const MetadataHandlerVtbl ChrmReader_Vtbl = { + 0, + &CLSID_WICPngChrmMetadataReader, + LoadChrmMetadata +}; + +HRESULT PngChrmReader_CreateInstance(REFIID iid, void** ppv) +{ + return MetadataReader_Create(&ChrmReader_Vtbl, iid, ppv); } #ifdef SONAME_LIBPNG Modified: trunk/reactos/dll/win32/windowscodecs/regsvr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/windowscodecs/re…
============================================================================== --- trunk/reactos/dll/win32/windowscodecs/regsvr.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/windowscodecs/regsvr.c [iso-8859-1] Fri Aug 19 09:42:13 2016 @@ -1499,6 +1499,21 @@ { NULL } /* list terminator */ }; +static const BYTE cHRM[] = "cHRM"; + +static const struct metadata_pattern pngchrm_metadata_pattern[] = { + { 4, 4, cHRM, mask_all, 4 }, + { 0 } +}; + +static const struct reader_containers pngchrm_containers[] = { + { + &GUID_ContainerFormatPng, + pngchrm_metadata_pattern + }, + { NULL } /* list terminator */ +}; + static const struct metadata_pattern lsd_metadata_patterns[] = { { 0, 6, gif87a_magic, mask_all, 0 }, { 0, 6, gif89a_magic, mask_all, 0 }, @@ -1593,6 +1608,16 @@ &GUID_MetadataFormatIfd, 1, 1, 0, ifd_containers + }, + { &CLSID_WICPngChrmMetadataReader, + "The Wine Project", + "Chunk cHRM Reader", + "1.0.0.0", + "1.0.0.0", + &GUID_VendorMicrosoft, + &GUID_MetadataFormatChunkcHRM, + 0, 0, 0, + pngchrm_containers }, { &CLSID_WICPngGamaMetadataReader, "The Wine Project", Modified: trunk/reactos/dll/win32/windowscodecs/wincodecs_private.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/windowscodecs/wi…
============================================================================== --- trunk/reactos/dll/win32/windowscodecs/wincodecs_private.h [iso-8859-1] (original) +++ trunk/reactos/dll/win32/windowscodecs/wincodecs_private.h [iso-8859-1] Fri Aug 19 09:42:13 2016 @@ -242,6 +242,7 @@ extern HRESULT UnknownMetadataReader_CreateInstance(REFIID iid, void** ppv) DECLSPEC_HIDDEN; extern HRESULT IfdMetadataReader_CreateInstance(REFIID iid, void **ppv) DECLSPEC_HIDDEN; +extern HRESULT PngChrmReader_CreateInstance(REFIID iid, void** ppv) DECLSPEC_HIDDEN; extern HRESULT PngGamaReader_CreateInstance(REFIID iid, void** ppv) DECLSPEC_HIDDEN; extern HRESULT PngTextReader_CreateInstance(REFIID iid, void** ppv) DECLSPEC_HIDDEN; extern HRESULT LSDReader_CreateInstance(REFIID iid, void **ppv) DECLSPEC_HIDDEN; Modified: trunk/reactos/dll/win32/windowscodecs/windowscodecs_wincodec.idl URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/windowscodecs/wi…
============================================================================== --- trunk/reactos/dll/win32/windowscodecs/windowscodecs_wincodec.idl [iso-8859-1] (original) +++ trunk/reactos/dll/win32/windowscodecs/windowscodecs_wincodec.idl [iso-8859-1] Fri Aug 19 09:42:13 2016 @@ -140,6 +140,13 @@ coclass WICIfdMetadataReader { interface IWICIfdMetadataReader; } [ + helpstring("WIC Png cHRM Metadata Reader"), + threading(both), + uuid(f90b5f36-367b-402a-9dd1-bc0fd59d8f62) +] +coclass WICPngChrmMetadataReader { interface IWICMetadataReader; } + +[ helpstring("WIC Png gAMA Metadata Reader"), threading(both), uuid(3692ca39-e082-4350-9e1f-3704cb083cd5) Modified: trunk/reactos/dll/win32/windowscodecs/windowscodecs_wincodec.rgs URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/windowscodecs/wi…
============================================================================== --- trunk/reactos/dll/win32/windowscodecs/windowscodecs_wincodec.rgs [iso-8859-1] (original) +++ trunk/reactos/dll/win32/windowscodecs/windowscodecs_wincodec.rgs [iso-8859-1] Fri Aug 19 09:42:13 2016 @@ -203,6 +203,10 @@ { InprocServer32 = s '%MODULE%' { val ThreadingModel = s 'Both' } } + '{F90B5F36-367B-402A-9DD1-BC0FD59D8F62}' = s 'WIC Png cHRM Metadata Reader' + { + InprocServer32 = s '%MODULE%' { val ThreadingModel = s 'Both' } + } '{3692CA39-E082-4350-9E1F-3704CB083CD5}' = s 'WIC Png gAMA Metadata Reader' { InprocServer32 = s '%MODULE%' { val ThreadingModel = s 'Both' } Modified: trunk/reactos/media/doc/README.WINE URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
============================================================================== --- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original) +++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Fri Aug 19 09:42:13 2016 @@ -200,7 +200,7 @@ reactos/dll/win32/vssapi # Synced to WineStaging-1.9.11 reactos/dll/win32/wbemdisp # Synced to WineStaging-1.9.16 reactos/dll/win32/wbemprox # Synced to WineStaging-1.9.11 -reactos/dll/win32/windowscodecs # Synced to WineStaging-1.9.11 +reactos/dll/win32/windowscodecs # Synced to WineStaging-1.9.16 reactos/dll/win32/windowscodecsext # Synced to WineStaging-1.9.11 reactos/dll/win32/winemp3.acm # Synced to WineStaging-1.9.11 reactos/dll/win32/wing32 # Synced to WineStaging-1.9.11
8 years, 4 months
1
0
0
0
[akhaldi] 72351: [RPCRT4_WINETEST] Sync with Wine Staging 1.9.16. CORE-11866
by akhaldi@svn.reactos.org
Author: akhaldi Date: Fri Aug 19 09:41:01 2016 New Revision: 72351 URL:
http://svn.reactos.org/svn/reactos?rev=72351&view=rev
Log: [RPCRT4_WINETEST] Sync with Wine Staging 1.9.16. CORE-11866 Modified: trunk/rostests/winetests/rpcrt4/ndr_marshall.c trunk/rostests/winetests/rpcrt4/rpc.c Modified: trunk/rostests/winetests/rpcrt4/ndr_marshall.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/rpcrt4/ndr_mars…
============================================================================== --- trunk/rostests/winetests/rpcrt4/ndr_marshall.c [iso-8859-1] (original) +++ trunk/rostests/winetests/rpcrt4/ndr_marshall.c [iso-8859-1] Fri Aug 19 09:41:01 2016 @@ -2434,7 +2434,9 @@ todo_wine ok(status == RPC_S_INVALID_ARG, "got %d\n", status); if (status == RPC_S_OK) +{ MesHandleFree(handle); +} status = MesEncodeFixedBufferHandleCreate(buffer, 32, NULL, &handle); ok(status == RPC_S_INVALID_ARG, "got %d\n", status); Modified: trunk/rostests/winetests/rpcrt4/rpc.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/rpcrt4/rpc.c?re…
============================================================================== --- trunk/rostests/winetests/rpcrt4/rpc.c [iso-8859-1] (original) +++ trunk/rostests/winetests/rpcrt4/rpc.c [iso-8859-1] Fri Aug 19 09:41:01 2016 @@ -909,6 +909,14 @@ HeapFree( GetProcessHeap(), 0, username ); } +static void test_RpcServerRegisterAuthInfo(void) +{ + RPC_STATUS status; + + status = RpcServerRegisterAuthInfoW(NULL, 600, NULL, NULL); + ok(status == RPC_S_UNKNOWN_AUTHN_SERVICE, "status = %x\n", status); +} + START_TEST( rpc ) { UuidConversionAndComparison(); @@ -923,4 +931,5 @@ test_UuidCreateSequential(); test_RpcBindingFree(); test_RpcServerInqDefaultPrincName(); -} + test_RpcServerRegisterAuthInfo(); +}
8 years, 4 months
1
0
0
0
[akhaldi] 72350: [RPCRT4] Sync with Wine Staging 1.9.16. CORE-11866
by akhaldi@svn.reactos.org
Author: akhaldi Date: Fri Aug 19 09:40:25 2016 New Revision: 72350 URL:
http://svn.reactos.org/svn/reactos?rev=72350&view=rev
Log: [RPCRT4] Sync with Wine Staging 1.9.16. CORE-11866 Modified: trunk/reactos/dll/win32/rpcrt4/ndr_stubless.c trunk/reactos/dll/win32/rpcrt4/rpc_server.c trunk/reactos/dll/win32/rpcrt4/rpcrt4.spec trunk/reactos/media/doc/README.WINE Modified: trunk/reactos/dll/win32/rpcrt4/ndr_stubless.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/rpcrt4/ndr_stubl…
============================================================================== --- trunk/reactos/dll/win32/rpcrt4/ndr_stubless.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/rpcrt4/ndr_stubless.c [iso-8859-1] Fri Aug 19 09:40:25 2016 @@ -1829,3 +1829,8 @@ FIXME("unimplemented, expect crash!\n"); return 0; } + +void RPC_ENTRY NdrAsyncServerCall(PRPC_MESSAGE pRpcMsg) +{ + FIXME("unimplemented, %p\n", pRpcMsg); +} Modified: trunk/reactos/dll/win32/rpcrt4/rpc_server.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/rpcrt4/rpc_serve…
============================================================================== --- trunk/reactos/dll/win32/rpcrt4/rpc_server.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/rpcrt4/rpc_server.c [iso-8859-1] Fri Aug 19 09:40:25 2016 @@ -1288,10 +1288,43 @@ { struct list entry; TimeStamp exp; + BOOL cred_acquired; CredHandle cred; ULONG max_token; USHORT auth_type; + WCHAR *principal; }; + +static RPC_STATUS find_security_package(ULONG auth_type, SecPkgInfoW **packages_buf, SecPkgInfoW **ret) +{ + SECURITY_STATUS sec_status; + SecPkgInfoW *packages; + ULONG package_count; + ULONG i; + + sec_status = EnumerateSecurityPackagesW(&package_count, &packages); + if (sec_status != SEC_E_OK) + { + ERR("EnumerateSecurityPackagesW failed with error 0x%08x\n", sec_status); + return RPC_S_SEC_PKG_ERROR; + } + + for (i = 0; i < package_count; i++) + if (packages[i].wRPCID == auth_type) + break; + + if (i == package_count) + { + WARN("unsupported AuthnSvc %u\n", auth_type); + FreeContextBuffer(packages); + return RPC_S_UNKNOWN_AUTHN_SERVICE; + } + + TRACE("found package %s for service %u\n", debugstr_w(packages[i].Name), auth_type); + *packages_buf = packages; + *ret = packages + i; + return RPC_S_OK; +} RPC_STATUS RPCRT4_ServerGetRegisteredAuthInfo( USHORT auth_type, CredHandle *cred, TimeStamp *exp, ULONG *max_token) @@ -1304,6 +1337,28 @@ { if (auth_info->auth_type == auth_type) { + if (!auth_info->cred_acquired) + { + SecPkgInfoW *packages, *package; + SECURITY_STATUS sec_status; + + status = find_security_package(auth_info->auth_type, &packages, &package); + if (status != RPC_S_OK) + break; + + sec_status = AcquireCredentialsHandleW((SEC_WCHAR *)auth_info->principal, package->Name, + SECPKG_CRED_INBOUND, NULL, NULL, NULL, NULL, + &auth_info->cred, &auth_info->exp); + FreeContextBuffer(packages); + if (sec_status != SEC_E_OK) + { + status = RPC_S_SEC_PKG_ERROR; + break; + } + + auth_info->cred_acquired = TRUE; + } + *cred = auth_info->cred; *exp = auth_info->exp; *max_token = auth_info->max_token; @@ -1323,7 +1378,9 @@ EnterCriticalSection(&server_auth_info_cs); LIST_FOR_EACH_ENTRY_SAFE(auth_info, cursor2, &server_registered_auth_info, struct rpc_server_registered_auth_info, entry) { - FreeCredentialsHandle(&auth_info->cred); + if (auth_info->cred_acquired) + FreeCredentialsHandle(&auth_info->cred); + HeapFree(GetProcessHeap(), 0, auth_info->principal); HeapFree(GetProcessHeap(), 0, auth_info); } LeaveCriticalSection(&server_auth_info_cs); @@ -1336,120 +1393,51 @@ RPC_STATUS WINAPI RpcServerRegisterAuthInfoA( RPC_CSTR ServerPrincName, ULONG AuthnSvc, RPC_AUTH_KEY_RETRIEVAL_FN GetKeyFn, LPVOID Arg ) { - SECURITY_STATUS sec_status; - CredHandle cred; - TimeStamp exp; - ULONG package_count; - ULONG i; - PSecPkgInfoA packages; + WCHAR *principal_name = NULL; + RPC_STATUS status; + + TRACE("(%s,%u,%p,%p)\n", ServerPrincName, AuthnSvc, GetKeyFn, Arg); + + if(ServerPrincName && !(principal_name = RPCRT4_strdupAtoW((const char*)ServerPrincName))) + return RPC_S_OUT_OF_RESOURCES; + + status = RpcServerRegisterAuthInfoW(principal_name, AuthnSvc, GetKeyFn, Arg); + + HeapFree(GetProcessHeap(), 0, principal_name); + return status; +} + +/*********************************************************************** + * RpcServerRegisterAuthInfoW (RPCRT4.@) + */ +RPC_STATUS WINAPI RpcServerRegisterAuthInfoW( RPC_WSTR ServerPrincName, ULONG AuthnSvc, RPC_AUTH_KEY_RETRIEVAL_FN GetKeyFn, + LPVOID Arg ) +{ + struct rpc_server_registered_auth_info *auth_info; + SecPkgInfoW *packages, *package; ULONG max_token; - struct rpc_server_registered_auth_info *auth_info; - - TRACE("(%s,%u,%p,%p)\n", ServerPrincName, AuthnSvc, GetKeyFn, Arg); - - sec_status = EnumerateSecurityPackagesA(&package_count, &packages); - if (sec_status != SEC_E_OK) - { - ERR("EnumerateSecurityPackagesA failed with error 0x%08x\n", - sec_status); - return RPC_S_SEC_PKG_ERROR; - } - - for (i = 0; i < package_count; i++) - if (packages[i].wRPCID == AuthnSvc) - break; - - if (i == package_count) - { - WARN("unsupported AuthnSvc %u\n", AuthnSvc); - FreeContextBuffer(packages); - return RPC_S_UNKNOWN_AUTHN_SERVICE; - } - TRACE("found package %s for service %u\n", packages[i].Name, - AuthnSvc); - sec_status = AcquireCredentialsHandleA((SEC_CHAR *)ServerPrincName, - packages[i].Name, - SECPKG_CRED_INBOUND, NULL, NULL, - NULL, NULL, &cred, &exp); - max_token = packages[i].cbMaxToken; + RPC_STATUS status; + + TRACE("(%s,%u,%p,%p)\n", debugstr_w(ServerPrincName), AuthnSvc, GetKeyFn, Arg); + + status = find_security_package(AuthnSvc, &packages, &package); + if (status != RPC_S_OK) + return status; + + max_token = package->cbMaxToken; FreeContextBuffer(packages); - if (sec_status != SEC_E_OK) - return RPC_S_SEC_PKG_ERROR; auth_info = HeapAlloc(GetProcessHeap(), 0, sizeof(*auth_info)); if (!auth_info) - { - FreeCredentialsHandle(&cred); return RPC_S_OUT_OF_RESOURCES; - } - - auth_info->exp = exp; - auth_info->cred = cred; - auth_info->max_token = max_token; - auth_info->auth_type = AuthnSvc; - - EnterCriticalSection(&server_auth_info_cs); - list_add_tail(&server_registered_auth_info, &auth_info->entry); - LeaveCriticalSection(&server_auth_info_cs); - - return RPC_S_OK; -} - -/*********************************************************************** - * RpcServerRegisterAuthInfoW (RPCRT4.@) - */ -RPC_STATUS WINAPI RpcServerRegisterAuthInfoW( RPC_WSTR ServerPrincName, ULONG AuthnSvc, RPC_AUTH_KEY_RETRIEVAL_FN GetKeyFn, - LPVOID Arg ) -{ - SECURITY_STATUS sec_status; - CredHandle cred; - TimeStamp exp; - ULONG package_count; - ULONG i; - PSecPkgInfoW packages; - ULONG max_token; - struct rpc_server_registered_auth_info *auth_info; - - TRACE("(%s,%u,%p,%p)\n", debugstr_w(ServerPrincName), AuthnSvc, GetKeyFn, Arg); - - sec_status = EnumerateSecurityPackagesW(&package_count, &packages); - if (sec_status != SEC_E_OK) - { - ERR("EnumerateSecurityPackagesW failed with error 0x%08x\n", - sec_status); - return RPC_S_SEC_PKG_ERROR; - } - - for (i = 0; i < package_count; i++) - if (packages[i].wRPCID == AuthnSvc) - break; - - if (i == package_count) - { - WARN("unsupported AuthnSvc %u\n", AuthnSvc); - FreeContextBuffer(packages); - return RPC_S_UNKNOWN_AUTHN_SERVICE; - } - TRACE("found package %s for service %u\n", debugstr_w(packages[i].Name), - AuthnSvc); - sec_status = AcquireCredentialsHandleW((SEC_WCHAR *)ServerPrincName, - packages[i].Name, - SECPKG_CRED_INBOUND, NULL, NULL, - NULL, NULL, &cred, &exp); - max_token = packages[i].cbMaxToken; - FreeContextBuffer(packages); - if (sec_status != SEC_E_OK) - return RPC_S_SEC_PKG_ERROR; - - auth_info = HeapAlloc(GetProcessHeap(), 0, sizeof(*auth_info)); - if (!auth_info) - { - FreeCredentialsHandle(&cred); + + if (!ServerPrincName) { + auth_info->principal = NULL; + }else if (!(auth_info->principal = RPCRT4_strdupW(ServerPrincName))) { + HeapFree(GetProcessHeap(), 0, auth_info); return RPC_S_OUT_OF_RESOURCES; } - auth_info->exp = exp; - auth_info->cred = cred; auth_info->max_token = max_token; auth_info->auth_type = AuthnSvc; Modified: trunk/reactos/dll/win32/rpcrt4/rpcrt4.spec URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/rpcrt4/rpcrt4.sp…
============================================================================== --- trunk/reactos/dll/win32/rpcrt4/rpcrt4.spec [iso-8859-1] (original) +++ trunk/reactos/dll/win32/rpcrt4/rpcrt4.spec [iso-8859-1] Fri Aug 19 09:40:25 2016 @@ -124,7 +124,7 @@ 124 stub NDRcopy 125 stdcall NdrAllocate(ptr long) 126 varargs NdrAsyncClientCall(ptr ptr) -127 stub NdrAsyncServerCall +127 stdcall NdrAsyncServerCall(ptr) 128 stdcall NdrByteCountPointerBufferSize(ptr ptr ptr) 129 stdcall NdrByteCountPointerFree(ptr ptr ptr) 130 stdcall NdrByteCountPointerMarshall(ptr ptr ptr) Modified: trunk/reactos/media/doc/README.WINE URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
============================================================================== --- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original) +++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Fri Aug 19 09:40:25 2016 @@ -163,7 +163,7 @@ reactos/dll/win32/resutils # Synced to WineStaging-1.9.11 reactos/dll/win32/riched20 # Synced to WineStaging-1.9.16 reactos/dll/win32/riched32 # Synced to WineStaging-1.9.11 -reactos/dll/win32/rpcrt4 # Synced to WineStaging-1.9.11 +reactos/dll/win32/rpcrt4 # Synced to WineStaging-1.9.16 reactos/dll/win32/rsabase # Synced to WineStaging-1.9.11 reactos/dll/win32/rsaenh # Synced to WineStaging-1.9.11 reactos/dll/win32/sccbase # Synced to WineStaging-1.9.11
8 years, 4 months
1
0
0
0
[akhaldi] 72349: [OLE32_WINETEST] Sync with Wine Staging 1.9.16. CORE-11866
by akhaldi@svn.reactos.org
Author: akhaldi Date: Fri Aug 19 09:39:12 2016 New Revision: 72349 URL:
http://svn.reactos.org/svn/reactos?rev=72349&view=rev
Log: [OLE32_WINETEST] Sync with Wine Staging 1.9.16. CORE-11866 Modified: trunk/rostests/winetests/ole32/compobj.c Modified: trunk/rostests/winetests/ole32/compobj.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/ole32/compobj.c…
============================================================================== --- trunk/rostests/winetests/ole32/compobj.c [iso-8859-1] (original) +++ trunk/rostests/winetests/ole32/compobj.c [iso-8859-1] Fri Aug 19 09:39:12 2016 @@ -2889,7 +2889,9 @@ HRESULT hr; if (0) /* crashes on native */ +{ hr = CoGetMalloc(0, NULL); +} imalloc = (void*)0xdeadbeef; hr = CoGetMalloc(0, &imalloc);
8 years, 4 months
1
0
0
0
← Newer
1
...
15
16
17
18
19
20
21
...
47
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
Results per page:
10
25
50
100
200