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
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
May 2011
----- 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
26 participants
511 discussions
Start a n
N
ew thread
[gedmurphy] 51891: [SHELL32_NEW] - Merge 48786. (This is why we moved to C++, so much cleaner than the previous C code.) - Improve parameter checks for IShellLinkA interface. - Fix heap corruption ...
by gedmurphy@svn.reactos.org
Author: gedmurphy Date: Tue May 24 18:18:56 2011 New Revision: 51891 URL:
http://svn.reactos.org/svn/reactos?rev=51891&view=rev
Log: [SHELL32_NEW] - Merge 48786. (This is why we moved to C++, so much cleaner than the previous C code.) - Improve parameter checks for IShellLinkA interface. - Fix heap corruption when an invalid pointer is passed. - Implement IPersistFile_fnGetCurFile. - TODO: Add same checks to IShellLinkW interface and fix IShellLink[A|W]::GetPath / SetPath / SetIdList / GetIdList logic. Modified: trunk/reactos/dll/win32/shell32_new/shelllink.cpp trunk/reactos/dll/win32/shell32_new/shelllink.h Modified: trunk/reactos/dll/win32/shell32_new/shelllink.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32_new/shel…
============================================================================== --- trunk/reactos/dll/win32/shell32_new/shelllink.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32_new/shelllink.cpp [iso-8859-1] Tue May 24 18:18:56 2011 @@ -102,6 +102,7 @@ /* strdup on the process heap */ static LPWSTR __inline HEAP_strdupAtoW( HANDLE heap, DWORD flags, LPCSTR str) { + assert(str); INT len = MultiByteToWideChar( CP_ACP, 0, str, -1, NULL, 0 ); LPWSTR p = (LPWSTR)HeapAlloc( heap, flags, len*sizeof (WCHAR) ); if( !p ) @@ -254,6 +255,16 @@ if( SUCCEEDED( r ) ) { + if ( sCurFile ) + { + HeapFree(GetProcessHeap(), 0, sCurFile); + } + sCurFile = (LPWSTR)HeapAlloc(GetProcessHeap(), 0, (wcslen(pszFileName)+1) * sizeof(WCHAR)); + if ( sCurFile ) + { + wcscpy(sCurFile, pszFileName); + } + StartLinkProcessor( pszFileName ); bDirty = FALSE; @@ -276,8 +287,25 @@ HRESULT WINAPI ShellLink::GetCurFile(LPOLESTR *ppszFileName) { - FIXME("(%p)\n", this); - return NOERROR; + *ppszFileName = NULL; + + if ( !sCurFile) + { + /* IPersistFile::GetCurFile called before IPersistFile::Save */ + return S_FALSE; + } + + *ppszFileName = (LPOLESTR)CoTaskMemAlloc((wcslen(sCurFile)+1) * sizeof(WCHAR)); + if (!*ppszFileName) + { + /* out of memory */ + return E_OUTOFMEMORY; + } + + /* copy last saved filename */ + wcscpy(*ppszFileName, sCurFile); + + return NOERROR; } /************************************************************************ @@ -1023,10 +1051,13 @@ TRACE("(%p)->(pName=%s)\n", this, pszName); HeapFree(GetProcessHeap(), 0, sDescription); - sDescription = HEAP_strdupAtoW( GetProcessHeap(), 0, pszName); - if ( !sDescription ) - return E_OUTOFMEMORY; - + sDescription = NULL; + + if ( pszName ) { + sDescription = HEAP_strdupAtoW( GetProcessHeap(), 0, pszName); + if ( !sDescription ) + return E_OUTOFMEMORY; + } bDirty = TRUE; return S_OK; @@ -1050,10 +1081,13 @@ TRACE("(%p)->(dir=%s)\n",this, pszDir); HeapFree(GetProcessHeap(), 0, sWorkDir); - sWorkDir = HEAP_strdupAtoW( GetProcessHeap(), 0, pszDir); - if ( !sWorkDir ) - return E_OUTOFMEMORY; - + sWorkDir = NULL; + + if ( pszDir ) { + sWorkDir = HEAP_strdupAtoW( GetProcessHeap(), 0, pszDir); + if ( !sWorkDir ) + return E_OUTOFMEMORY; + } bDirty = TRUE; return S_OK; @@ -1077,9 +1111,13 @@ TRACE("(%p)->(args=%s)\n",this, pszArgs); HeapFree(GetProcessHeap(), 0, sArgs); - sArgs = HEAP_strdupAtoW( GetProcessHeap(), 0, pszArgs); - if( !sArgs ) - return E_OUTOFMEMORY; + sArgs = NULL; + + if ( pszArgs ) { + sArgs = HEAP_strdupAtoW( GetProcessHeap(), 0, pszArgs); + if( !sArgs ) + return E_OUTOFMEMORY; + } bDirty = TRUE; @@ -1196,9 +1234,13 @@ TRACE("(%p)->(path=%s iicon=%u)\n",this, pszIconPath, iIcon); HeapFree(GetProcessHeap(), 0, sIcoPath); - sIcoPath = HEAP_strdupAtoW(GetProcessHeap(), 0, pszIconPath); - if ( !sIcoPath ) - return E_OUTOFMEMORY; + sIcoPath = NULL; + + if ( pszIconPath ) { + sIcoPath = HEAP_strdupAtoW(GetProcessHeap(), 0, pszIconPath); + if ( !sIcoPath ) + return E_OUTOFMEMORY; + } iIcoNdx = iIcon; bDirty = TRUE; @@ -1211,8 +1253,12 @@ TRACE("(%p)->(path=%s %x)\n",this, pszPathRel, dwReserved); HeapFree(GetProcessHeap(), 0, sPathRel); - sPathRel = HEAP_strdupAtoW(GetProcessHeap(), 0, pszPathRel); - bDirty = TRUE; + sPathRel = NULL; + + if ( pszPathRel ) { + sPathRel = HEAP_strdupAtoW(GetProcessHeap(), 0, pszPathRel); + bDirty = TRUE; + } return ShellLink_UpdatePath(sPathRel, sPath, sWorkDir, &sPath); } Modified: trunk/reactos/dll/win32/shell32_new/shelllink.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32_new/shel…
============================================================================== --- trunk/reactos/dll/win32/shell32_new/shelllink.h [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32_new/shelllink.h [iso-8859-1] Tue May 24 18:18:56 2011 @@ -71,6 +71,7 @@ LPWSTR sComponent; volume_info volume; LPWSTR sLinkPath; + LPWSTR sCurFile; BOOL bRunAs; BOOL bDirty; INT iIdOpen; /* id of the "Open" entry in the context menu */
13 years, 7 months
1
0
0
0
[gedmurphy] 51890: [SHELL32_NEW] - Merge 48254, 48371, 48463, 48501 - Don't worry about trying to build this dll, it needs the new PSDK interfaces which won't be committed until the very end as the...
by gedmurphy@svn.reactos.org
Author: gedmurphy Date: Tue May 24 18:14:47 2011 New Revision: 51890 URL:
http://svn.reactos.org/svn/reactos?rev=51890&view=rev
Log: [SHELL32_NEW] - Merge 48254, 48371, 48463, 48501 - Don't worry about trying to build this dll, it needs the new PSDK interfaces which won't be committed until the very end as they'll break the existing shell32. It make take a day or two as everything has to be merged by hand. Modified: trunk/reactos/dll/win32/shell32_new/iconcache.cpp trunk/reactos/dll/win32/shell32_new/lang/uk-UA.rc trunk/reactos/dll/win32/shell32_new/shell32.rbuild trunk/reactos/dll/win32/shell32_new/shlfileop.cpp Modified: trunk/reactos/dll/win32/shell32_new/iconcache.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32_new/icon…
============================================================================== --- trunk/reactos/dll/win32/shell32_new/iconcache.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32_new/iconcache.cpp [iso-8859-1] Tue May 24 18:14:47 2011 @@ -174,26 +174,20 @@ goto fail; } - /* Copy the source xor bitmap to the target and clear out part of it by using - the shortcut mask */ + /* Copy the source color bitmap to the target */ if (! BitBlt(TargetDC, 0, 0, SourceBitmapInfo.bmWidth, SourceBitmapInfo.bmHeight, - SourceDC, 0, 0, SRCCOPY) || - ! BitBlt(TargetDC, 0, SourceBitmapInfo.bmHeight - ShortcutBitmapInfo.bmHeight, - ShortcutBitmapInfo.bmWidth, ShortcutBitmapInfo.bmHeight, - ShortcutDC, 0, 0, SRCAND)) - { - goto fail; - } - - if (NULL == SelectObject(ShortcutDC, ShortcutIconInfo.hbmColor)) goto fail; - - /* Now put in the shortcut xor mask */ - if (! BitBlt(TargetDC, 0, SourceBitmapInfo.bmHeight - ShortcutBitmapInfo.bmHeight, - ShortcutBitmapInfo.bmWidth, ShortcutBitmapInfo.bmHeight, - ShortcutDC, 0, 0, SRCINVERT)) - { - goto fail; - } + SourceDC, 0, 0, SRCCOPY)) goto fail; + + /* Copy the source xor bitmap to the target and clear out part of it by using + the shortcut mask */ + if (NULL == SelectObject(ShortcutDC, ShortcutIconInfo.hbmColor)) goto fail; + if (!MaskBlt(TargetDC, 0, SourceBitmapInfo.bmHeight - ShortcutBitmapInfo.bmHeight, + ShortcutBitmapInfo.bmWidth, ShortcutBitmapInfo.bmHeight, + ShortcutDC, 0, 0, ShortcutIconInfo.hbmMask, 0, 0, + MAKEROP4(SRCCOPY, 0xAA0000))) + { + goto fail; + } /* Clean up, we're not goto'ing to 'fail' after this so we can be lazy and not set handles to NULL */ @@ -442,7 +436,7 @@ 100); if (ShellSmallIconList) { - /* Load the document icon, which is used as the default if an icon isn't found. */ + /* Load the document icon, which is used as the default if an icon isn't found. */ hSm = (HICON)LoadImageW(shell32_hInstance, MAKEINTRESOURCEW(IDI_SHELL_DOCUMENT), IMAGE_ICON, Modified: trunk/reactos/dll/win32/shell32_new/lang/uk-UA.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32_new/lang…
============================================================================== --- trunk/reactos/dll/win32/shell32_new/lang/uk-UA.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32_new/lang/uk-UA.rc [iso-8859-1] Tue May 24 18:14:47 2011 @@ -156,7 +156,7 @@ BEGIN ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE LTEXT "Ââåä³òü ³ì'ÿ ïðîãðàìè, òåêè, äîêóìåíòà àáî ðåñóðñó ²íòåðíåòó, ³ ReactOS â³äêðèº ¿õ.", 12289, 36, 11, 182, 18 - LTEXT "&³äêðèòè:", 12305, 3, 39, 29, 10 + LTEXT "&³äêðèòè:", 12305, 3, 39, 32, 10 CONTROL "", 12298, "COMBOBOX", WS_TABSTOP | WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_AUTOHSCROLL | CBS_DROPDOWN, 36, 37, 183, 100 DEFPUSHBUTTON "OK", IDOK, 62, 63, 50, 14, WS_TABSTOP PUSHBUTTON "Ñêàñóâàòè", IDCANCEL, 116, 63, 50, 14, WS_TABSTOP Modified: trunk/reactos/dll/win32/shell32_new/shell32.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32_new/shel…
============================================================================== --- trunk/reactos/dll/win32/shell32_new/shell32.rbuild [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32_new/shell32.rbuild [iso-8859-1] Tue May 24 18:14:47 2011 @@ -1,5 +1,5 @@ <group> -<module name="shell32" type="win32dll" baseaddress="${BASEADDRESS_SHELL32}" installbase="system32" installname="shell32.dll" crt="msvcrt"> +<module name="shell32_new" type="win32dll" baseaddress="${BASEADDRESS_SHELL32}" installbase="system32" installname="shell32_new.dll" allowwarnings="true" crt="msvcrt"> <autoregister infsection="OleControlDlls" type="Both" /> <importlibrary definition="shell32.spec" /> <include base="shell32">.</include> Modified: trunk/reactos/dll/win32/shell32_new/shlfileop.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32_new/shlf…
============================================================================== --- trunk/reactos/dll/win32/shell32_new/shlfileop.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32_new/shlfileop.cpp [iso-8859-1] Tue May 24 18:14:47 2011 @@ -550,7 +550,7 @@ return GetLastError(); } -static WINAPI DWORD SHOperationProgressRoutine(LARGE_INTEGER TotalFileSize, LARGE_INTEGER TotalBytesTransferred, LARGE_INTEGER StreamSize, LARGE_INTEGER StreamBytesTransferred, DWORD dwStreamNumber, DWORD dwCallbackReason, HANDLE hSourceFile, HANDLE hDestinationFile, LPVOID lpData) +static DWORD WINAPI SHOperationProgressRoutine(LARGE_INTEGER TotalFileSize, LARGE_INTEGER TotalBytesTransferred, LARGE_INTEGER StreamSize, LARGE_INTEGER StreamBytesTransferred, DWORD dwStreamNumber, DWORD dwCallbackReason, HANDLE hSourceFile, HANDLE hDestinationFile, LPVOID lpData) { FILE_OPERATION_CONTEXT * Context; LARGE_INTEGER Progress;
13 years, 7 months
1
0
0
0
[cmihail] 51889: [TCPIP] Fixed an error in the accepting code (in rostcp.c line 576). tcp_accepted was being called for the wrong pcb. Instead of the pcb belonging to the listening socket it was be...
by cmihail@svn.reactos.org
Author: cmihail Date: Tue May 24 18:05:51 2011 New Revision: 51889 URL:
http://svn.reactos.org/svn/reactos?rev=51889&view=rev
Log: [TCPIP] Fixed an error in the accepting code (in rostcp.c line 576). tcp_accepted was being called for the wrong pcb. Instead of the pcb belonging to the listening socket it was being called for the pcb belonging to the newly created connection socket. In order to fix this I added an extra field to the tcp_pcb structure to hold a reference to the listening socket. This is a crude method and it will be replaced by something more elegant. Right now however there's a slight nondeterminism regarding the connection. One it's established the message either gets through to the other side or not, randomly. This could be due to a race condition of some sorts. Also another problem is that the server side brings down the system when closing. Modified: branches/GSoC_2011/TcpIpDriver/drivers/network/afd/afd/connect.c branches/GSoC_2011/TcpIpDriver/drivers/network/afd/afd/listen.c branches/GSoC_2011/TcpIpDriver/drivers/network/afd/afd/main.c branches/GSoC_2011/TcpIpDriver/drivers/network/tcpip/include/debug.h branches/GSoC_2011/TcpIpDriver/drivers/network/tcpip/tcpip/dispatch.c branches/GSoC_2011/TcpIpDriver/drivers/network/tcpip/tcpip/main.c branches/GSoC_2011/TcpIpDriver/lib/drivers/ip/transport/tcp/accept.c branches/GSoC_2011/TcpIpDriver/lib/drivers/ip/transport/tcp/event.c branches/GSoC_2011/TcpIpDriver/lib/drivers/ip/transport/tcp/if.c branches/GSoC_2011/TcpIpDriver/lib/drivers/ip/transport/tcp/tcp.c branches/GSoC_2011/TcpIpDriver/lib/drivers/lwip/src/core/tcp.c branches/GSoC_2011/TcpIpDriver/lib/drivers/lwip/src/core/tcp_in.c branches/GSoC_2011/TcpIpDriver/lib/drivers/lwip/src/include/arch/cc.h branches/GSoC_2011/TcpIpDriver/lib/drivers/lwip/src/include/lwip/debug.h branches/GSoC_2011/TcpIpDriver/lib/drivers/lwip/src/include/lwip/tcp.h branches/GSoC_2011/TcpIpDriver/lib/drivers/lwip/src/include/lwipopts.h branches/GSoC_2011/TcpIpDriver/lib/drivers/lwip/src/rostcp.c [This mail would be too long, it was shortened to contain the URLs only.] Modified: branches/GSoC_2011/TcpIpDriver/drivers/network/afd/afd/connect.c URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2011/TcpIpDriver/drivers/n…
Modified: branches/GSoC_2011/TcpIpDriver/drivers/network/afd/afd/listen.c URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2011/TcpIpDriver/drivers/n…
Modified: branches/GSoC_2011/TcpIpDriver/drivers/network/afd/afd/main.c URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2011/TcpIpDriver/drivers/n…
Modified: branches/GSoC_2011/TcpIpDriver/drivers/network/tcpip/include/debug.h URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2011/TcpIpDriver/drivers/n…
Modified: branches/GSoC_2011/TcpIpDriver/drivers/network/tcpip/tcpip/dispatch.c URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2011/TcpIpDriver/drivers/n…
Modified: branches/GSoC_2011/TcpIpDriver/drivers/network/tcpip/tcpip/main.c URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2011/TcpIpDriver/drivers/n…
Modified: branches/GSoC_2011/TcpIpDriver/lib/drivers/ip/transport/tcp/accept.c URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2011/TcpIpDriver/lib/drive…
Modified: branches/GSoC_2011/TcpIpDriver/lib/drivers/ip/transport/tcp/event.c URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2011/TcpIpDriver/lib/drive…
Modified: branches/GSoC_2011/TcpIpDriver/lib/drivers/ip/transport/tcp/if.c URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2011/TcpIpDriver/lib/drive…
Modified: branches/GSoC_2011/TcpIpDriver/lib/drivers/ip/transport/tcp/tcp.c URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2011/TcpIpDriver/lib/drive…
Modified: branches/GSoC_2011/TcpIpDriver/lib/drivers/lwip/src/core/tcp.c URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2011/TcpIpDriver/lib/drive…
Modified: branches/GSoC_2011/TcpIpDriver/lib/drivers/lwip/src/core/tcp_in.c URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2011/TcpIpDriver/lib/drive…
Modified: branches/GSoC_2011/TcpIpDriver/lib/drivers/lwip/src/include/arch/cc.h URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2011/TcpIpDriver/lib/drive…
Modified: branches/GSoC_2011/TcpIpDriver/lib/drivers/lwip/src/include/lwip/debug.h URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2011/TcpIpDriver/lib/drive…
Modified: branches/GSoC_2011/TcpIpDriver/lib/drivers/lwip/src/include/lwip/tcp.h URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2011/TcpIpDriver/lib/drive…
Modified: branches/GSoC_2011/TcpIpDriver/lib/drivers/lwip/src/include/lwipopts.h URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2011/TcpIpDriver/lib/drive…
Modified: branches/GSoC_2011/TcpIpDriver/lib/drivers/lwip/src/rostcp.c URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2011/TcpIpDriver/lib/drive…
13 years, 7 months
1
0
0
0
[janderwald] 51888: [USBOHCI] - Add sanity checks - Preserve command status value when notifying the hc that a control / bulk endpoint was added - Re-enable root hub notification interrupt when res...
by janderwald@svn.reactos.org
Author: janderwald Date: Tue May 24 17:57:00 2011 New Revision: 51888 URL:
http://svn.reactos.org/svn/reactos?rev=51888&view=rev
Log: [USBOHCI] - Add sanity checks - Preserve command status value when notifying the hc that a control / bulk endpoint was added - Re-enable root hub notification interrupt when reset port has been completed - Dispatch processing to USBQeueu when DoneHead event arrives - Scan endpoints to find the logical endpoint which was completed by the hardware - Signal completion to IUSBRequest by calling CompletionCallback - Create a final transfer descriptor which is linked to the endpoint descriptor - Control transfers now appear to be working (Device retrieves device descriptor / configuration descriptor and succeeds in setting device address) - Configuration parsing code needs more work now (currently fails there due to invalid / unexpected configuration descriptor from device) Modified: branches/usb-bringup/drivers/usb/usbohci/hardware.cpp branches/usb-bringup/drivers/usb/usbohci/hardware.h branches/usb-bringup/drivers/usb/usbohci/interfaces.h branches/usb-bringup/drivers/usb/usbohci/usb_device.cpp branches/usb-bringup/drivers/usb/usbohci/usb_queue.cpp branches/usb-bringup/drivers/usb/usbohci/usb_request.cpp Modified: branches/usb-bringup/drivers/usb/usbohci/hardware.cpp URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup/drivers/usb/usbohci…
============================================================================== --- branches/usb-bringup/drivers/usb/usbohci/hardware.cpp [iso-8859-1] (original) +++ branches/usb-bringup/drivers/usb/usbohci/hardware.cpp [iso-8859-1] Tue May 24 17:57:00 2011 @@ -540,6 +540,7 @@ // assert that the controller has been started // ASSERT((Control & OHCI_HC_FUNCTIONAL_STATE_MASK) == OHCI_HC_FUNCTIONAL_STATE_OPERATIONAL); + ASSERT((Control & OHCI_ENABLE_LIST) == OHCI_ENABLE_LIST); // // get frame interval @@ -689,20 +690,30 @@ CUSBHardwareDevice::HeadEndpointDescriptorModified( ULONG Type) { + ULONG Value = READ_REGISTER_ULONG((PULONG)((PUCHAR)m_Base + OHCI_COMMAND_STATUS_OFFSET)); + if (Type == USB_ENDPOINT_TYPE_CONTROL) { // // notify controller // - WRITE_REGISTER_ULONG((PULONG)((PUCHAR)m_Base + OHCI_COMMAND_STATUS_OFFSET), OHCI_CONTROL_LIST_FILLED); + //WRITE_REGISTER_ULONG((PULONG)((PUCHAR)m_Base + OHCI_CONTROL_HEAD_ED_OFFSET), m_ControlEndpointDescriptor->NextPhysicalEndpoint); + //WRITE_REGISTER_ULONG((PULONG)((PUCHAR)m_Base + OHCI_CONTROL_CURRENT_ED_OFFSET), m_ControlEndpointDescriptor->NextPhysicalEndpoint); + WRITE_REGISTER_ULONG((PULONG)((PUCHAR)m_Base + OHCI_COMMAND_STATUS_OFFSET), Value | OHCI_CONTROL_LIST_FILLED); } else if (Type == USB_ENDPOINT_TYPE_BULK) { // // notify controller // - WRITE_REGISTER_ULONG((PULONG)((PUCHAR)m_Base + OHCI_COMMAND_STATUS_OFFSET), OHCI_BULK_LIST_FILLED); - } + WRITE_REGISTER_ULONG((PULONG)((PUCHAR)m_Base + OHCI_COMMAND_STATUS_OFFSET), Value | OHCI_BULK_LIST_FILLED); + } + + Value = READ_REGISTER_ULONG((PULONG)((PUCHAR)m_Base + OHCI_COMMAND_STATUS_OFFSET)); + + + DPRINT1("HeadEndpointDescriptorModified Value %x Type %x\n", Value, Type); + } NTSTATUS @@ -1035,7 +1046,9 @@ // // re-enable root hub change // - WRITE_REGISTER_ULONG((PULONG)((PUCHAR)m_Base + OHCI_INTERRUPT_ENABLE_OFFSET), OHCI_ROOT_HUB_STATUS_CHANGE); + Value = READ_REGISTER_ULONG((PULONG)((PUCHAR)m_Base + OHCI_INTERRUPT_ENABLE_OFFSET)); + WRITE_REGISTER_ULONG((PULONG)((PUCHAR)m_Base + OHCI_INTERRUPT_ENABLE_OFFSET), Value | OHCI_ROOT_HUB_STATUS_CHANGE); + } if (Status == C_PORT_CONNECTION) @@ -1231,11 +1244,6 @@ { // // head completed - // - DPRINT1("InterruptServiceRoutine> Done Head completion\n"); - ASSERT(FALSE); - // - // FIXME: handle event // Acknowledge |= OHCI_WRITEBACK_DONE_HEAD; } @@ -1307,6 +1315,8 @@ { CUSBHardwareDevice *This; ULONG CStatus, Index, PortStatus; + POHCI_ENDPOINT_DESCRIPTOR EndpointDescriptor; + ULONG DoneHead; // // get parameters @@ -1314,6 +1324,25 @@ This = (CUSBHardwareDevice*) SystemArgument1; CStatus = (ULONG) SystemArgument2; + DPRINT1("OhciDefferedRoutine Status %x\n", CStatus); + + if (CStatus & OHCI_WRITEBACK_DONE_HEAD) + { + // + // descriptor completion, get done head + // + DoneHead = This->m_HCCA->DoneHead; + + // + // clear out lower bits, ed are 16 byte aligned + // + DoneHead &= ~0xF; + + // + // notify queue of event + // + This->m_UsbQueue->TransferDescriptorCompletionCallback(DoneHead); + } if (CStatus & OHCI_ROOT_HUB_STATUS_CHANGE) { // Modified: branches/usb-bringup/drivers/usb/usbohci/hardware.h URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup/drivers/usb/usbohci…
============================================================================== --- branches/usb-bringup/drivers/usb/usbohci/hardware.h [iso-8859-1] (original) +++ branches/usb-bringup/drivers/usb/usbohci/hardware.h [iso-8859-1] Tue May 24 17:57:00 2011 @@ -202,8 +202,9 @@ // Software part PHYSICAL_ADDRESS PhysicalAddress; + PVOID HeadLogicalDescriptor; + PVOID NextDescriptor; PVOID Request; - PVOID NextDescriptor; }OHCI_ENDPOINT_DESCRIPTOR, *POHCI_ENDPOINT_DESCRIPTOR; @@ -238,9 +239,9 @@ ULONG LastPhysicalByteAddress; // Physical pointer to buffer end // Software part PHYSICAL_ADDRESS PhysicalAddress; // Physical address of this descriptor + PVOID NextLogicalDescriptor; ULONG BufferSize; // Size of the buffer PVOID BufferLogical; // Logical pointer to the buffer - PVOID Request; // pointer to IUSBRequest }OHCI_GENERAL_TD, *POHCI_GENERAL_TD; Modified: branches/usb-bringup/drivers/usb/usbohci/interfaces.h URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup/drivers/usb/usbohci…
============================================================================== --- branches/usb-bringup/drivers/usb/usbohci/interfaces.h [iso-8859-1] (original) +++ branches/usb-bringup/drivers/usb/usbohci/interfaces.h [iso-8859-1] Tue May 24 17:57:00 2011 @@ -436,6 +436,13 @@ virtual BOOLEAN IsRequestInitialized() = 0; +//----------------------------------------------------------------------------------------- +// +// CompletionCallback +// +// Description: notifies request that the endpoint descriptor is complete + + virtual VOID CompletionCallback(struct _OHCI_ENDPOINT_DESCRIPTOR * OutDescriptor) = 0; }; @@ -495,6 +502,14 @@ // Description: creates an usb request virtual NTSTATUS CreateUSBRequest(IUSBRequest **OutRequest) = 0; + +//----------------------------------------------------------------------------------------- +// +// TransferDescriptorCompletionCallback +// +// Description: notifies the queue that a transfer was completed + + virtual VOID TransferDescriptorCompletionCallback(ULONG TransferDescriptorLogicalAddress) = 0; }; Modified: branches/usb-bringup/drivers/usb/usbohci/usb_device.cpp URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup/drivers/usb/usbohci…
============================================================================== --- branches/usb-bringup/drivers/usb/usbohci/usb_device.cpp [iso-8859-1] (original) +++ branches/usb-bringup/drivers/usb/usbohci/usb_device.cpp [iso-8859-1] Tue May 24 17:57:00 2011 @@ -707,6 +707,11 @@ } // + // zero buffer + // + RtlZeroMemory(Buffer, PAGE_SIZE); + + // // build setup packet // CtrlSetup.bmRequestType._BM.Recipient = BMREQUEST_TO_DEVICE; Modified: branches/usb-bringup/drivers/usb/usbohci/usb_queue.cpp URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup/drivers/usb/usbohci…
============================================================================== --- branches/usb-bringup/drivers/usb/usbohci/usb_queue.cpp [iso-8859-1] (original) +++ branches/usb-bringup/drivers/usb/usbohci/usb_queue.cpp [iso-8859-1] Tue May 24 17:57:00 2011 @@ -33,11 +33,17 @@ return m_Ref; } + // com virtual NTSTATUS Initialize(IN PUSBHARDWAREDEVICE Hardware, PDMA_ADAPTER AdapterObject, IN PDMAMEMORYMANAGER MemManager, IN OPTIONAL PKSPIN_LOCK Lock); virtual ULONG GetPendingRequestCount(); virtual NTSTATUS AddUSBRequest(IUSBRequest * Request); virtual NTSTATUS CancelRequests(); virtual NTSTATUS CreateUSBRequest(IUSBRequest **OutRequest); + virtual VOID TransferDescriptorCompletionCallback(ULONG TransferDescriptorLogicalAddress); + + // local functions + BOOLEAN IsTransferDescriptorInEndpoint(IN POHCI_ENDPOINT_DESCRIPTOR EndpointDescriptor, IN ULONG TransferDescriptorLogicalAddress); + NTSTATUS FindTransferDescriptorInEndpoint(IN POHCI_ENDPOINT_DESCRIPTOR EndpointDescriptor, IN ULONG TransferDescriptorLogicalAddress, OUT POHCI_ENDPOINT_DESCRIPTOR *OutEndpointDescriptor, OUT POHCI_ENDPOINT_DESCRIPTOR *OutPreviousEndpointDescriptor); // constructor / destructor CUSBQueue(IUnknown *OuterUnknown){} @@ -218,13 +224,14 @@ // set descriptor active // Descriptor->Flags &= ~OHCI_ENDPOINT_SKIP; + //HeadDescriptor->Flags &= ~OHCI_ENDPOINT_SKIP; // // notify hardware of our request // m_Hardware->HeadEndpointDescriptorModified(Type); - DPRINT1("Request added to queue\n"); + DPRINT1("Request %x %x added to queue\n", Descriptor, Descriptor->PhysicalAddress); return STATUS_SUCCESS; @@ -255,6 +262,142 @@ return Status; } +NTSTATUS +CUSBQueue::FindTransferDescriptorInEndpoint( + IN POHCI_ENDPOINT_DESCRIPTOR EndpointDescriptor, + IN ULONG TransferDescriptorLogicalAddress, + OUT POHCI_ENDPOINT_DESCRIPTOR *OutEndpointDescriptor, + OUT POHCI_ENDPOINT_DESCRIPTOR *OutPreviousEndpointDescriptor) +{ + POHCI_ENDPOINT_DESCRIPTOR LastDescriptor = EndpointDescriptor; + + + // + // skip first endpoint head + // + EndpointDescriptor = (POHCI_ENDPOINT_DESCRIPTOR)EndpointDescriptor->NextDescriptor; + + while(EndpointDescriptor) + { + // + // check if the transfer descriptor is inside the list + // + if (IsTransferDescriptorInEndpoint(EndpointDescriptor, TransferDescriptorLogicalAddress)) + { + // + // found endpoint + // + *OutEndpointDescriptor = EndpointDescriptor; + *OutPreviousEndpointDescriptor = LastDescriptor; + + // + // done + // + return STATUS_SUCCESS; + } + + // + // store last endpoint + // + LastDescriptor = EndpointDescriptor; + + // + // move to next + // + EndpointDescriptor = (POHCI_ENDPOINT_DESCRIPTOR)EndpointDescriptor->NextDescriptor; + } + + // + // failed to endpoint + // + return STATUS_NOT_FOUND; +} + + +BOOLEAN +CUSBQueue::IsTransferDescriptorInEndpoint( + IN POHCI_ENDPOINT_DESCRIPTOR EndpointDescriptor, + IN ULONG TransferDescriptorLogicalAddress) +{ + POHCI_GENERAL_TD Descriptor; + + // + // get first general transfer descriptor + // + Descriptor = (POHCI_GENERAL_TD)EndpointDescriptor->HeadLogicalDescriptor; + + // + // sanity check + // + ASSERT(Descriptor); + + do + { + if (Descriptor->PhysicalAddress.LowPart == TransferDescriptorLogicalAddress) + { + // + // found descriptor + // + return TRUE; + } + + // + // move to next + // + Descriptor = (POHCI_GENERAL_TD)Descriptor->NextLogicalDescriptor; + }while(Descriptor); + + + // + // no descriptor found + // + return FALSE; +} + + +VOID +CUSBQueue::TransferDescriptorCompletionCallback( + ULONG TransferDescriptorLogicalAddress) +{ + POHCI_ENDPOINT_DESCRIPTOR EndpointDescriptor, PreviousEndpointDescriptor; + NTSTATUS Status; + PUSBREQUEST Request; + + // + // find transfer descriptor in control list + // + Status = FindTransferDescriptorInEndpoint(m_ControlHeadEndpointDescriptor, TransferDescriptorLogicalAddress, &EndpointDescriptor, &PreviousEndpointDescriptor); + if (NT_SUCCESS(Status)) + { + // + // FIXME: make sure this is ok + // unlink descriptor + // + PreviousEndpointDescriptor->NextDescriptor = EndpointDescriptor->NextDescriptor; + PreviousEndpointDescriptor->NextPhysicalEndpoint = EndpointDescriptor->NextPhysicalEndpoint; + + // + // get corresponding request + // + Request = PUSBREQUEST(EndpointDescriptor->Request); + + // + // notify of completion + // + Request->CompletionCallback(EndpointDescriptor); + + // + // FIXME: check if complete + // + + // + // release request + // + Request->Release(); + } + +} + NTSTATUS CreateUSBQueue( Modified: branches/usb-bringup/drivers/usb/usbohci/usb_request.cpp URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup/drivers/usb/usbohci…
============================================================================== --- branches/usb-bringup/drivers/usb/usbohci/usb_request.cpp [iso-8859-1] (original) +++ branches/usb-bringup/drivers/usb/usbohci/usb_request.cpp [iso-8859-1] Tue May 24 17:57:00 2011 @@ -44,7 +44,7 @@ virtual VOID GetResultStatus(OUT OPTIONAL NTSTATUS *NtStatusCode, OUT OPTIONAL PULONG UrbStatusCode); virtual BOOLEAN IsRequestInitialized(); virtual BOOLEAN IsQueueHeadComplete(struct _QUEUE_HEAD * QueueHead); - + virtual VOID CompletionCallback(struct _OHCI_ENDPOINT_DESCRIPTOR * OutDescriptor); // local functions ULONG InternalGetTransferType(); @@ -635,7 +635,7 @@ CUSBRequest::BuildControlTransferDescriptor( POHCI_ENDPOINT_DESCRIPTOR * OutEndpointDescriptor) { - POHCI_GENERAL_TD SetupDescriptor, StatusDescriptor, DataDescriptor = NULL; + POHCI_GENERAL_TD SetupDescriptor, StatusDescriptor, DataDescriptor = NULL, LastDescriptor; POHCI_ENDPOINT_DESCRIPTOR EndpointDescriptor; NTSTATUS Status; @@ -680,6 +680,22 @@ return Status; } + // + // finally create the last descriptor + // + Status = CreateGeneralTransferDescriptor(&LastDescriptor, 0); + if (!NT_SUCCESS(Status)) + { + // + // failed to create status descriptor + // + FreeDescriptor(SetupDescriptor); + FreeDescriptor(StatusDescriptor); + m_DmaManager->Release(EndpointDescriptor, sizeof(OHCI_ENDPOINT_DESCRIPTOR)); + return Status; + } + + if (m_TransferBufferLength) { // @@ -690,7 +706,7 @@ // // now create the data descriptor // - Status = CreateGeneralTransferDescriptor(&DataDescriptor, 0); + Status = CreateGeneralTransferDescriptor(&DataDescriptor, m_TransferBufferLength); if (!NT_SUCCESS(Status)) { // @@ -699,6 +715,7 @@ m_DmaManager->Release(EndpointDescriptor, sizeof(OHCI_ENDPOINT_DESCRIPTOR)); FreeDescriptor(SetupDescriptor); FreeDescriptor(StatusDescriptor); + FreeDescriptor(LastDescriptor); return Status; } @@ -762,11 +779,20 @@ // link setup descriptor to data descriptor // SetupDescriptor->NextPhysicalDescriptor = DataDescriptor->PhysicalAddress.LowPart; - - // - // FIXME: should link to last data descriptor to status descriptor + SetupDescriptor->NextLogicalDescriptor = DataDescriptor; + + // + // link data descriptor to status descriptor + // FIXME: check if there are more data descriptors // DataDescriptor->NextPhysicalDescriptor = StatusDescriptor->PhysicalAddress.LowPart; + DataDescriptor->NextLogicalDescriptor = StatusDescriptor; + + // + // link status descriptor to last descriptor + // + StatusDescriptor->NextPhysicalDescriptor = LastDescriptor->PhysicalAddress.LowPart; + StatusDescriptor->NextLogicalDescriptor = LastDescriptor; } else { @@ -774,14 +800,21 @@ // link setup descriptor to status descriptor // SetupDescriptor->NextPhysicalDescriptor = StatusDescriptor->PhysicalAddress.LowPart; + SetupDescriptor->NextLogicalDescriptor = StatusDescriptor; + + // + // link status descriptor to last descriptor + // + StatusDescriptor->NextPhysicalDescriptor = LastDescriptor->PhysicalAddress.LowPart; + StatusDescriptor->NextLogicalDescriptor = LastDescriptor; } // // now link descriptor to endpoint // EndpointDescriptor->HeadPhysicalDescriptor = SetupDescriptor->PhysicalAddress.LowPart; - EndpointDescriptor->TailPhysicalDescriptor = SetupDescriptor->PhysicalAddress.LowPart; - DPRINT1("CUSBRequest::BuildControlTransferDescriptor done\n"); + EndpointDescriptor->TailPhysicalDescriptor = LastDescriptor->PhysicalAddress.LowPart; + EndpointDescriptor->HeadLogicalDescriptor = SetupDescriptor; // // store result @@ -887,6 +920,32 @@ } +VOID +CUSBRequest::CompletionCallback( + struct _OHCI_ENDPOINT_DESCRIPTOR * OutDescriptor) +{ + DPRINT1("CUSBRequest::CompletionCallback\n"); + + // + // set status code + // + m_NtStatusCode = STATUS_SUCCESS; + m_UrbStatusCode = USBD_STATUS_SUCCESS; + + ASSERT(!m_Irp); + + // + // FIXME: cleanup descriptors + // + + // + // signal completion event + // + PC_ASSERT(m_CompletionEvent); + KeSetEvent(m_CompletionEvent, 0, FALSE); +} + + //----------------------------------------------------------------------------------------- BOOLEAN CUSBRequest::IsRequestInitialized()
13 years, 7 months
1
0
0
0
[jgardou] 51887: [NTOSKRNL/MM] - clear right bit when freeing pool pages.
by jgardou@svn.reactos.org
Author: jgardou Date: Tue May 24 17:55:27 2011 New Revision: 51887 URL:
http://svn.reactos.org/svn/reactos?rev=51887&view=rev
Log: [NTOSKRNL/MM] - clear right bit when freeing pool pages. Modified: trunk/reactos/ntoskrnl/mm/ARM3/pool.c Modified: trunk/reactos/ntoskrnl/mm/ARM3/pool.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/pool.c?re…
============================================================================== --- trunk/reactos/ntoskrnl/mm/ARM3/pool.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/ARM3/pool.c [iso-8859-1] Tue May 24 17:55:27 2011 @@ -864,7 +864,7 @@ // // Clear the allocation and free bits // - RtlClearBit(MmPagedPoolInfo.EndOfPagedPoolBitmap, i); + RtlClearBit(MmPagedPoolInfo.EndOfPagedPoolBitmap, End); RtlClearBits(MmPagedPoolInfo.PagedPoolAllocationMap, i, NumberOfPages); //
13 years, 7 months
1
0
0
0
[tkreuzer] 51886: [WIN32K] - Add a comment about alignment for GreCreateBitmap - Make bits really 32bit aligned - Remove unused variable
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Tue May 24 16:23:36 2011 New Revision: 51886 URL:
http://svn.reactos.org/svn/reactos?rev=51886&view=rev
Log: [WIN32K] - Add a comment about alignment for GreCreateBitmap - Make bits really 32bit aligned - Remove unused variable Modified: trunk/reactos/subsystems/win32/win32k/ntuser/ntuser.c trunk/reactos/subsystems/win32/win32k/objects/bitmaps.c Modified: trunk/reactos/subsystems/win32/win32k/ntuser/ntuser.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntuser/ntuser.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/ntuser/ntuser.c [iso-8859-1] Tue May 24 16:23:36 2011 @@ -92,9 +92,9 @@ HANDLE hPowerRequestEvent, HANDLE hMediaRequestEvent) { - static const WORD wPattern55AA[] = - { 0x5555, 0, 0xaaaa, 0, 0x5555, 0, 0xaaaa, 0, - 0x5555, 0, 0xaaaa, 0, 0x5555, 0, 0xaaaa, 0 }; + static const DWORD wPattern55AA[] = /* 32 bit aligned */ + { 0x55555555, 0xaaaaaaaa, 0x55555555, 0xaaaaaaaa, + 0x55555555, 0xaaaaaaaa, 0x55555555, 0xaaaaaaaa }; HBITMAP hPattern55AABitmap = NULL; NTSTATUS Status; Modified: trunk/reactos/subsystems/win32/win32k/objects/bitmaps.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/bitmaps.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/objects/bitmaps.c [iso-8859-1] Tue May 24 16:23:36 2011 @@ -80,7 +80,6 @@ IN FLONG flags) { PSURFACE psurf; - SURFOBJ *pso; HBITMAP hbmp; /* Verify format */ @@ -94,9 +93,8 @@ return NULL; } - /* Get the handle for the bitmap and the surfobj */ + /* Get the handle for the bitmap */ hbmp = (HBITMAP)psurf->SurfObj.hsurf; - pso = &psurf->SurfObj; /* The infamous RLE hack */ if (iFormat == BMF_4RLE || iFormat == BMF_8RLE) @@ -144,6 +142,7 @@ /* Creates a DDB surface, * as in CreateCompatibleBitmap or CreateBitmap. + * Note that each scanline must be 32bit aligned! */ HBITMAP APIENTRY
13 years, 7 months
1
0
0
0
[tkreuzer] 51885: [WIN32K] - Fix the bitmap alignment issue that caused broken scrollbar pattern
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Tue May 24 15:35:30 2011 New Revision: 51885 URL:
http://svn.reactos.org/svn/reactos?rev=51885&view=rev
Log: [WIN32K] - Fix the bitmap alignment issue that caused broken scrollbar pattern Modified: trunk/reactos/subsystems/win32/win32k/ntuser/ntuser.c trunk/reactos/subsystems/win32/win32k/objects/bitmaps.c Modified: trunk/reactos/subsystems/win32/win32k/ntuser/ntuser.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntuser/ntuser.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/ntuser/ntuser.c [iso-8859-1] Tue May 24 15:35:30 2011 @@ -92,7 +92,9 @@ HANDLE hPowerRequestEvent, HANDLE hMediaRequestEvent) { - static const WORD wPattern55AA[] = { 0x5555, 0xaaaa, 0x5555, 0xaaaa, 0x5555, 0xaaaa, 0x5555, 0xaaaa }; + static const WORD wPattern55AA[] = + { 0x5555, 0, 0xaaaa, 0, 0x5555, 0, 0xaaaa, 0, + 0x5555, 0, 0xaaaa, 0, 0x5555, 0, 0xaaaa, 0 }; HBITMAP hPattern55AABitmap = NULL; NTSTATUS Status; Modified: trunk/reactos/subsystems/win32/win32k/objects/bitmaps.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/bitmaps.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/objects/bitmaps.c [iso-8859-1] Tue May 24 15:35:30 2011 @@ -154,23 +154,15 @@ IN UINT cBitsPixel, IN OPTIONAL PVOID pvBits) { - HBITMAP hbmp; /* Call the extended function */ - hbmp = GreCreateBitmapEx(nWidth, + return GreCreateBitmapEx(nWidth, nHeight, 0, /* auto width */ BitmapFormat(cBitsPixel * cPlanes, BI_RGB), 0, /* no bitmap flags */ 0, /* auto size */ - NULL, + pvBits, DDB_SURFACE /* DDB */); - if (pvBits && hbmp) - { - PSURFACE psurf = SURFACE_ShareLockSurface(hbmp); - UnsafeSetBitmapBits(psurf, 0, pvBits); - SURFACE_ShareUnlockSurface(psurf); - } - return hbmp; } HBITMAP
13 years, 7 months
1
0
0
0
[agreen] 51884: [Explorer_new] - Hide minimized windows.
by agreen@svn.reactos.org
Author: agreen Date: Tue May 24 14:04:50 2011 New Revision: 51884 URL:
http://svn.reactos.org/svn/reactos?rev=51884&view=rev
Log: [Explorer_new] - Hide minimized windows. Modified: branches/GSoC_2011/NewExplorer/base/shell/explorer-new/explorer.c Modified: branches/GSoC_2011/NewExplorer/base/shell/explorer-new/explorer.c URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2011/NewExplorer/base/shel…
============================================================================== --- branches/GSoC_2011/NewExplorer/base/shell/explorer-new/explorer.c [iso-8859-1] (original) +++ branches/GSoC_2011/NewExplorer/base/shell/explorer-new/explorer.c [iso-8859-1] Tue May 24 14:04:50 2011 @@ -350,6 +350,19 @@ return bRet; } +static void HideMinimizedWindows(BOOL hide) +{ + MINIMIZEDMETRICS mm; + mm.cbSize = sizeof(MINIMIZEDMETRICS); + SystemParametersInfo(SPI_GETMINIMIZEDMETRICS, sizeof(MINIMIZEDMETRICS), &mm, FALSE); + if(hide) + mm.iArrange |= ARW_HIDE; + else + mm.iArrange &= ~ARW_HIDE; + SystemParametersInfo(SPI_SETMINIMIZEDMETRICS, sizeof(MINIMIZEDMETRICS), &mm, FALSE); +} + + INT WINAPI _tWinMain(IN HINSTANCE hInstance, IN HINSTANCE hPrevInstance, @@ -395,7 +408,10 @@ Tray = CreateTrayWindow(); if (Tray != NULL) + { hShellDesktop = DesktopCreateWindow(Tray); + HideMinimizedWindows(TRUE); + } } /* WinXP: Notify msgina to hide the welcome screen */
13 years, 7 months
1
0
0
0
[janderwald] 51883: [USBOHCI] - Enable global power mode - Wait untill reset is complete - Clear reset complete bit when reset is done - Enable port - Reset port now works - USBOHCI still hangs aft...
by janderwald@svn.reactos.org
Author: janderwald Date: Tue May 24 12:51:03 2011 New Revision: 51883 URL:
http://svn.reactos.org/svn/reactos?rev=51883&view=rev
Log: [USBOHCI] - Enable global power mode - Wait untill reset is complete - Clear reset complete bit when reset is done - Enable port - Reset port now works - USBOHCI still hangs after adding first control request, needs more investigation Modified: branches/usb-bringup/drivers/usb/usbohci/hardware.cpp branches/usb-bringup/drivers/usb/usbohci/hardware.h branches/usb-bringup/drivers/usb/usbohci/hub_controller.cpp Modified: branches/usb-bringup/drivers/usb/usbohci/hardware.cpp URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup/drivers/usb/usbohci…
============================================================================== --- branches/usb-bringup/drivers/usb/usbohci/hardware.cpp [iso-8859-1] (original) +++ branches/usb-bringup/drivers/usb/usbohci/hardware.cpp [iso-8859-1] Tue May 24 12:51:03 2011 @@ -489,7 +489,7 @@ NTSTATUS CUSBHardwareDevice::StartController(void) { - ULONG Control, NumberOfPorts, Index, Descriptor; + ULONG Control, NumberOfPorts, Index, Descriptor, FrameInterval, Periodic, IntervalValue; // // first write address of HCCA @@ -540,6 +540,48 @@ // assert that the controller has been started // ASSERT((Control & OHCI_HC_FUNCTIONAL_STATE_MASK) == OHCI_HC_FUNCTIONAL_STATE_OPERATIONAL); + + // + // get frame interval + // + //FrameInterval = (READ_REGISTER_ULONG((PULONG)((PUCHAR)m_Base + OHCI_FRAME_INTERVAL_OFFSET)) & OHCI_FRAME_INTERVAL_TOGGLE) ^ OHCI_FRAME_INTERVAL_TOGGLE; + //FrameInterval |= OHCI_FSMPS(IntervalValue) | IntervalValue; + + // + // write frame interval + // + //WRITE_REGISTER_ULONG((PULONG)((PUCHAR)m_Base + OHCI_FRAME_INTERVAL_OFFSET), FrameInterval); + // 90% periodic + //Periodic = OHCI_PERIODIC(intervalValue); + WRITE_REGISTER_ULONG((PULONG)((PUCHAR)m_Base + 0x40 /*OHCI_PERIODIC_START_OFFSET*/), 0x3E67); + + + // + // read descriptor + // + Descriptor = READ_REGISTER_ULONG((PULONG)((PUCHAR)m_Base + OHCI_RH_DESCRIPTOR_A_OFFSET)); + + // + // no over current protection + // + WRITE_REGISTER_ULONG((PULONG)((PUCHAR)m_Base + OHCI_RH_DESCRIPTOR_A_OFFSET), Descriptor | OHCI_RH_NO_OVER_CURRENT_PROTECTION); + + // + // enable power on all ports + // + WRITE_REGISTER_ULONG((PULONG)((PUCHAR)m_Base + OHCI_RH_STATUS_OFFSET), OHCI_RH_LOCAL_POWER_STATUS_CHANGE); + + // + // wait a bit + // + KeStallExecutionProcessor(10); + + // + // write descriptor + // + WRITE_REGISTER_ULONG((PULONG)((PUCHAR)m_Base + OHCI_RH_DESCRIPTOR_A_OFFSET), Descriptor); + + // // retrieve number of ports @@ -913,19 +955,11 @@ if (PortId > m_NumberOfPorts) return STATUS_UNSUCCESSFUL; - // - // read port status - // Value = READ_REGISTER_ULONG((PULONG)((PUCHAR)m_Base + OHCI_RH_PORT_STATUS(PortId))); KeStallExecutionProcessor(100); if (Status == C_PORT_RESET) { - // - // complete reset - // - WRITE_REGISTER_ULONG((PULONG)((PUCHAR)m_Base + OHCI_RH_PORT_STATUS(PortId)), OHCI_RH_PORTSTATUS_PRSC); - do { // @@ -945,16 +979,45 @@ // wait a bit // KeStallExecutionProcessor(100); - DPRINT1("Wait...\n"); - - }while(Index++ < 10); - - if ((Value & OHCI_RH_PORTSTATUS_PRS)) + + //DPRINT1("Value %x Index %lu\n", Value, Index); + + }while(TRUE); + + // + // check if reset bit is still set + // + if (Value & OHCI_RH_PORTSTATUS_PRS) { - DPRINT1("Failed to reset\n"); + // + // reset failed + // + DPRINT1("PortId %lu Reset failed\n", PortId); + return STATUS_UNSUCCESSFUL; } // + // sanity checks + // + ASSERT((Value & OHCI_RH_PORTSTATUS_PRS) == 0); + ASSERT((Value & OHCI_RH_PORTSTATUS_PRSC)); + + // + // clear reset bit complete + // + WRITE_REGISTER_ULONG((PULONG)((PUCHAR)m_Base + OHCI_RH_PORT_STATUS(PortId)), OHCI_RH_PORTSTATUS_PRSC); + + // + // read status register + // + Value = READ_REGISTER_ULONG((PULONG)((PUCHAR)m_Base + OHCI_RH_PORT_STATUS(PortId))); + + // + // reset complete bit should be cleared + // + ASSERT((Value & OHCI_RH_PORTSTATUS_PRSC) == 0); + + // // update port status // m_PortStatus[PortId].PortChange &= ~USB_PORT_STATUS_RESET; @@ -964,13 +1027,15 @@ // ASSERT((Value & OHCI_RH_PORTSTATUS_PES)); - if (Value & OHCI_RH_PORTSTATUS_PES) - { - // - // port is enabled - // - m_PortStatus[PortId].PortStatus |= USB_PORT_STATUS_ENABLE; - } + // + // port is enabled + // + m_PortStatus[PortId].PortStatus |= USB_PORT_STATUS_ENABLE; + + // + // re-enable root hub change + // + WRITE_REGISTER_ULONG((PULONG)((PUCHAR)m_Base + OHCI_INTERRUPT_ENABLE_OFFSET), OHCI_ROOT_HUB_STATUS_CHANGE); } if (Status == C_PORT_CONNECTION) @@ -1275,6 +1340,12 @@ // device connected // DPRINT1("New device arrival at Port %d LowSpeed %x\n", Index, (PortStatus & OHCI_RH_PORTSTATUS_LSDA)); + + // + // enable port + // + WRITE_REGISTER_ULONG((PULONG)((PUCHAR)This->m_Base + OHCI_RH_PORT_STATUS(Index)), OHCI_RH_PORTSTATUS_PES); + // // store change Modified: branches/usb-bringup/drivers/usb/usbohci/hardware.h URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup/drivers/usb/usbohci…
============================================================================== --- branches/usb-bringup/drivers/usb/usbohci/hardware.h [iso-8859-1] (original) +++ branches/usb-bringup/drivers/usb/usbohci/hardware.h [iso-8859-1] Tue May 24 12:51:03 2011 @@ -100,7 +100,7 @@ // // Root Hub status register (section 7.4.3) // -#define OHCI_RH_STATUS 0x50 +#define OHCI_RH_STATUS_OFFSET 0x50 #define OHCI_RH_LOCAL_POWER_STATUS 0x00000001 #define OHCI_RH_OVER_CURRENT_INDICATOR 0x00000002 #define OHCI_RH_DEVICE_REMOTE_WAKEUP_ENABLE 0x00008000 Modified: branches/usb-bringup/drivers/usb/usbohci/hub_controller.cpp URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup/drivers/usb/usbohci…
============================================================================== --- branches/usb-bringup/drivers/usb/usbohci/hub_controller.cpp [iso-8859-1] (original) +++ branches/usb-bringup/drivers/usb/usbohci/hub_controller.cpp [iso-8859-1] Tue May 24 12:51:03 2011 @@ -922,9 +922,9 @@ case PORT_ENABLE: { // - // port enable is a no-op for OHCI - // - Status = STATUS_SUCCESS; + // port enable + // + Status = m_Hardware->SetPortFeature(PortId, PORT_ENABLE); break; }
13 years, 7 months
1
0
0
0
[nyadav] 51882: Fix a Deadlock
by nyadav@svn.reactos.org
Author: nyadav Date: Tue May 24 12:13:43 2011 New Revision: 51882 URL:
http://svn.reactos.org/svn/reactos?rev=51882&view=rev
Log: Fix a Deadlock Modified: branches/nyadav-audio-branch/base/services/audiosrv2/audiosrv.c Modified: branches/nyadav-audio-branch/base/services/audiosrv2/audiosrv.c URL:
http://svn.reactos.org/svn/reactos/branches/nyadav-audio-branch/base/servic…
============================================================================== --- branches/nyadav-audio-branch/base/services/audiosrv2/audiosrv.c [iso-8859-1] (original) +++ branches/nyadav-audio-branch/base/services/audiosrv2/audiosrv.c [iso-8859-1] Tue May 24 12:13:43 2011 @@ -269,7 +269,7 @@ MixerEngine * mixer = (MixerEngine *) param; while(1) { - while(WaitForSingleObject(mixer->EventPool[0],100)!=0){if(mixer->dead)goto DEAD;} + while(WaitForSingleObject(mixer->EventPool[1],100)!=0){if(mixer->dead)goto DEAD;} Playbuffer(mixer); SetEvent(mixer->EventPool[0]); }
13 years, 7 months
1
0
0
0
← Newer
1
...
12
13
14
15
16
17
18
...
52
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
Results per page:
10
25
50
100
200