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 2008
----- 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
1114 discussions
Start a n
N
ew thread
Hans Leidekker : wininet: Clear last error upon successful return from HttpSendRequest.
by Alexandre Julliard
18 Jul '08
18 Jul '08
Module: wine Branch: stable Commit: 0520cbb48b09749123161021ce905c8a9ba85a2b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0520cbb48b09749123161021c…
Author: Hans Leidekker <hans(a)it.vu.nl> Date: Mon Jun 23 20:57:46 2008 +0200 wininet: Clear last error upon successful return from HttpSendRequest. (cherry picked from commit 3434935f44eadecae1e8aa11d08142a40b671978) --- dlls/wininet/http.c | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c index b973a79..7be8214 100644 --- a/dlls/wininet/http.c +++ b/dlls/wininet/http.c @@ -3165,9 +3165,6 @@ BOOL WINAPI HTTP_HttpSendRequestW(LPWININETHTTPREQW lpwhr, LPCWSTR lpszHeaders, assert(lpwhr->hdr.htype == WH_HHTTPREQ); - /* Clear any error information */ - INTERNET_SetLastError(0); - /* if the verb is NULL default to GET */ if (!lpwhr->lpszVerb) lpwhr->lpszVerb = WININET_strdupW(szGET); @@ -3409,6 +3406,7 @@ lend: sizeof(INTERNET_ASYNC_RESULT)); TRACE("<--\n"); + if (bSuccess) INTERNET_SetLastError(ERROR_SUCCESS); return bSuccess; }
1
0
0
0
Alexandre Julliard : server: Move the process pipe hangup handling into kill_process.
by Alexandre Julliard
18 Jul '08
18 Jul '08
Module: wine Branch: stable Commit: 0d2d5fce275e4de10d53a8f6350a4a0b7e23e2b1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0d2d5fce275e4de10d53a8f63…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Jun 20 20:42:51 2008 +0200 server: Move the process pipe hangup handling into kill_process. This ensures that it's also done correctly when a read from the pipe returns EOF. (cherry picked from commit 24ec4a6ed7bf5c7c8edadc7da3bd5f6160a4d53d) --- server/process.c | 27 +++++++++++++++------------ 1 files changed, 15 insertions(+), 12 deletions(-) diff --git a/server/process.c b/server/process.c index f427716..51ada6e 100644 --- a/server/process.c +++ b/server/process.c @@ -459,18 +459,7 @@ static void process_poll_event( struct fd *fd, int event ) struct process *process = get_fd_user( fd ); assert( process->obj.ops == &process_ops ); - if (event & (POLLERR | POLLHUP)) - { - release_object( process->msg_fd ); - process->msg_fd = NULL; - if (process->sigkill_timeout) /* already waiting for it to die */ - { - remove_timeout_user( process->sigkill_timeout ); - process->sigkill_timeout = NULL; - process_died( process ); - } - else kill_process( process, 0 ); - } + if (event & (POLLERR | POLLHUP)) kill_process( process, 0 ); else if (event & POLLIN) receive_fd( process ); } @@ -736,6 +725,20 @@ void resume_process( struct process *process ) /* kill a process on the spot */ void kill_process( struct process *process, int violent_death ) { + if (!violent_death && process->msg_fd) /* normal termination on pipe close */ + { + release_object( process->msg_fd ); + process->msg_fd = NULL; + } + + if (process->sigkill_timeout) /* already waiting for it to die */ + { + remove_timeout_user( process->sigkill_timeout ); + process->sigkill_timeout = NULL; + process_died( process ); + return; + } + if (violent_death) terminate_process( process, NULL, 1 ); else {
1
0
0
0
Alexandre Julliard : winex11: Only register an XIM callback if we can' t open the XIM right away.
by Alexandre Julliard
18 Jul '08
18 Jul '08
Module: wine Branch: stable Commit: d1dd56ffa2d0b4f70c8982f7bd39b0260ddd1477 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d1dd56ffa2d0b4f70c8982f7b…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Sat Jun 21 11:18:07 2008 +0200 winex11: Only register an XIM callback if we can't open the XIM right away. (cherry picked from commit 5b7bec34c1b550e26744fe632a55e196a751eab4) --- dlls/winex11.drv/xim.c | 22 +++++++++++++++------- 1 files changed, 15 insertions(+), 7 deletions(-) diff --git a/dlls/winex11.drv/xim.c b/dlls/winex11.drv/xim.c index 8512583..252dacd 100644 --- a/dlls/winex11.drv/xim.c +++ b/dlls/winex11.drv/xim.c @@ -359,7 +359,7 @@ BOOL X11DRV_InitXIM( const char *input_style ) } -static void X11DRV_OpenIM(Display *display, XPointer p, XPointer data); +static void open_xim_callback( Display *display, XPointer ptr, XPointer data ); static void X11DRV_DestroyIM(XIM xim, XPointer p, XPointer data) { @@ -369,7 +369,7 @@ static void X11DRV_DestroyIM(XIM xim, XPointer p, XPointer data) thread_data->xim = NULL; ximStyle = 0; wine_tsx11_lock(); - XRegisterIMInstantiateCallback( thread_data->display, NULL, NULL, NULL, X11DRV_OpenIM, NULL ); + XRegisterIMInstantiateCallback( thread_data->display, NULL, NULL, NULL, open_xim_callback, NULL ); wine_tsx11_unlock(); } @@ -378,7 +378,7 @@ static void X11DRV_DestroyIM(XIM xim, XPointer p, XPointer data) * * Should always be called with the x11 lock held */ -static void X11DRV_OpenIM(Display *display, XPointer ptr, XPointer data) +static BOOL open_xim( Display *display ) { struct x11drv_thread_data *thread_data = x11drv_thread_data(); XIMStyle ximStyleCallback, ximStyleNone; @@ -391,7 +391,7 @@ static void X11DRV_OpenIM(Display *display, XPointer ptr, XPointer data) if (xim == NULL) { WARN("Could not open input method.\n"); - return; + return FALSE; } destroy.client_data = NULL; @@ -410,7 +410,7 @@ static void X11DRV_OpenIM(Display *display, XPointer ptr, XPointer data) { WARN("Could not find supported input style.\n"); XCloseIM(xim); - return; + return FALSE; } else { @@ -471,18 +471,26 @@ static void X11DRV_OpenIM(Display *display, XPointer ptr, XPointer data) } thread_data->xim = xim; - XUnregisterIMInstantiateCallback(display, NULL, NULL, NULL, X11DRV_OpenIM, NULL); wine_tsx11_unlock(); IME_UpdateAssociation(NULL); wine_tsx11_lock(); + return TRUE; } +static void open_xim_callback( Display *display, XPointer ptr, XPointer data ) +{ + if (open_xim( display )) + XUnregisterIMInstantiateCallback( display, NULL, NULL, NULL, open_xim_callback, NULL); +} void X11DRV_SetupXIM(void) { + Display *display = thread_display(); + wine_tsx11_lock(); - XRegisterIMInstantiateCallback(thread_display(), NULL, NULL, NULL, X11DRV_OpenIM, NULL); + if (!open_xim( display )) + XRegisterIMInstantiateCallback( display, NULL, NULL, NULL, open_xim_callback, NULL ); wine_tsx11_unlock(); }
1
0
0
0
Mathias Kosch : winex11: Fix typo in X11DRV_SetDIBits optimization.
by Alexandre Julliard
18 Jul '08
18 Jul '08
Module: wine Branch: stable Commit: d99ad3caeaaf4f675d3c883dbfe7c7e6c46a3b33 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d99ad3caeaaf4f675d3c883db…
Author: Mathias Kosch <info(a)mkosch.de> Date: Thu Jul 17 22:17:13 2008 +0200 winex11: Fix typo in X11DRV_SetDIBits optimization. (cherry picked from commit f296f27e96d71d713f6a13eb1b7dfb5f5c5deab4) --- dlls/winex11.drv/dib.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/winex11.drv/dib.c b/dlls/winex11.drv/dib.c index 4b287ea..7d050cc 100644 --- a/dlls/winex11.drv/dib.c +++ b/dlls/winex11.drv/dib.c @@ -3998,7 +3998,7 @@ INT X11DRV_SetDIBits( X11DRV_PDEVICE *physDev, HBITMAP hbitmap, UINT startscan, TRACE("syncing compatible set bits to app bits\n"); if ((tmpheight < 0) ^ (bitmap.bmHeight < 0)) { - dbits = (LPBYTE)bits + (dstwidthb * (lines-1)); + dbits += dstwidthb * (lines-1); dstwidthb = -dstwidthb; } X11DRV_DIB_DoProtectDIBSection( physBitmap, PAGE_READWRITE );
1
0
0
0
Dmitry Timoshkov : gdi32: Extend the font substitution test, make it pass under Wine.
by Alexandre Julliard
18 Jul '08
18 Jul '08
Module: wine Branch: stable Commit: 38b87ec415dca951579edf03eea12602ccf59f5c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=38b87ec415dca951579edf03e…
Author: Dmitry Timoshkov <dmitry(a)codeweavers.com> Date: Sun Jun 22 22:41:47 2008 +0900 gdi32: Extend the font substitution test, make it pass under Wine. (cherry picked from commit 41aad2dce28ca0dd9d23fa6234ad8523302d6054) --- dlls/gdi32/freetype.c | 124 ++++++++++++++++++++++++++++++++++++++++++----- dlls/gdi32/tests/font.c | 82 ++++++++++++++++++++----------- 2 files changed, 165 insertions(+), 41 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=38b87ec415dca951579ed…
1
0
0
0
Huw Davies : winmm: Only fill in the MIXERLINEA struct if the call to mixerGetLineInfoW succeeds .
by Alexandre Julliard
18 Jul '08
18 Jul '08
Module: wine Branch: master Commit: 5798b95a51fb6183848975f20218ea17ca8442ce URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5798b95a51fb6183848975f20…
Author: Huw Davies <huw(a)codeweavers.com> Date: Fri Jul 18 12:05:52 2008 +0100 winmm: Only fill in the MIXERLINEA struct if the call to mixerGetLineInfoW succeeds. --- dlls/winmm/winmm.c | 44 +++++++++++++++++++++++--------------------- 1 files changed, 23 insertions(+), 21 deletions(-) diff --git a/dlls/winmm/winmm.c b/dlls/winmm/winmm.c index 8342c44..8c37a18 100644 --- a/dlls/winmm/winmm.c +++ b/dlls/winmm/winmm.c @@ -652,27 +652,29 @@ UINT WINAPI mixerGetLineInfoA(HMIXEROBJ hmix, LPMIXERLINEA lpmliA, ret = mixerGetLineInfoW(hmix, &mliW, fdwInfo); - lpmliA->dwDestination = mliW.dwDestination; - lpmliA->dwSource = mliW.dwSource; - lpmliA->dwLineID = mliW.dwLineID; - lpmliA->fdwLine = mliW.fdwLine; - lpmliA->dwUser = mliW.dwUser; - lpmliA->dwComponentType = mliW.dwComponentType; - lpmliA->cChannels = mliW.cChannels; - lpmliA->cConnections = mliW.cConnections; - lpmliA->cControls = mliW.cControls; - WideCharToMultiByte( CP_ACP, 0, mliW.szShortName, -1, lpmliA->szShortName, - sizeof(lpmliA->szShortName), NULL, NULL); - WideCharToMultiByte( CP_ACP, 0, mliW.szName, -1, lpmliA->szName, - sizeof(lpmliA->szName), NULL, NULL ); - lpmliA->Target.dwType = mliW.Target.dwType; - lpmliA->Target.dwDeviceID = mliW.Target.dwDeviceID; - lpmliA->Target.wMid = mliW.Target.wMid; - lpmliA->Target.wPid = mliW.Target.wPid; - lpmliA->Target.vDriverVersion = mliW.Target.vDriverVersion; - WideCharToMultiByte( CP_ACP, 0, mliW.Target.szPname, -1, lpmliA->Target.szPname, - sizeof(lpmliA->Target.szPname), NULL, NULL ); - + if(ret == MMSYSERR_NOERROR) + { + lpmliA->dwDestination = mliW.dwDestination; + lpmliA->dwSource = mliW.dwSource; + lpmliA->dwLineID = mliW.dwLineID; + lpmliA->fdwLine = mliW.fdwLine; + lpmliA->dwUser = mliW.dwUser; + lpmliA->dwComponentType = mliW.dwComponentType; + lpmliA->cChannels = mliW.cChannels; + lpmliA->cConnections = mliW.cConnections; + lpmliA->cControls = mliW.cControls; + WideCharToMultiByte( CP_ACP, 0, mliW.szShortName, -1, lpmliA->szShortName, + sizeof(lpmliA->szShortName), NULL, NULL); + WideCharToMultiByte( CP_ACP, 0, mliW.szName, -1, lpmliA->szName, + sizeof(lpmliA->szName), NULL, NULL ); + lpmliA->Target.dwType = mliW.Target.dwType; + lpmliA->Target.dwDeviceID = mliW.Target.dwDeviceID; + lpmliA->Target.wMid = mliW.Target.wMid; + lpmliA->Target.wPid = mliW.Target.wPid; + lpmliA->Target.vDriverVersion = mliW.Target.vDriverVersion; + WideCharToMultiByte( CP_ACP, 0, mliW.Target.szPname, -1, lpmliA->Target.szPname, + sizeof(lpmliA->Target.szPname), NULL, NULL ); + } return ret; }
1
0
0
0
Zac Brown : winhttp/tests: Add test for opening request.
by Alexandre Julliard
18 Jul '08
18 Jul '08
Module: wine Branch: master Commit: b2be840e47b2f967031e1bbf8e111ecc991869df URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b2be840e47b2f967031e1bbf8…
Author: Zac Brown <zac(a)zacbrown.org> Date: Thu Jul 17 17:37:23 2008 -0700 winhttp/tests: Add test for opening request. --- .gitignore | 1 + Makefile.in | 2 + configure | 3 + configure.ac | 1 + dlls/Makefile.in | 1 + dlls/winhttp/tests/Makefile.in | 13 ++++++ dlls/winhttp/tests/winhttp.c | 80 ++++++++++++++++++++++++++++++++++++++++ programs/winetest/Makefile.in | 3 + programs/winetest/winetest.rc | 1 + 9 files changed, 105 insertions(+), 0 deletions(-) diff --git a/.gitignore b/.gitignore index 44a8ce1..ab49a43 100644 --- a/.gitignore +++ b/.gitignore @@ -333,6 +333,7 @@ programs/winetest/usp10_test.exe programs/winetest/uxtheme_test.exe programs/winetest/version_test.exe programs/winetest/winetest +programs/winetest/winhttp_test.exe programs/winetest/wininet_test.exe programs/winetest/winmm_test.exe programs/winetest/winspool.drv_test.exe diff --git a/Makefile.in b/Makefile.in index 6d54f68..1e7f4d8 100644 --- a/Makefile.in +++ b/Makefile.in @@ -496,6 +496,7 @@ ALL_MAKEFILES = \ dlls/winex11.drv/Makefile \ dlls/wing32/Makefile \ dlls/winhttp/Makefile \ + dlls/winhttp/tests/Makefile \ dlls/wininet/Makefile \ dlls/wininet/tests/Makefile \ dlls/winmm/Makefile \ @@ -926,6 +927,7 @@ dlls/winequartz.drv/Makefile: dlls/winequartz.drv/Makefile.in dlls/Makedll.rules dlls/winex11.drv/Makefile: dlls/winex11.drv/Makefile.in dlls/Makedll.rules dlls/wing32/Makefile: dlls/wing32/Makefile.in dlls/Makedll.rules dlls/winhttp/Makefile: dlls/winhttp/Makefile.in dlls/Makedll.rules +dlls/winhttp/tests/Makefile: dlls/winhttp/tests/Makefile.in dlls/Maketest.rules dlls/wininet/Makefile: dlls/wininet/Makefile.in dlls/Makedll.rules dlls/wininet/tests/Makefile: dlls/wininet/tests/Makefile.in dlls/Maketest.rules dlls/winmm/Makefile: dlls/winmm/Makefile.in dlls/Makedll.rules diff --git a/configure b/configure index 36832f3..5baf8dc 100755 --- a/configure +++ b/configure @@ -22418,6 +22418,8 @@ ac_config_files="$ac_config_files dlls/wing32/Makefile" ac_config_files="$ac_config_files dlls/winhttp/Makefile" +ac_config_files="$ac_config_files dlls/winhttp/tests/Makefile" + ac_config_files="$ac_config_files dlls/wininet/Makefile" ac_config_files="$ac_config_files dlls/wininet/tests/Makefile" @@ -23484,6 +23486,7 @@ do "dlls/winex11.drv/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/winex11.drv/Makefile" ;; "dlls/wing32/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/wing32/Makefile" ;; "dlls/winhttp/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/winhttp/Makefile" ;; + "dlls/winhttp/tests/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/winhttp/tests/Makefile" ;; "dlls/wininet/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/wininet/Makefile" ;; "dlls/wininet/tests/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/wininet/tests/Makefile" ;; "dlls/winmm/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/winmm/Makefile" ;; diff --git a/configure.ac b/configure.ac index 8ed54a8..a32bb73 100644 --- a/configure.ac +++ b/configure.ac @@ -2038,6 +2038,7 @@ AC_CONFIG_FILES([dlls/winequartz.drv/Makefile]) AC_CONFIG_FILES([dlls/winex11.drv/Makefile]) AC_CONFIG_FILES([dlls/wing32/Makefile]) AC_CONFIG_FILES([dlls/winhttp/Makefile]) +AC_CONFIG_FILES([dlls/winhttp/tests/Makefile]) AC_CONFIG_FILES([dlls/wininet/Makefile]) AC_CONFIG_FILES([dlls/wininet/tests/Makefile]) AC_CONFIG_FILES([dlls/winmm/Makefile]) diff --git a/dlls/Makefile.in b/dlls/Makefile.in index 73c823f..0eac4a0 100644 --- a/dlls/Makefile.in +++ b/dlls/Makefile.in @@ -363,6 +363,7 @@ TESTSUBDIRS = \ usp10/tests \ uxtheme/tests \ version/tests \ + winhttp/tests \ wininet/tests \ winmm/tests \ winspool.drv/tests \ diff --git a/dlls/winhttp/tests/Makefile.in b/dlls/winhttp/tests/Makefile.in new file mode 100644 index 0000000..d4efd42 --- /dev/null +++ b/dlls/winhttp/tests/Makefile.in @@ -0,0 +1,13 @@ +TOPSRCDIR = @top_srcdir@ +TOPOBJDIR = ../../.. +SRCDIR = @srcdir@ +VPATH = @srcdir@ +TESTDLL = winhttp.dll +IMPORTS = winhttp kernel32 + +CTESTS = \ + winhttp.c + +@MAKE_TEST_RULES@ + +@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/winhttp/tests/winhttp.c b/dlls/winhttp/tests/winhttp.c new file mode 100644 index 0000000..d417a56 --- /dev/null +++ b/dlls/winhttp/tests/winhttp.c @@ -0,0 +1,80 @@ +/* + * WinHTTP - tests + * + * Copyright 2008 Google (Zac Brown) + * + * 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 + */ +#include <stdarg.h> +#include <stdlib.h> + +#include <windef.h> +#include <winbase.h> +#include <winhttp.h> + +#include "wine/test.h" + +static const WCHAR test_useragent[] = + {'W','i','n','e',' ','R','e','g','r','e','s','s','i','o','n',' ','T','e','s','t',0}; +static const WCHAR test_server[] = {'w','i','n','e','h','q','.','o','r','g',0}; + +static void test_OpenRequest (void) +{ + BOOL ret; + HINTERNET session, request, connection; + + session = WinHttpOpen(test_useragent, WINHTTP_ACCESS_TYPE_DEFAULT_PROXY, + WINHTTP_NO_PROXY_NAME, WINHTTP_NO_PROXY_BYPASS, 0); + todo_wine ok(session != NULL, "WinHttpOpen failed to open session.\n"); + + /* Test with a bad server name */ + SetLastError(0xdeadbeef); + connection = WinHttpConnect(session, NULL, INTERNET_DEFAULT_HTTP_PORT, 0); + ok (connection == NULL, "WinHttpConnect succeeded in opening connection to NULL server argument.\n"); + todo_wine ok(GetLastError() == ERROR_INVALID_PARAMETER, + "Expected ERROR_INVALID_PARAMETER, got %u.\n", GetLastError()); + + /* Test with a valid server name */ + connection = WinHttpConnect (session, test_server, INTERNET_DEFAULT_HTTP_PORT, 0); + todo_wine ok(connection != NULL, + "WinHttpConnect failed to open a connection, error: %u.\n", GetLastError()); + + request = WinHttpOpenRequest(connection, NULL, NULL, NULL, WINHTTP_NO_REFERER, + WINHTTP_DEFAULT_ACCEPT_TYPES, 0); + if (request == NULL && GetLastError() == ERROR_WINHTTP_NAME_NOT_RESOLVED) + { + skip("Network unreachable, skipping.\n"); + goto done; + } + todo_wine ok(request != NULL, + "WinHttpOpenrequest failed to open a request, error: %u.\n", GetLastError()); + + ret = WinHttpSendRequest(request, WINHTTP_NO_ADDITIONAL_HEADERS, 0, NULL, 0, 0, 0); + todo_wine ok(ret == TRUE, "WinHttpSendRequest failed: %u\n", GetLastError()); + ret = WinHttpCloseHandle(request); + todo_wine ok(ret == TRUE, "WinHttpCloseHandle failed on closing request, got %d.\n", ret); + + done: + ret = WinHttpCloseHandle(connection); + todo_wine ok(ret == TRUE, "WinHttpCloseHandle failed on closing connection, got %d.\n", ret); + ret = WinHttpCloseHandle(session); + todo_wine ok(ret == TRUE, "WinHttpCloseHandle failed on closing session, got %d.\n", ret); + +} + +START_TEST (winhttp) +{ + test_OpenRequest(); +} diff --git a/programs/winetest/Makefile.in b/programs/winetest/Makefile.in index 9431466..5ab9840 100644 --- a/programs/winetest/Makefile.in +++ b/programs/winetest/Makefile.in @@ -101,6 +101,7 @@ TESTBINS = \ usp10_test.exe \ uxtheme_test.exe \ version_test.exe \ + winhttp_test.exe \ wininet_test.exe \ winmm_test.exe \ winspool.drv_test.exe \ @@ -261,6 +262,8 @@ uxtheme_test.exe: $(DLLDIR)/uxtheme/tests/uxtheme_test.exe$(DLLEXT) cp $(DLLDIR)/uxtheme/tests/uxtheme_test.exe$(DLLEXT) $@ && $(STRIP) $@ version_test.exe: $(DLLDIR)/version/tests/version_test.exe$(DLLEXT) cp $(DLLDIR)/version/tests/version_test.exe$(DLLEXT) $@ && $(STRIP) $@ +winhttp_test.exe: $(DLLDIR)/winhttp/tests/winhttp_test.exe$(DLLEXT) + cp $(DLLDIR)/winhttp/tests/winhttp_test.exe$(DLLEXT) $@ && $(STRIP) $@ wininet_test.exe: $(DLLDIR)/wininet/tests/wininet_test.exe$(DLLEXT) cp $(DLLDIR)/wininet/tests/wininet_test.exe$(DLLEXT) $@ && $(STRIP) $@ winmm_test.exe: $(DLLDIR)/winmm/tests/winmm_test.exe$(DLLEXT) diff --git a/programs/winetest/winetest.rc b/programs/winetest/winetest.rc index 8a293a8..1a2ba33 100644 --- a/programs/winetest/winetest.rc +++ b/programs/winetest/winetest.rc @@ -162,6 +162,7 @@ userenv_test.exe TESTRES "userenv_test.exe" usp10_test.exe TESTRES "usp10_test.exe" uxtheme_test.exe TESTRES "uxtheme_test.exe" version_test.exe TESTRES "version_test.exe" +winhttp_test.exe TESTRES "winhttp_test.exe" wininet_test.exe TESTRES "wininet_test.exe" winmm_test.exe TESTRES "winmm_test.exe" winspool.drv_test.exe TESTRES "winspool.drv_test.exe"
1
0
0
0
Stefan Leichter : rasapi32: RasEnumDevicesA test: initialize the input parameters before each call, make sure the return buffer is big enough.
by Alexandre Julliard
18 Jul '08
18 Jul '08
Module: wine Branch: master Commit: 67201a145f0a088a22c4572f748d27b682355cf7 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=67201a145f0a088a22c4572f7…
Author: Stefan Leichter <Stefan.Leichter(a)camline.com> Date: Thu Jul 17 22:19:00 2008 +0200 rasapi32: RasEnumDevicesA test: initialize the input parameters before each call, make sure the return buffer is big enough. --- dlls/rasapi32/tests/rasapi.c | 67 +++++++++++++++++++++++++---------------- 1 files changed, 41 insertions(+), 26 deletions(-) diff --git a/dlls/rasapi32/tests/rasapi.c b/dlls/rasapi32/tests/rasapi.c index eba492f..4130392 100644 --- a/dlls/rasapi32/tests/rasapi.c +++ b/dlls/rasapi32/tests/rasapi.c @@ -44,69 +44,82 @@ static void test_rasenum(void) { DWORD result; DWORD cDevices = 0; - DWORD cb = 0; - RASDEVINFOA rasDevInfo; - rasDevInfo.dwSize = sizeof(rasDevInfo); + DWORD bufsize = 0, cb = 0; + LPRASDEVINFOA rasDevInfo; if(!pRasEnumDevicesA) { win_skip("Skipping RasEnumDevicesA tests, function not present\n"); return; } - /* test first parameter */ - result = pRasEnumDevicesA(NULL, &cb, &cDevices); + /* create the return buffer */ + result = pRasEnumDevicesA(NULL, &bufsize, &cDevices); trace("RasEnumDevicesA: buffersize %d\n", cb); ok(result == ERROR_BUFFER_TOO_SMALL, "Expected ERROR_BUFFER_TOO_SMALL, got %08d\n", result); - cb = sizeof(rasDevInfo); + rasDevInfo = (LPRASDEVINFO) HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, + max(bufsize,sizeof(RASDEVINFOA))); + if(!rasDevInfo) { + win_skip("failed to allocate buffer for RasEnumDevicesA tests\n"); + return; + } + + /* test first parameter */ + cb = bufsize; result = pRasEnumDevicesA(NULL, &cb, &cDevices); ok(result == ERROR_BUFFER_TOO_SMALL, "Expected ERROR_BUFFER_TOO_SMALL, got %08d\n", result); - rasDevInfo.dwSize = 0; - result = pRasEnumDevicesA(&rasDevInfo, &cb, &cDevices); + rasDevInfo[0].dwSize = 0; + cb = bufsize; + result = pRasEnumDevicesA(rasDevInfo, &cb, &cDevices); todo_wine ok(result == ERROR_INVALID_SIZE, "Expected ERROR_INVALID_SIZE, got %08d\n", result); - rasDevInfo.dwSize = sizeof(rasDevInfo) -1; - result = pRasEnumDevicesA(&rasDevInfo, &cb, &cDevices); + rasDevInfo[0].dwSize = sizeof(RASDEVINFOA) -1; + cb = bufsize; + result = pRasEnumDevicesA(rasDevInfo, &cb, &cDevices); todo_wine ok(result == ERROR_INVALID_SIZE, "Expected ERROR_INVALID_SIZE, got %08d\n", result); - rasDevInfo.dwSize = sizeof(rasDevInfo) +1; - result = pRasEnumDevicesA(&rasDevInfo, &cb, &cDevices); + rasDevInfo[0].dwSize = sizeof(RASDEVINFOA) +1; + cb = bufsize; + result = pRasEnumDevicesA(rasDevInfo, &cb, &cDevices); todo_wine ok(result == ERROR_INVALID_SIZE, "Expected ERROR_INVALID_SIZE, got %08d\n", result); /* test second parameter */ - rasDevInfo.dwSize = sizeof(rasDevInfo); - result = pRasEnumDevicesA(&rasDevInfo, NULL, &cDevices); + rasDevInfo[0].dwSize = sizeof(RASDEVINFOA); + result = pRasEnumDevicesA(rasDevInfo, NULL, &cDevices); ok(result == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %08d\n", result); + rasDevInfo[0].dwSize = sizeof(RASDEVINFOA); cb = 0; - result = pRasEnumDevicesA(&rasDevInfo, &cb, &cDevices); + result = pRasEnumDevicesA(rasDevInfo, &cb, &cDevices); ok(result == ERROR_BUFFER_TOO_SMALL, "Expected ERROR_BUFFER_TOO_SMALL, got %08d\n", result); - cb = sizeof(rasDevInfo) -1; - result = pRasEnumDevicesA(&rasDevInfo, &cb, &cDevices); + rasDevInfo[0].dwSize = sizeof(RASDEVINFOA); + cb = bufsize -1; + result = pRasEnumDevicesA(rasDevInfo, &cb, &cDevices); ok(result == ERROR_BUFFER_TOO_SMALL, "Expected ERROR_BUFFER_TOO_SMALL, got %08d\n", result); - cb = sizeof(rasDevInfo) +1; - result = pRasEnumDevicesA(&rasDevInfo, &cb, &cDevices); - todo_wine - ok(result == ERROR_BUFFER_TOO_SMALL, - "Expected ERROR_BUFFER_TOO_SMALL, got %08d\n", result); + rasDevInfo[0].dwSize = sizeof(RASDEVINFOA); + cb = bufsize +1; + result = pRasEnumDevicesA(rasDevInfo, &cb, &cDevices); + ok(result == ERROR_SUCCESS, + "Expected ERROR_SUCCESS, got %08d\n", result); /* test third parameter */ - cb = sizeof(rasDevInfo); - result = pRasEnumDevicesA(&rasDevInfo, &cb, NULL); + rasDevInfo[0].dwSize = sizeof(RASDEVINFOA); + cb = bufsize; + result = pRasEnumDevicesA(rasDevInfo, &cb, NULL); ok(result == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %08d\n", result); @@ -120,11 +133,13 @@ static void test_rasenum(void) "Expected ERROR_INVALID_PARAMETER, got %08d\n", result); cb = 0; - rasDevInfo.dwSize = 0; - result = pRasEnumDevicesA(&rasDevInfo, &cb, &cDevices); + rasDevInfo[0].dwSize = 0; + result = pRasEnumDevicesA(rasDevInfo, &cb, &cDevices); todo_wine ok(result == ERROR_INVALID_SIZE, "Expected ERROR_INVALID_SIZE, got %08d\n", result); + + HeapFree(GetProcessHeap(), 0, rasDevInfo); } START_TEST(rasapi)
1
0
0
0
Daniel Santos : ws2_32: WSASendTo() should clear last error on success.
by Alexandre Julliard
18 Jul '08
18 Jul '08
Module: wine Branch: master Commit: b54b282a4f89da3809ae0e166a096bc0ebd6d52b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b54b282a4f89da3809ae0e166…
Author: Daniel Santos <daniel.santos(a)pobox.com> Date: Thu Jul 17 13:52:51 2008 -0500 ws2_32: WSASendTo() should clear last error on success. --- dlls/ws2_32/socket.c | 2 ++ dlls/ws2_32/tests/sock.c | 30 ++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 0 deletions(-) diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c index 6624c96..451de49 100644 --- a/dlls/ws2_32/socket.c +++ b/dlls/ws2_32/socket.c @@ -2766,6 +2766,7 @@ INT WINAPI WSASendTo( SOCKET s, LPWSABUF lpBuffers, DWORD dwBufferCount, } else NtQueueApcThread( GetCurrentThread(), (PNTAPCFUNC)ws2_async_apc, (ULONG_PTR)wsa, (ULONG_PTR)iosb, 0 ); + WSASetLastError(0); return 0; } @@ -2830,6 +2831,7 @@ INT WINAPI WSASendTo( SOCKET s, LPWSABUF lpBuffers, DWORD dwBufferCount, TRACE(" -> %i bytes\n", *lpNumberOfBytesSent); release_sock_fd( s, fd ); + WSASetLastError(0); return 0; error: diff --git a/dlls/ws2_32/tests/sock.c b/dlls/ws2_32/tests/sock.c index 1256c2d..e2d2162 100644 --- a/dlls/ws2_32/tests/sock.c +++ b/dlls/ws2_32/tests/sock.c @@ -2180,6 +2180,34 @@ end: closesocket(v6); } +static void test_WSASendTo(void) +{ + SOCKET s; + struct sockaddr_in addr; + char buf[12] = "hello world"; + WSABUF data_buf; + DWORD bytesSent; + + addr.sin_family = AF_INET; + addr.sin_port = htons(139); + addr.sin_addr.s_addr = inet_addr("127.0.0.1"); + data_buf.len = sizeof(buf); + data_buf.buf = buf; + + if( (s = socket(AF_INET, SOCK_DGRAM, 0)) == INVALID_SOCKET) { + ok(0, "socket() failed error: %d\n", WSAGetLastError()); + return; + } + + WSASetLastError(12345); + if(WSASendTo(s, &data_buf, 1, &bytesSent, 0, (struct sockaddr*)&addr, sizeof(addr), NULL, NULL)) { + ok(0, "WSASendTo() failed error: %d\n", WSAGetLastError()); + return; + } + ok(!WSAGetLastError(), "WSAGetLastError() should return zero after " + "a successful call to WSASendTo()\n"); +} + /**************** Main program ***************/ START_TEST( sock ) @@ -2219,6 +2247,8 @@ START_TEST( sock ) test_send(); test_write_events(); + test_WSASendTo(); + test_ipv6only(); Exit();
1
0
0
0
Stefan Dösinger : wined3d: Use the nofilter mipmap lookup for np2 textures.
by Alexandre Julliard
18 Jul '08
18 Jul '08
Module: wine Branch: master Commit: cafec08516097f6058d0ce33079abb96d92628e6 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=cafec08516097f6058d0ce330…
Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Tue Jul 8 16:55:33 2008 -0500 wined3d: Use the nofilter mipmap lookup for np2 textures. This is cleaner than the if statements in the code. Also np2 textures should in theory support linear filtering, but fglrx doesn't seem to like it. This needs further investigation. So far we've never used linear filtering on np2 textures, so there should not be a regression. Furthermore I think shader support is more important than filtering, since NP2 textures are mostly used for 1:1 copying to the screen. --- dlls/wined3d/basetexture.c | 12 ++---------- dlls/wined3d/device.c | 2 ++ 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/dlls/wined3d/basetexture.c b/dlls/wined3d/basetexture.c index 863ffbd..d402586 100644 --- a/dlls/wined3d/basetexture.c +++ b/dlls/wined3d/basetexture.c @@ -462,18 +462,10 @@ void WINAPI IWineD3DBaseTextureImpl_ApplyStateChanges(IWineD3DBaseTexture *iface samplerStates[WINED3DSAMP_MIPFILTER] != This->baseTexture.states[WINED3DTEXSTA_MIPFILTER] || samplerStates[WINED3DSAMP_MAXMIPLEVEL] != This->baseTexture.states[WINED3DTEXSTA_MAXMIPLEVEL])) { GLint glValue; - DWORD mipfilter, minfilter; This->baseTexture.states[WINED3DTEXSTA_MIPFILTER] = samplerStates[WINED3DSAMP_MIPFILTER]; This->baseTexture.states[WINED3DTEXSTA_MINFILTER] = samplerStates[WINED3DSAMP_MINFILTER]; This->baseTexture.states[WINED3DTEXSTA_MAXMIPLEVEL] = samplerStates[WINED3DSAMP_MAXMIPLEVEL]; - if(cond_np2) { - mipfilter = WINED3DTEXF_NONE; - minfilter = WINED3DTEXF_POINT; - } else { - mipfilter = samplerStates[WINED3DSAMP_MIPFILTER]; - minfilter = samplerStates[WINED3DSAMP_MINFILTER]; - } if (This->baseTexture.states[WINED3DTEXSTA_MINFILTER] > WINED3DTEXF_ANISOTROPIC || This->baseTexture.states[WINED3DTEXSTA_MIPFILTER] > WINED3DTEXF_LINEAR) @@ -484,8 +476,8 @@ void WINAPI IWineD3DBaseTextureImpl_ApplyStateChanges(IWineD3DBaseTexture *iface This->baseTexture.states[WINED3DTEXSTA_MIPFILTER]); } glValue = (*This->baseTexture.minMipLookup) - [min(max(minfilter,WINED3DTEXF_NONE), WINED3DTEXF_ANISOTROPIC)] - [min(max(mipfilter,WINED3DTEXF_NONE), WINED3DTEXF_LINEAR)]; + [min(max(samplerStates[WINED3DSAMP_MINFILTER],WINED3DTEXF_NONE), WINED3DTEXF_ANISOTROPIC)] + [min(max(samplerStates[WINED3DSAMP_MIPFILTER],WINED3DTEXF_NONE), WINED3DTEXF_LINEAR)]; TRACE("ValueMIN=%d, ValueMIP=%d, setting MINFILTER to %x\n", samplerStates[WINED3DSAMP_MINFILTER], diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index e6a1112..131e1b7 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -827,6 +827,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateTexture(IWineD3DDevice *iface, U object->cond_np2 = TRUE; pow2Width = Width; pow2Height = Height; + object->baseTexture.minMipLookup = &minMipLookup_noFilter; } else if(GL_SUPPORT(ARB_TEXTURE_RECTANGLE) && (Width != pow2Width || Height != pow2Height) && !((Format == WINED3DFMT_P8) && GL_SUPPORT(EXT_PALETTED_TEXTURE) && (wined3d_settings.rendertargetlock_mode == RTL_READTEX || wined3d_settings.rendertargetlock_mode == RTL_TEXTEX))) @@ -837,6 +838,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateTexture(IWineD3DDevice *iface, U object->baseTexture.pow2Matrix[15] = 1.0; object->target = GL_TEXTURE_RECTANGLE_ARB; object->cond_np2 = TRUE; + object->baseTexture.minMipLookup = &minMipLookup_noFilter; } else { object->baseTexture.pow2Matrix[0] = (((float)Width) / ((float)pow2Width)); object->baseTexture.pow2Matrix[5] = (((float)Height) / ((float)pow2Height));
1
0
0
0
← Newer
1
...
37
38
39
40
41
42
43
...
112
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
Results per page:
10
25
50
100
200