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
July 2007
----- 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
3 participants
957 discussions
Start a n
N
ew thread
Francois Gouget : ddraw/tests: Fix compilation on systems that don' t support nameless unions.
by Alexandre Julliard
05 Jul '07
05 Jul '07
Module: wine Branch: master Commit: 090fd6d9d29a12138565838b0e48f749c1a6e97a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=090fd6d9d29a12138565838b0…
Author: Francois Gouget <fgouget(a)free.fr> Date: Thu Jul 5 16:10:03 2007 +0200 ddraw/tests: Fix compilation on systems that don't support nameless unions. --- dlls/ddraw/tests/d3d.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dlls/ddraw/tests/d3d.c b/dlls/ddraw/tests/d3d.c index 0fa5bd8..aaaaeb8 100644 --- a/dlls/ddraw/tests/d3d.c +++ b/dlls/ddraw/tests/d3d.c @@ -321,21 +321,21 @@ static void LightTest(void) rc = IDirect3DDevice7_SetMaterial(lpD3DDevice, &mat); ok(rc == D3D_OK, "IDirect3DDevice7_SetMaterial returned: %x\n", rc); - mat.power = 129.0; + U4(mat).power = 129.0; rc = IDirect3DDevice7_SetMaterial(lpD3DDevice, &mat); ok(rc == D3D_OK, "IDirect3DDevice7_SetMaterial(power = 129.0) returned: %x\n", rc); memset(&mat, 0, sizeof(mat)); rc = IDirect3DDevice7_GetMaterial(lpD3DDevice, &mat); ok(rc == D3D_OK, "IDirect3DDevice7_GetMaterial returned: %x\n", rc); - ok(mat.power == 129, "Returned power is %f\n", mat.power); + ok(U4(mat).power == 129, "Returned power is %f\n", U4(mat).power); - mat.power = -1.0; + U4(mat).power = -1.0; rc = IDirect3DDevice7_SetMaterial(lpD3DDevice, &mat); ok(rc == D3D_OK, "IDirect3DDevice7_SetMaterial(power = -1.0) returned: %x\n", rc); memset(&mat, 0, sizeof(mat)); rc = IDirect3DDevice7_GetMaterial(lpD3DDevice, &mat); ok(rc == D3D_OK, "IDirect3DDevice7_GetMaterial returned: %x\n", rc); - ok(mat.power == -1, "Returned power is %f\n", mat.power); + ok(U4(mat).power == -1, "Returned power is %f\n", U4(mat).power); } static void ProcessVerticesTest(void)
1
0
0
0
Huw Davies : gdi32: Using a bitmap font as the fallback sans serif is a very bad idea.
by Alexandre Julliard
05 Jul '07
05 Jul '07
Module: wine Branch: master Commit: 7495d814954420c16e21de40c3031a9c95385f56 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7495d814954420c16e21de40c…
Author: Huw Davies <huw(a)codeweavers.com> Date: Thu Jul 5 15:27:20 2007 +0100 gdi32: Using a bitmap font as the fallback sans serif is a very bad idea. --- dlls/gdi32/freetype.c | 2 +- dlls/gdi32/tests/font.c | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 1 deletions(-) diff --git a/dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c index 33c9f1d..9db2d3e 100644 --- a/dlls/gdi32/freetype.c +++ b/dlls/gdi32/freetype.c @@ -337,7 +337,7 @@ static struct list font_subst_list = LIST_INIT(font_subst_list); static struct list font_list = LIST_INIT(font_list); static const WCHAR defSerif[] = {'T','i','m','e','s',' ','N','e','w',' ','R','o','m','a','n','\0'}; -static const WCHAR defSans[] = {'M','S',' ','S','a','n','s',' ','S','e','r','i','f','\0'}; +static const WCHAR defSans[] = {'A','r','i','a','l','\0'}; static const WCHAR defFixed[] = {'C','o','u','r','i','e','r',' ','N','e','w','\0'}; static const WCHAR RegularW[] = {'R','e','g','u','l','a','r','\0'}; diff --git a/dlls/gdi32/tests/font.c b/dlls/gdi32/tests/font.c index b51c89b..92aad9e 100644 --- a/dlls/gdi32/tests/font.c +++ b/dlls/gdi32/tests/font.c @@ -1654,6 +1654,36 @@ static void test_GetTextMetrics(void) ReleaseDC(0, hdc); } +static void test_non_existent_font(void) +{ + LOGFONTA lf; + HDC hdc; + HFONT hfont; + char buf[LF_FACESIZE]; + + if (!is_truetype_font_installed("Arial Black")) + { + skip("Arial not installed\n"); + return; + } + + hdc = GetDC(0); + + memset(&lf, 0, sizeof(lf)); + lf.lfHeight = 100; + lf.lfWeight = FW_REGULAR; + lf.lfCharSet = ANSI_CHARSET; + lf.lfPitchAndFamily = FF_SWISS; + strcpy(lf.lfFaceName, "Non existent font"); + + hfont = CreateFontIndirectA(&lf); + hfont = SelectObject(hdc, hfont); + GetTextFaceA(hdc, sizeof(buf), buf); + ok(!lstrcmpiA(buf, "Arial"), "Got %s\n", buf); + DeleteObject(SelectObject(hdc, hfont)); + ReleaseDC(0, hdc); +} + START_TEST(font) { init(); @@ -1670,6 +1700,8 @@ START_TEST(font) test_SetTextJustification(); test_font_charset(); test_GetFontUnicodeRanges(); + test_non_existent_font(); + /* On Windows Arial has a lot of default charset aliases such as Arial Cyr, * I'd like to avoid them in this test. */
1
0
0
0
Pedro Araujo Chaves Jr : winspool.drv: Fallback to the first found printer as default printer.
by Alexandre Julliard
05 Jul '07
05 Jul '07
Module: wine Branch: master Commit: ffbd30dd88157299807f4b8c3f3363768b75ecae URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ffbd30dd88157299807f4b8c3…
Author: Pedro Araujo Chaves Jr <inckie(a)gmail.com> Date: Wed Jul 4 20:22:15 2007 -0300 winspool.drv: Fallback to the first found printer as default printer. --- dlls/winspool.drv/info.c | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/dlls/winspool.drv/info.c b/dlls/winspool.drv/info.c index 19b70be..bc0f400 100644 --- a/dlls/winspool.drv/info.c +++ b/dlls/winspool.drv/info.c @@ -416,7 +416,7 @@ static void *cupshandle; static BOOL CUPS_LoadPrinters(void) { int i, nrofdests; - BOOL hadprinter = FALSE; + BOOL hadprinter = FALSE, haddefault = FALSE; cups_dest_t *dests; PRINTER_INFO_2A pinfo2a; char *port,*devline; @@ -494,9 +494,13 @@ static BOOL CUPS_LoadPrinters(void) HeapFree(GetProcessHeap(),0,port); hadprinter = TRUE; - if (dests[i].is_default) + if (dests[i].is_default) { WINSPOOL_SetDefaultPrinter(dests[i].name, dests[i].name, TRUE); + haddefault = TRUE; + } } + if (hadprinter & !haddefault) + WINSPOOL_SetDefaultPrinter(dests[0].name, dests[0].name, TRUE); RegCloseKey(hkeyPrinters); return hadprinter; }
1
0
0
0
Paul Vriens : secur32/tests: Use skip when functions are not available.
by Alexandre Julliard
05 Jul '07
05 Jul '07
Module: wine Branch: master Commit: fe7e83fd0cb4d92589dd8485725f611d0df8dfa6 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=fe7e83fd0cb4d92589dd84857…
Author: Paul Vriens <paul.vriens.wine(a)gmail.com> Date: Thu Jul 5 15:18:20 2007 +0200 secur32/tests: Use skip when functions are not available. --- dlls/secur32/tests/ntlm.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/dlls/secur32/tests/ntlm.c b/dlls/secur32/tests/ntlm.c index 435b636..f30f65e 100644 --- a/dlls/secur32/tests/ntlm.c +++ b/dlls/secur32/tests/ntlm.c @@ -1282,7 +1282,9 @@ START_TEST(ntlm) testSignSeal(); test_cred_multiple_use(); - } + } + else + skip("Needed functions are not available\n"); if(secdll) FreeLibrary(secdll);
1
0
0
0
Paul Vriens : advapi32/tests: Use skip for not implemented function.
by Alexandre Julliard
05 Jul '07
05 Jul '07
Module: wine Branch: master Commit: 21492e49044c5cb7658140a7221fc910573e2ee8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=21492e49044c5cb7658140a72…
Author: Paul Vriens <paul.vriens.wine(a)gmail.com> Date: Thu Jul 5 17:22:27 2007 +0200 advapi32/tests: Use skip for not implemented function. --- dlls/advapi32/tests/security.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/dlls/advapi32/tests/security.c b/dlls/advapi32/tests/security.c index 532dc69..247827c 100644 --- a/dlls/advapi32/tests/security.c +++ b/dlls/advapi32/tests/security.c @@ -1734,9 +1734,15 @@ static void test_GetNamedSecurityInfoA(void) ret = GetWindowsDirectoryA(windows_dir, MAX_PATH); ok(ret, "GetWindowsDirectory failed with error %d\n", GetLastError()); + SetLastError(0xdeadbeef); error = GetNamedSecurityInfoA(windows_dir, SE_FILE_OBJECT, OWNER_SECURITY_INFORMATION|GROUP_SECURITY_INFORMATION|DACL_SECURITY_INFORMATION, NULL, NULL, NULL, NULL, &pSecDesc); + if (error != ERROR_SUCCESS && (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)) + { + skip("GetNamedSecurityInfoA is not implemented\n"); + return; + } ok(!error, "GetNamedSecurityInfo failed with error %d\n", error); ret = GetSecurityDescriptorControl(pSecDesc, &control, &revision);
1
0
0
0
Paul Vriens : kernel32/tests 2/2: Use skip for not implemented function.
by Alexandre Julliard
05 Jul '07
05 Jul '07
Module: wine Branch: master Commit: 35edd40f33ba8dce6d2c39fda46c6b5045947c1c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=35edd40f33ba8dce6d2c39fda…
Author: Paul Vriens <paul.vriens.wine(a)gmail.com> Date: Thu Jul 5 16:35:10 2007 +0200 kernel32/tests 2/2: Use skip for not implemented function. --- dlls/kernel32/tests/profile.c | 24 +++++++++++++++--------- 1 files changed, 15 insertions(+), 9 deletions(-) diff --git a/dlls/kernel32/tests/profile.c b/dlls/kernel32/tests/profile.c index 4824ce8..b875134 100644 --- a/dlls/kernel32/tests/profile.c +++ b/dlls/kernel32/tests/profile.c @@ -227,31 +227,37 @@ static void test_profile_sections_names(void) ok( ret == 25, "expected return size 25, got %d\n", ret ); ok( buf[ret+1] == 0 && buf[ret] == 0, "returned buffer not terminated with double-null\n" ); + /* Tests on nonexistent file */ + memset(buf, 0xcc, sizeof(buf)); + ret = GetPrivateProfileSectionNamesA( buf, 10, ".\\not_here.ini" ); + ok( ret == 0, "expected return size 0, got %d\n", ret ); + ok( buf[0] == 0, "returned buffer not terminated with null\n" ); + ok( buf[1] != 0, "returned buffer terminated with double-null\n" ); /* Test with sufficiently large buffer */ + SetLastError(0xdeadbeef); ret = GetPrivateProfileSectionNamesW( bufW, 29, testfile3W ); + { + skip("GetPrivateProfileSectionNamesW is not implemented\n"); + DeleteFileA( testfile3 ); + return; + } ok( ret == 27, "expected return size 27, got %d\n", ret ); - ok( buf[ret-1] == 0 && buf[ret] == 0, "returned buffer not terminated with double-null\n" ); + ok( bufW[ret-1] == 0 && bufW[ret] == 0, "returned buffer not terminated with double-null\n" ); /* Test with exactly fitting buffer */ ret = GetPrivateProfileSectionNamesW( bufW, 28, testfile3W ); ok( ret == 26, "expected return size 26, got %d\n", ret ); - ok( buf[ret+1] == 0 && buf[ret] == 0, "returned buffer not terminated with double-null\n" ); + ok( bufW[ret+1] == 0 && bufW[ret] == 0, "returned buffer not terminated with double-null\n" ); /* Test with a buffer too small */ ret = GetPrivateProfileSectionNamesW( bufW, 27, testfile3W ); ok( ret == 25, "expected return size 25, got %d\n", ret ); - ok( buf[ret+1] == 0 && buf[ret] == 0, "returned buffer not terminated with double-null\n" ); + ok( bufW[ret+1] == 0 && bufW[ret] == 0, "returned buffer not terminated with double-null\n" ); DeleteFileA( testfile3 ); /* Tests on nonexistent file */ - memset(buf, 0xcc, sizeof(buf)); - ret = GetPrivateProfileSectionNamesA( buf, 10, ".\\not_here.ini" ); - ok( ret == 0, "expected return size 0, got %d\n", ret ); - ok( buf[0] == 0, "returned buffer not terminated with null\n" ); - ok( buf[1] != 0, "returned buffer terminated with double-null\n" ); - memset(bufW, 0xcc, sizeof(bufW)); ret = GetPrivateProfileSectionNamesW( bufW, 10, not_here ); ok( ret == 0, "expected return size 0, got %d\n", ret );
1
0
0
0
Paul Vriens : kernel32/tests: Don't crash on win98.
by Alexandre Julliard
05 Jul '07
05 Jul '07
Module: wine Branch: master Commit: 4f86b5cd072f96fb907399f78a4ab84963857383 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4f86b5cd072f96fb907399f78…
Author: Paul Vriens <paul.vriens.wine(a)gmail.com> Date: Thu Jul 5 16:30:09 2007 +0200 kernel32/tests: Don't crash on win98. --- dlls/kernel32/tests/profile.c | 21 +++++++++++++++------ 1 files changed, 15 insertions(+), 6 deletions(-) diff --git a/dlls/kernel32/tests/profile.c b/dlls/kernel32/tests/profile.c index 272ba9c..4824ce8 100644 --- a/dlls/kernel32/tests/profile.c +++ b/dlls/kernel32/tests/profile.c @@ -137,6 +137,7 @@ static void test_profile_sections(void) char *p; static const char content[]="[section1]\r\nname1=val1\r\nname2=\r\nname3\r\nname4=val4\r\n[section2]\r\n"; static const char testfile4[]=".\\testwine4.ini"; + BOOL on_win98 = FALSE; DeleteFileA( testfile4 ); h = CreateFileA( testfile4, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); @@ -149,17 +150,25 @@ static void test_profile_sections(void) SetLastError(0xdeadbeef); ret = GetPrivateProfileSectionA( NULL, NULL, 0, NULL ); ok( ret == 0, "expected return size 0, got %d\n", ret ); - ok( GetLastError() == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + ok( GetLastError() == ERROR_INVALID_PARAMETER || + GetLastError() == 0xdeadbeef /* Win98 */, + "expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + if (GetLastError() == 0xdeadbeef) on_win98 = TRUE; SetLastError(0xdeadbeef); ret = GetPrivateProfileSectionA( NULL, NULL, 0, testfile4 ); ok( ret == 0, "expected return size 0, got %d\n", ret ); - ok( GetLastError() == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + ok( GetLastError() == ERROR_INVALID_PARAMETER || + GetLastError() == 0xdeadbeef /* Win98 */, + "expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - SetLastError(0xdeadbeef); - ret = GetPrivateProfileSectionA( "section1", NULL, 0, testfile4 ); - ok( ret == 0, "expected return size 0, got %d\n", ret ); - ok( GetLastError() == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + if (!on_win98) + { + SetLastError(0xdeadbeef); + ret = GetPrivateProfileSectionA( "section1", NULL, 0, testfile4 ); + ok( ret == 0, "expected return size 0, got %d\n", ret ); + ok( GetLastError() == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + } SetLastError(0xdeadbeef); ret = GetPrivateProfileSectionA( NULL, buf, sizeof(buf), testfile4 );
1
0
0
0
Paul Vriens : kernel32/tests: Use skip when functions are not available.
by Alexandre Julliard
05 Jul '07
05 Jul '07
Module: wine Branch: master Commit: 203bcf4271e22db59349e510101ae9aa191e6beb URL:
http://source.winehq.org/git/wine.git/?a=commit;h=203bcf4271e22db59349e5101…
Author: Paul Vriens <paul.vriens.wine(a)gmail.com> Date: Thu Jul 5 14:31:50 2007 +0200 kernel32/tests: Use skip when functions are not available. --- dlls/kernel32/tests/toolhelp.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/dlls/kernel32/tests/toolhelp.c b/dlls/kernel32/tests/toolhelp.c index ab067d1..ca9c06c 100644 --- a/dlls/kernel32/tests/toolhelp.c +++ b/dlls/kernel32/tests/toolhelp.c @@ -305,7 +305,11 @@ START_TEST(toolhelp) if (!pCreateToolhelp32Snapshot || !pModule32First || !pModule32Next || !pProcess32First || !pProcess32Next || - !pThread32First || !pThread32Next) return; + !pThread32First || !pThread32Next) + { + skip("Needed functions are not available, most likely running on Windows NT\n"); + return; + } r = init(); ok(r == 0, "Basic init of sub-process test\n");
1
0
0
0
Rob Shearman : rpcrt4: Return a fault packet if the proc num exceeds the index of the last function available for the interface .
by Alexandre Julliard
05 Jul '07
05 Jul '07
Module: wine Branch: master Commit: 69eeb8b1b7142a553d2b4dbf79cd8fde413bcb99 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=69eeb8b1b7142a553d2b4dbf7…
Author: Rob Shearman <rob(a)codeweavers.com> Date: Thu Jul 5 12:56:35 2007 +0100 rpcrt4: Return a fault packet if the proc num exceeds the index of the last function available for the interface. --- dlls/rpcrt4/rpc_server.c | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/dlls/rpcrt4/rpc_server.c b/dlls/rpcrt4/rpc_server.c index 4b9a93d..328c0d0 100644 --- a/dlls/rpcrt4/rpc_server.c +++ b/dlls/rpcrt4/rpc_server.c @@ -260,8 +260,12 @@ static void RPCRT4_process_packet(RpcConnection* conn, RpcPktHdr* hdr, RPC_MESSA func = *sif->If->DispatchTable->DispatchTable; } else { if (msg->ProcNum >= sif->If->DispatchTable->DispatchTableCount) { - ERR("invalid procnum\n"); - func = NULL; + WARN("invalid procnum (%d/%d)\n", msg->ProcNum, sif->If->DispatchTable->DispatchTableCount); + response = RPCRT4_BuildFaultHeader(NDR_LOCAL_DATA_REPRESENTATION, + NCA_S_OP_RNG_ERROR); + + RPCRT4_Send(conn, response, NULL, 0); + RPCRT4_FreeHeader(response); } func = sif->If->DispatchTable->DispatchTable[msg->ProcNum]; }
1
0
0
0
Rob Shearman : rpcrt4: Call RPCRT4_Send directly from PKT_RECEIVE handler in server.
by Alexandre Julliard
05 Jul '07
05 Jul '07
Module: wine Branch: master Commit: 234b8cbe0afa9c146348e22c9f6153c0b936f440 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=234b8cbe0afa9c146348e22c9…
Author: Rob Shearman <rob(a)codeweavers.com> Date: Thu Jul 5 12:47:42 2007 +0100 rpcrt4: Call RPCRT4_Send directly from PKT_RECEIVE handler in server. Remove the WINE_RPCFLAG_EXCEPTION hack to pass exception information to I_RpcSend. --- dlls/rpcrt4/rpc_message.c | 64 ++++++++++++++------------------------------ dlls/rpcrt4/rpc_message.h | 1 + dlls/rpcrt4/rpc_misc.h | 28 ------------------- dlls/rpcrt4/rpc_server.c | 27 ++++++++++++------ 4 files changed, 40 insertions(+), 80 deletions(-) diff --git a/dlls/rpcrt4/rpc_message.c b/dlls/rpcrt4/rpc_message.c index 3fc8e0f..bfd5aec 100644 --- a/dlls/rpcrt4/rpc_message.c +++ b/dlls/rpcrt4/rpc_message.c @@ -35,7 +35,6 @@ #include "wine/debug.h" #include "rpc_binding.h" -#include "rpc_misc.h" #include "rpc_defs.h" #include "rpc_message.h" #include "ncastatus.h" @@ -141,7 +140,7 @@ static RpcPktHdr *RPCRT4_BuildRequestHeader(unsigned long DataRepresentation, return header; } -static RpcPktHdr *RPCRT4_BuildResponseHeader(unsigned long DataRepresentation, +RpcPktHdr *RPCRT4_BuildResponseHeader(unsigned long DataRepresentation, unsigned long BufferLength) { RpcPktHdr *header; @@ -964,62 +963,42 @@ RPC_STATUS WINAPI I_RpcSend(PRPC_MESSAGE pMsg) RpcBinding* bind = (RpcBinding*)pMsg->Handle; RpcConnection* conn; RPC_CLIENT_INTERFACE* cif = NULL; - RPC_SERVER_INTERFACE* sif = NULL; RPC_STATUS status; RpcPktHdr *hdr; TRACE("(%p)\n", pMsg); - if (!bind) return RPC_S_INVALID_BINDING; - - if (bind->server) { - sif = pMsg->RpcInterfaceInformation; - if (!sif) return RPC_S_INTERFACE_NOT_FOUND; /* ? */ - status = RPCRT4_OpenBinding(bind, &conn, &sif->TransferSyntax, - &sif->InterfaceId); - } else { - cif = pMsg->RpcInterfaceInformation; - if (!cif) return RPC_S_INTERFACE_NOT_FOUND; /* ? */ + if (!bind || bind->server) return RPC_S_INVALID_BINDING; - if (!bind->Endpoint || !bind->Endpoint[0]) - { - TRACE("automatically resolving partially bound binding\n"); - status = RpcEpResolveBinding(bind, cif); - if (status != RPC_S_OK) return status; - } + cif = pMsg->RpcInterfaceInformation; + if (!cif) return RPC_S_INTERFACE_NOT_FOUND; /* ? */ - status = RPCRT4_OpenBinding(bind, &conn, &cif->TransferSyntax, - &cif->InterfaceId); + if (!bind->Endpoint || !bind->Endpoint[0]) + { + TRACE("automatically resolving partially bound binding\n"); + status = RpcEpResolveBinding(bind, cif); + if (status != RPC_S_OK) return status; } + status = RPCRT4_OpenBinding(bind, &conn, &cif->TransferSyntax, + &cif->InterfaceId); if (status != RPC_S_OK) return status; - if (bind->server) { - if (pMsg->RpcFlags & WINE_RPCFLAG_EXCEPTION) { - hdr = RPCRT4_BuildFaultHeader(pMsg->DataRepresentation, - RPC2NCA_STATUS(*(RPC_STATUS *)pMsg->Buffer)); - } else { - hdr = RPCRT4_BuildResponseHeader(pMsg->DataRepresentation, - pMsg->BufferLength); - } - } else { - hdr = RPCRT4_BuildRequestHeader(pMsg->DataRepresentation, - pMsg->BufferLength, pMsg->ProcNum, - &bind->ObjectUuid); - hdr->common.call_id = conn->NextCallId++; + hdr = RPCRT4_BuildRequestHeader(pMsg->DataRepresentation, + pMsg->BufferLength, pMsg->ProcNum, + &bind->ObjectUuid); + if (!hdr) + { + RPCRT4_CloseBinding(bind, conn); + return ERROR_OUTOFMEMORY; } + hdr->common.call_id = conn->NextCallId++; status = RPCRT4_Send(conn, hdr, pMsg->Buffer, pMsg->BufferLength); RPCRT4_FreeHeader(hdr); - /* success */ - if (!bind->server) { - /* save the connection, so the response can be read from it */ - pMsg->ReservedForRuntime = conn; - return status; - } - RPCRT4_CloseBinding(bind, conn); - + /* save the connection, so the response can be read from it */ + pMsg->ReservedForRuntime = conn; return status; } @@ -1101,7 +1080,6 @@ RPC_STATUS WINAPI I_RpcReceive(PRPC_MESSAGE pMsg) } break; case PKT_FAULT: - pMsg->RpcFlags |= WINE_RPCFLAG_EXCEPTION; ERR ("we got fault packet with status 0x%lx\n", hdr->fault.status); status = NCA2RPC_STATUS(hdr->fault.status); if (is_hard_error(status)) diff --git a/dlls/rpcrt4/rpc_message.h b/dlls/rpcrt4/rpc_message.h index 103bc66..8815d8d 100644 --- a/dlls/rpcrt4/rpc_message.h +++ b/dlls/rpcrt4/rpc_message.h @@ -27,6 +27,7 @@ typedef unsigned int NCA_STATUS; RpcPktHdr *RPCRT4_BuildFaultHeader(unsigned long DataRepresentation, RPC_STATUS Status); +RpcPktHdr *RPCRT4_BuildResponseHeader(unsigned long DataRepresentation, unsigned long BufferLength); RpcPktHdr *RPCRT4_BuildBindHeader(unsigned long DataRepresentation, unsigned short MaxTransmissionSize, unsigned short MaxReceiveSize, unsigned long AssocGroupId, const RPC_SYNTAX_IDENTIFIER *AbstractId, const RPC_SYNTAX_IDENTIFIER *TransferId); RpcPktHdr *RPCRT4_BuildBindNackHeader(unsigned long DataRepresentation, unsigned char RpcVersion, unsigned char RpcVersionMinor); RpcPktHdr *RPCRT4_BuildBindAckHeader(unsigned long DataRepresentation, unsigned short MaxTransmissionSize, unsigned short MaxReceiveSize, LPCSTR ServerAddress, unsigned long Result, unsigned long Reason, const RPC_SYNTAX_IDENTIFIER *TransferId); diff --git a/dlls/rpcrt4/rpc_misc.h b/dlls/rpcrt4/rpc_misc.h deleted file mode 100644 index 0cb41c1..0000000 --- a/dlls/rpcrt4/rpc_misc.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * RPC definitions - * - * Copyright 2003 Ove K�ven, TransGaming Technologies - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - * - */ - -#ifndef __WINE_RPC_MISC_H -#define __WINE_RPC_MISC_H - -/* flags for RPC_MESSAGE.RpcFlags */ -#define WINE_RPCFLAG_EXCEPTION 0x0001 - -#endif /* __WINE_RPC_MISC_H */ diff --git a/dlls/rpcrt4/rpc_server.c b/dlls/rpcrt4/rpc_server.c index 20c1afa..4b9a93d 100644 --- a/dlls/rpcrt4/rpc_server.c +++ b/dlls/rpcrt4/rpc_server.c @@ -42,7 +42,6 @@ #include "wine/exception.h" #include "rpc_server.h" -#include "rpc_misc.h" #include "rpc_message.h" #include "rpc_defs.h" #include "ncastatus.h" @@ -171,6 +170,7 @@ static void RPCRT4_process_packet(RpcConnection* conn, RpcPktHdr* hdr, RPC_MESSA RpcPktHdr *response; void *buf = msg->Buffer; RPC_STATUS status; + BOOL exception; switch (hdr->common.ptype) { case PKT_BIND: @@ -272,23 +272,32 @@ static void RPCRT4_process_packet(RpcConnection* conn, RpcPktHdr* hdr, RPC_MESSA MAKELONG( MAKEWORD(hdr->common.drep[0], hdr->common.drep[1]), MAKEWORD(hdr->common.drep[2], hdr->common.drep[3])); + exception = FALSE; + /* dispatch */ __TRY { if (func) func(msg); } __EXCEPT(rpc_filter) { - if (msg->Buffer != buf) I_RpcFreeBuffer(msg); - /* this will cause a failure packet to be sent in I_RpcSend */ - msg->RpcFlags |= WINE_RPCFLAG_EXCEPTION; - msg->BufferLength = sizeof(RPC_STATUS); - I_RpcGetBuffer(msg); + exception = TRUE; if (GetExceptionCode() == STATUS_ACCESS_VIOLATION) - *(RPC_STATUS*)msg->Buffer = ERROR_NOACCESS; + status = ERROR_NOACCESS; else - *(RPC_STATUS*)msg->Buffer = GetExceptionCode(); + status = GetExceptionCode(); + response = RPCRT4_BuildFaultHeader(msg->DataRepresentation, + RPC2NCA_STATUS(status)); } __ENDTRY + if (!exception) + response = RPCRT4_BuildResponseHeader(msg->DataRepresentation, + msg->BufferLength); + /* send response packet */ - I_RpcSend(msg); + if (response) { + status = RPCRT4_Send(conn, response, exception ? NULL : msg->Buffer, + exception ? 0 : msg->BufferLength); + RPCRT4_FreeHeader(response); + } else + ERR("out of memory\n"); msg->RpcInterfaceInformation = NULL; RPCRT4_release_server_interface(sif);
1
0
0
0
← Newer
1
...
81
82
83
84
85
86
87
...
96
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
Results per page:
10
25
50
100
200