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
December 2012
----- 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
12 participants
287 discussions
Start a n
N
ew thread
[hbelusca] 57802: Well, "Types".
by hbelusca@svn.reactos.org
Author: hbelusca Date: Tue Dec 4 23:04:54 2012 New Revision: 57802 URL:
http://svn.reactos.org/svn/reactos?rev=57802&view=rev
Log: Well, "Types". Modified: branches/ros-csrss/include/reactos/subsys/csr/csrsrv.h Modified: branches/ros-csrss/include/reactos/subsys/csr/csrsrv.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/include/reactos/subsy…
============================================================================== --- branches/ros-csrss/include/reactos/subsys/csr/csrsrv.h [iso-8859-1] (original) +++ branches/ros-csrss/include/reactos/subsys/csr/csrsrv.h [iso-8859-1] Tue Dec 4 23:04:54 2012 @@ -22,7 +22,7 @@ #include "csrmsg.h" -/* STRUCTURES *****************************************************************/ +/* TYPES **********************************************************************/ // Used in ntdll/csr/connect.c #define CSR_CSRSS_SECTION_SIZE 65536
12 years
1
0
0
0
[hbelusca] 57801: [CSRSRV] - Correct a misspelling 'CsrThreadAltertable' -> 'CsrThreadAlertable'. - Introduce CSR_REPLY_CODEs instead of using hardcoded values, and use them with CSR_API_ROUTINE-ty...
by hbelusca@svn.reactos.org
Author: hbelusca Date: Tue Dec 4 23:01:54 2012 New Revision: 57801 URL:
http://svn.reactos.org/svn/reactos?rev=57801&view=rev
Log: [CSRSRV] - Correct a misspelling 'CsrThreadAltertable' -> 'CsrThreadAlertable'. - Introduce CSR_REPLY_CODEs instead of using hardcoded values, and use them with CSR_API_ROUTINE-type functions. They correspond to which decision CSRSRV should take after a server function is called: answer to the client or not, and perform according tasks. [BASESRV] Use CSR_REPLY_CODEs. Modified: branches/ros-csrss/include/reactos/subsys/csr/csrsrv.h branches/ros-csrss/subsystems/win/basesrv/server.c branches/ros-csrss/subsystems/win32/csrsrv/api.c branches/ros-csrss/subsystems/win32/csrsrv/server.c Modified: branches/ros-csrss/include/reactos/subsys/csr/csrsrv.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/include/reactos/subsy…
============================================================================== --- branches/ros-csrss/include/reactos/subsys/csr/csrsrv.h [iso-8859-1] (original) +++ branches/ros-csrss/include/reactos/subsys/csr/csrsrv.h [iso-8859-1] Tue Dec 4 23:01:54 2012 @@ -21,7 +21,8 @@ #include "csrmsg.h" -/* TYPES **********************************************************************/ + +/* STRUCTURES *****************************************************************/ // Used in ntdll/csr/connect.c #define CSR_CSRSS_SECTION_SIZE 65536 @@ -102,7 +103,7 @@ typedef enum _CSR_THREAD_FLAGS { - CsrThreadAltertable = 0x1, + CsrThreadAlertable = 0x1, CsrThreadInTermination = 0x2, CsrThreadTerminated = 0x4, CsrThreadIsServerThread = 0x10 @@ -127,6 +128,16 @@ CsrDebugProcessChildren = 2 } CSR_PROCESS_DEBUG_FLAGS, *PCSR_PROCESS_DEBUG_FLAGS; +typedef enum _CSR_REPLY_CODE +{ + CsrReplyImmediately = 0, + CsrReplyPending = 1, + CsrReplyDeadClient = 2, + CsrReplyAlreadyDone = 3 +} CSR_REPLY_CODE, *PCSR_REPLY_CODE; + + +/* FUNCTION TYPES AND STRUCTURES **********************************************/ /* * Wait block @@ -162,13 +173,12 @@ NTSTATUS (NTAPI *PCSR_API_ROUTINE)( IN OUT PCSR_API_MESSAGE ApiMessage, - OUT PULONG Reply + IN OUT PCSR_REPLY_CODE ReplyCode OPTIONAL ); #define CSR_API(n) \ NTSTATUS NTAPI n(IN OUT PCSR_API_MESSAGE ApiMessage, \ - OUT PULONG Reply) - // IN OUT PCSR_REPLY_STATUS ReplyStatus) + IN OUT PCSR_REPLY_CODE ReplyCode OPTIONAL) typedef NTSTATUS @@ -228,8 +238,6 @@ } CSR_SERVER_DLL, *PCSR_SERVER_DLL; -/* FUNCTION TYPES *************************************************************/ - typedef NTSTATUS (NTAPI *PCSR_SERVER_DLL_INIT_CALLBACK)(IN PCSR_SERVER_DLL LoadedServerDll); Modified: branches/ros-csrss/subsystems/win/basesrv/server.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/subsystems/win/basesr…
============================================================================== --- branches/ros-csrss/subsystems/win/basesrv/server.c [iso-8859-1] (original) +++ branches/ros-csrss/subsystems/win/basesrv/server.c [iso-8859-1] Tue Dec 4 23:01:54 2012 @@ -94,6 +94,10 @@ if (Status == STATUS_THREAD_IS_TERMINATING) { DPRINT1("Thread already dead\n"); + + /* Set the special reply value so we don't reply this message back */ + *ReplyCode = CsrReplyDeadClient; + return Status; } @@ -189,7 +193,7 @@ ASSERT(CsrThread != NULL); /* Set the special reply value so we don't reply this message back */ - *Reply = 2; + *ReplyCode = CsrReplyDeadClient; /* Remove the CSR_THREADs and CSR_PROCESS */ return CsrDestroyProcess(&CsrThread->ClientId, Modified: branches/ros-csrss/subsystems/win32/csrsrv/api.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/subsystems/win32/csrs…
============================================================================== --- branches/ros-csrss/subsystems/win32/csrsrv/api.c [iso-8859-1] (original) +++ branches/ros-csrss/subsystems/win32/csrsrv/api.c [iso-8859-1] Tue Dec 4 23:01:54 2012 @@ -52,8 +52,7 @@ ULONG ServerId; PCSR_SERVER_DLL ServerDll; ULONG ApiId; - ULONG Reply; - NTSTATUS Status; + CSR_REPLY_CODE ReplyCode = CsrReplyImmediately; /* Get the Server ID */ ServerId = CSR_API_NUMBER_TO_SERVER_ID(ReceiveMsg->ApiNumber); @@ -97,12 +96,8 @@ /* Validation complete, start SEH */ _SEH2_TRY { - /* Call the API and get the result */ - /// CsrApiCallHandler(ReplyMsg, /*ProcessData*/ &ReplyCode); /// - Status = (ServerDll->DispatchTable[ApiId])(ReceiveMsg, &Reply); - - /* Return the result, no matter what it is */ - ReplyMsg->Status = Status; + /* Call the API, get the reply code and return the result */ + ReplyMsg->Status = ServerDll->DispatchTable[ApiId](ReceiveMsg, &ReplyCode); } _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) { @@ -350,6 +345,7 @@ LARGE_INTEGER TimeOut; PCSR_THREAD CurrentThread, CsrThread; NTSTATUS Status; + CSR_REPLY_CODE ReplyCode; PCSR_API_MESSAGE ReplyMsg; CSR_API_MESSAGE ReceiveMsg; PCSR_PROCESS CsrProcess; @@ -358,7 +354,7 @@ PCSR_SERVER_DLL ServerDll; PCLIENT_DIED_MSG ClientDiedMsg; PDBGKM_MSG DebugMessage; - ULONG ServerId, ApiId, Reply, MessageType, i; + ULONG ServerId, ApiId, MessageType, i; HANDLE ReplyPort; /* Setup LPC loop port and message */ @@ -453,8 +449,9 @@ { /* Handle the Connection Request */ CsrApiHandleConnectionRequest(&ReceiveMsg); + + ReplyMsg = NULL; ReplyPort = CsrApiPort; - ReplyMsg = NULL; continue; } @@ -550,8 +547,9 @@ DPRINT1("CSRSS: %lx is invalid ServerDllIndex (%08x)\n", ServerId, ServerDll); DbgBreakPoint(); + + ReplyMsg = NULL; ReplyPort = CsrApiPort; - ReplyMsg = NULL; continue; } @@ -565,6 +563,7 @@ DPRINT1("CSRSS: %lx is invalid ApiTableIndex for %Z\n", CSR_API_NUMBER_TO_API_ID(ReceiveMsg.ApiNumber), &ServerDll->Name); + ReplyPort = CsrApiPort; ReplyMsg = NULL; continue; @@ -589,10 +588,10 @@ /* Make sure we have enough threads */ CsrpCheckRequestThreads(); - /* Call the API and get the result */ + /* Call the API and get the reply code */ ReplyMsg = NULL; ReplyPort = CsrApiPort; - ServerDll->DispatchTable[ApiId](&ReceiveMsg, &Reply); + ServerDll->DispatchTable[ApiId](&ReceiveMsg, &ReplyCode); /* Increase the static thread count */ _InterlockedIncrement(&CsrpStaticThreadCount); @@ -644,6 +643,7 @@ /* Release the lock and keep looping */ CsrReleaseProcessLock(); + ReplyMsg = NULL; ReplyPort = CsrApiPort; continue; @@ -807,36 +807,40 @@ Teb->CsrClientThread = CsrThread; - /* Call the API and get the result */ - Reply = 0; - ServerDll->DispatchTable[ApiId](&ReceiveMsg, &Reply); + /* Call the API, get the reply code and return the result */ + ReplyCode = CsrReplyImmediately; + ReplyMsg->Status = ServerDll->DispatchTable[ApiId](&ReceiveMsg, &ReplyCode); /* Increase the static thread count */ _InterlockedIncrement(&CsrpStaticThreadCount); Teb->CsrClientThread = CurrentThread; - if (Reply == 3) - { + if (ReplyCode == CsrReplyAlreadyDone) + { + if (ReceiveMsg.CsrCaptureData) + { + CsrReleaseCapturedArguments(&ReceiveMsg); + } ReplyMsg = NULL; - if (ReceiveMsg.CsrCaptureData) - { - CsrReleaseCapturedArguments(&ReceiveMsg); - } + ReplyPort = CsrApiPort; CsrDereferenceThread(CsrThread); + } + else if (ReplyCode == CsrReplyDeadClient) + { + /* Reply to the death message */ + NtReplyPort(ReplyPort, &ReplyMsg->Header); + + /* Reply back to the API port now */ + ReplyMsg = NULL; ReplyPort = CsrApiPort; - } - else if (Reply == 2) - { - NtReplyPort(ReplyPort, &ReplyMsg->Header); + + CsrDereferenceThread(CsrThread); + } + else if (ReplyCode == CsrReplyPending) + { + ReplyMsg = NULL; ReplyPort = CsrApiPort; - ReplyMsg = NULL; - CsrDereferenceThread(CsrThread); - } - else if (Reply == 1) - { - ReplyPort = CsrApiPort; - ReplyMsg = NULL; } else { Modified: branches/ros-csrss/subsystems/win32/csrsrv/server.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/subsystems/win32/csrs…
============================================================================== --- branches/ros-csrss/subsystems/win32/csrsrv/server.c [iso-8859-1] (original) +++ branches/ros-csrss/subsystems/win32/csrsrv/server.c [iso-8859-1] Tue Dec 4 23:01:54 2012 @@ -253,7 +253,7 @@ * @param ApiMessage * Pointer to the CSR API Message for this request. * - * @param Reply + * @param ReplyCode * Optional reply to this request. * * @return STATUS_SUCCESS in case of success, STATUS_INVALID_PARAMETER @@ -262,10 +262,7 @@ * @remarks None. * *--*/ -NTSTATUS -NTAPI -CsrSrvClientConnect(IN OUT PCSR_API_MESSAGE ApiMessage, - IN OUT PULONG Reply OPTIONAL) +CSR_API(CsrSrvClientConnect) { NTSTATUS Status; PCSR_CLIENT_CONNECT ClientConnect = &ApiMessage->Data.CsrClientConnect; @@ -273,7 +270,7 @@ PCSR_PROCESS CurrentProcess = CsrGetClientThread()->Process; /* Set default reply */ - *Reply = 0; + *ReplyCode = CsrReplyImmediately; /* Validate the ServerID */ if (ClientConnect->ServerId >= CSR_SERVER_DLL_MAX) @@ -498,7 +495,7 @@ * @param ApiMessage * Pointer to the CSR API Message for this request. * - * @param Reply + * @param ReplyCode * Pointer to an optional reply to this request. * * @return STATUS_SUCCESS. @@ -506,15 +503,12 @@ * @remarks None. * *--*/ -NTSTATUS -NTAPI -CsrSrvIdentifyAlertableThread(IN OUT PCSR_API_MESSAGE ApiMessage, - IN OUT PULONG Reply) +CSR_API(CsrSrvIdentifyAlertableThread) { PCSR_THREAD CsrThread = CsrGetClientThread(); /* Set the alertable flag */ - CsrThread->Flags |= CsrThreadAltertable; + CsrThread->Flags |= CsrThreadAlertable; /* Return success */ return STATUS_SUCCESS; @@ -529,7 +523,7 @@ * @param ApiMessage * Pointer to the CSR API Message for this request. * - * @param Reply + * @param ReplyCode * Pointer to an optional reply to this request. * * @return STATUS_SUCCESS. @@ -537,10 +531,7 @@ * @remarks None. * *--*/ -NTSTATUS -NTAPI -CsrSrvSetPriorityClass(IN OUT PCSR_API_MESSAGE ApiMessage, - IN OUT PULONG Reply) +CSR_API(CsrSrvSetPriorityClass) { /* Deprecated */ return STATUS_SUCCESS; @@ -557,7 +548,7 @@ * @param ApiMessage * Pointer to the CSR API Message for this request. * - * @param Reply + * @param ReplyCode * Pointer to an optional reply to this request. * * @return STATUS_INVALID_PARAMETER. @@ -566,10 +557,7 @@ * return success. * *--*/ -NTSTATUS -NTAPI -CsrSrvUnusedFunction(IN OUT PCSR_API_MESSAGE ApiMessage, - IN OUT PULONG Reply) +CSR_API(CsrSrvUnusedFunction) { /* Deprecated */ return STATUS_INVALID_PARAMETER;
12 years
1
0
0
0
[janderwald] 57800: [USBD] - Add missing exports
by janderwald@svn.reactos.org
Author: janderwald Date: Tue Dec 4 19:48:51 2012 New Revision: 57800 URL:
http://svn.reactos.org/svn/reactos?rev=57800&view=rev
Log: [USBD] - Add missing exports Modified: trunk/reactos/drivers/usb/usbd/usbd.spec Modified: trunk/reactos/drivers/usb/usbd/usbd.spec URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/usbd/usbd.spec…
============================================================================== --- trunk/reactos/drivers/usb/usbd/usbd.spec [iso-8859-1] (original) +++ trunk/reactos/drivers/usb/usbd/usbd.spec [iso-8859-1] Tue Dec 4 19:48:51 2012 @@ -2,10 +2,12 @@ @ stdcall USBD_Debug_RetHeap(ptr long long) @ stdcall USBD_Debug_LogEntry(ptr ptr ptr ptr) @ stdcall USBD_CalculateUsbBandwidth(long long long) +@ stdcall _USBD_CreateConfigurationRequestEx@8(ptr ptr) USBD_CreateConfigurationRequestEx @ stdcall USBD_CreateConfigurationRequestEx(ptr ptr) @ stdcall USBD_CreateConfigurationRequest(ptr ptr) @ stdcall USBD_GetInterfaceLength(ptr ptr) @ stdcall USBD_ParseConfigurationDescriptor(ptr long long) +@ stdcall _USBD_ParseConfigurationDescriptorEx@28(ptr ptr long long long long long) USBD_ParseConfigurationDescriptorEx @ stdcall USBD_ParseConfigurationDescriptorEx(ptr ptr long long long long long) @ stdcall USBD_ParseDescriptors(ptr long ptr long) @ stdcall USBD_GetPdoRegistryParameter(ptr ptr long ptr long)
12 years
1
0
0
0
[janderwald] 57799: [USBHUB] - Handle devices which provide indicate a serial number but not provide one - Fixes device installation initialization for F5D8053 N Wireless USB Adapter
by janderwald@svn.reactos.org
Author: janderwald Date: Tue Dec 4 19:20:12 2012 New Revision: 57799 URL:
http://svn.reactos.org/svn/reactos?rev=57799&view=rev
Log: [USBHUB] - Handle devices which provide indicate a serial number but not provide one - Fixes device installation initialization for F5D8053 N Wireless USB Adapter Modified: trunk/reactos/drivers/usb/usbhub/fdo.c Modified: trunk/reactos/drivers/usb/usbhub/fdo.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/usbhub/fdo.c?r…
============================================================================== --- trunk/reactos/drivers/usb/usbhub/fdo.c [iso-8859-1] (original) +++ trunk/reactos/drivers/usb/usbhub/fdo.c [iso-8859-1] Tue Dec 4 19:20:12 2012 @@ -1022,54 +1022,49 @@ 0, (PVOID*)&SerialBuffer, &UsbChildExtension->usInstanceId.Length); - if (!NT_SUCCESS(Status)) - { - DPRINT1("USBHUB: GetUsbStringDescriptor failed with status %x\n", Status); + if (NT_SUCCESS(Status)) + { + // construct instance id buffer + Index = swprintf(Buffer, L"%04d&%s", HubDeviceExtension->InstanceCount, SerialBuffer) + 1; + UsbChildExtension->usInstanceId.Buffer = (LPWSTR)ExAllocatePool(NonPagedPool, Index * sizeof(WCHAR)); + if (UsbChildExtension->usInstanceId.Buffer == NULL) + { + DPRINT1("Error: failed to allocate %lu bytes\n", Index * sizeof(WCHAR)); + return STATUS_INSUFFICIENT_RESOURCES; + } + + // + // copy instance id + // + RtlCopyMemory(UsbChildExtension->usInstanceId.Buffer, Buffer, Index * sizeof(WCHAR)); + UsbChildExtension->usInstanceId.Length = UsbChildExtension->usInstanceId.MaximumLength = Index * sizeof(WCHAR); + ExFreePool(SerialBuffer); + + DPRINT("Usb InstanceId %wZ InstanceCount %x\n", &UsbChildExtension->usInstanceId, HubDeviceExtension->InstanceCount); return Status; } - - // construct instance id buffer - Index = swprintf(Buffer, L"%04d&%s", HubDeviceExtension->InstanceCount, SerialBuffer) + 1; - UsbChildExtension->usInstanceId.Buffer = (LPWSTR)ExAllocatePool(NonPagedPool, Index * sizeof(WCHAR)); - if (UsbChildExtension->usInstanceId.Buffer == NULL) - { - DPRINT1("Error: failed to allocate %lu bytes\n", Index * sizeof(WCHAR)); - Status = STATUS_INSUFFICIENT_RESOURCES; - return Status; - } - - // - // copy instance id - // - RtlCopyMemory(UsbChildExtension->usInstanceId.Buffer, Buffer, Index * sizeof(WCHAR)); - UsbChildExtension->usInstanceId.Length = UsbChildExtension->usInstanceId.MaximumLength = Index * sizeof(WCHAR); - ExFreePool(SerialBuffer); - - DPRINT("Usb InstanceId %wZ InstanceCount %x\n", &UsbChildExtension->usInstanceId, HubDeviceExtension->InstanceCount); - } - else - { - // - // the device did not provide a serial number, lets create a pseudo instance id - // - Index = swprintf(Buffer, L"%04d&%04d", HubDeviceExtension->InstanceCount, UsbChildExtension->PortNumber) + 1; - UsbChildExtension->usInstanceId.Buffer = (LPWSTR)ExAllocatePool(NonPagedPool, Index * sizeof(WCHAR)); - if (UsbChildExtension->usInstanceId.Buffer == NULL) - { - DPRINT1("Error: failed to allocate %lu bytes\n", Index * sizeof(WCHAR)); - Status = STATUS_INSUFFICIENT_RESOURCES; - return Status; - } - - // - // copy instance id - // - RtlCopyMemory(UsbChildExtension->usInstanceId.Buffer, Buffer, Index * sizeof(WCHAR)); - UsbChildExtension->usInstanceId.Length = UsbChildExtension->usInstanceId.MaximumLength = Index * sizeof(WCHAR); - - DPRINT("usDeviceId %wZ\n", &UsbChildExtension->usInstanceId); - } - + } + + // + // the device did not provide a serial number, or failed to retrieve the serial number + // lets create a pseudo instance id + // + Index = swprintf(Buffer, L"%04d&%04d", HubDeviceExtension->InstanceCount, UsbChildExtension->PortNumber) + 1; + UsbChildExtension->usInstanceId.Buffer = (LPWSTR)ExAllocatePool(NonPagedPool, Index * sizeof(WCHAR)); + if (UsbChildExtension->usInstanceId.Buffer == NULL) + { + DPRINT1("Error: failed to allocate %lu bytes\n", Index * sizeof(WCHAR)); + Status = STATUS_INSUFFICIENT_RESOURCES; + return Status; + } + + // + // copy instance id + // + RtlCopyMemory(UsbChildExtension->usInstanceId.Buffer, Buffer, Index * sizeof(WCHAR)); + UsbChildExtension->usInstanceId.Length = UsbChildExtension->usInstanceId.MaximumLength = Index * sizeof(WCHAR); + + DPRINT("usDeviceId %wZ\n", &UsbChildExtension->usInstanceId); return STATUS_SUCCESS; }
12 years
1
0
0
0
[jgardou] 57798: [NTOSKRNL/fsrtl] - Remove the right element from the list when uninitializing a file lock - Do not modify the content of the table range while looping on its elements - Fix rebuild...
by jgardou@svn.reactos.org
Author: jgardou Date: Tue Dec 4 12:09:59 2012 New Revision: 57798 URL:
http://svn.reactos.org/svn/reactos?rev=57798&view=rev
Log: [NTOSKRNL/fsrtl] - Remove the right element from the list when uninitializing a file lock - Do not modify the content of the table range while looping on its elements - Fix rebuilding the table when unlocking a shared range Thanks go to Pierre for the hint for where to look at CORE-6615 #comment fixed by r57798 #resolve CIRE-6535 #comment fixed by r55798 #resolve Modified: trunk/reactos/ntoskrnl/fsrtl/filelock.c Modified: trunk/reactos/ntoskrnl/fsrtl/filelock.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/fsrtl/filelock.c?…
============================================================================== --- trunk/reactos/ntoskrnl/fsrtl/filelock.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/fsrtl/filelock.c [iso-8859-1] Tue Dec 4 12:09:59 2012 @@ -514,33 +514,30 @@ } return FALSE; } - else - { - DPRINT("Overlapping shared lock %wZ %08x%08x %08x%08x\n", - &FileObject->FileName, - Conflict->Exclusive.FileLock.StartingByte.HighPart, - Conflict->Exclusive.FileLock.StartingByte.LowPart, - Conflict->Exclusive.FileLock.EndingByte.HighPart, - Conflict->Exclusive.FileLock.EndingByte.LowPart); - Conflict = FsRtlpRebuildSharedLockRange(FileLock, - LockInfo, - &ToInsert); - if (!Conflict) - { - IoStatus->Status = STATUS_NO_MEMORY; - if (Irp) - { - FsRtlCompleteLockIrpReal - (FileLock->CompleteLockIrpRoutine, - Context, - Irp, - IoStatus->Status, - &Status, - FileObject); - } - break; - } - } + } + } + + DPRINT("Overlapping shared lock %wZ %08x%08x %08x%08x\n", + &FileObject->FileName, + Conflict->Exclusive.FileLock.StartingByte.HighPart, + Conflict->Exclusive.FileLock.StartingByte.LowPart, + Conflict->Exclusive.FileLock.EndingByte.HighPart, + Conflict->Exclusive.FileLock.EndingByte.LowPart); + Conflict = FsRtlpRebuildSharedLockRange(FileLock, + LockInfo, + &ToInsert); + if (!Conflict) + { + IoStatus->Status = STATUS_NO_MEMORY; + if (Irp) + { + FsRtlCompleteLockIrpReal + (FileLock->CompleteLockIrpRoutine, + Context, + Irp, + IoStatus->Status, + &Status, + FileObject); } } @@ -567,8 +564,8 @@ return FALSE; } DPRINT("Adding shared lock %wZ\n", &FileObject->FileName); - NewSharedRange->Start = ToInsert.Exclusive.FileLock.StartingByte; - NewSharedRange->End = ToInsert.Exclusive.FileLock.EndingByte; + NewSharedRange->Start = *FileOffset; + NewSharedRange->End.QuadPart = FileOffset->QuadPart + Length->QuadPart; NewSharedRange->Key = Key; NewSharedRange->ProcessId = ToInsert.Exclusive.FileLock.ProcessId; InsertTailList(&LockInfo->SharedLocks, &NewSharedRange->Entry); @@ -639,10 +636,10 @@ return FALSE; } DPRINT("Adding shared lock %wZ\n", &FileObject->FileName); - NewSharedRange->Start = ToInsert.Exclusive.FileLock.StartingByte; - NewSharedRange->End = ToInsert.Exclusive.FileLock.EndingByte; + NewSharedRange->Start = *FileOffset; + NewSharedRange->End.QuadPart = FileOffset->QuadPart + Length->QuadPart; NewSharedRange->Key = Key; - NewSharedRange->ProcessId = ToInsert.Exclusive.FileLock.ProcessId; + NewSharedRange->ProcessId = Process->UniqueProcessId; InsertTailList(&LockInfo->SharedLocks, &NewSharedRange->Entry); } @@ -918,12 +915,7 @@ } if (FoundShared) { - PLIST_ENTRY SharedRangeEntry; - PLOCK_SHARED_RANGE WatchSharedRange; - COMBINED_LOCK_ELEMENT RemadeElement; - Find.Exclusive.FileLock.StartingByte = SharedRange->Start; - Find.Exclusive.FileLock.EndingByte = SharedRange->End; - SharedEntry = SharedRange->Entry.Flink; + /* Remove the found range from the shared range lists */ RemoveEntryList(&SharedRange->Entry); ExFreePoolWithTag(SharedRange, 'FSRA'); /* We need to rebuild the list of shared ranges. */ @@ -933,19 +925,25 @@ Entry->Exclusive.FileLock.StartingByte.LowPart, Entry->Exclusive.FileLock.EndingByte.HighPart, Entry->Exclusive.FileLock.EndingByte.LowPart); - /* Copy */ - RemadeElement = *Entry; - RtlDeleteElementGenericTable(&InternalInfo->RangeTable, Entry); + + /* Remember what was in there and remove it from the table */ + Find = *Entry; + RtlDeleteElementGenericTable(&InternalInfo->RangeTable, &Find); /* Put shared locks back in place */ - for (SharedRangeEntry = InternalInfo->SharedLocks.Flink; - SharedRangeEntry != &InternalInfo->SharedLocks; - SharedRangeEntry = SharedRangeEntry->Flink) + for (SharedEntry = InternalInfo->SharedLocks.Flink; + SharedEntry != &InternalInfo->SharedLocks; + SharedEntry = SharedEntry->Flink) { COMBINED_LOCK_ELEMENT LockElement; - WatchSharedRange = CONTAINING_RECORD(SharedRangeEntry, LOCK_SHARED_RANGE, Entry); - LockElement.Exclusive.FileLock.StartingByte = WatchSharedRange->Start; - LockElement.Exclusive.FileLock.EndingByte = WatchSharedRange->End; - if (LockCompare(&InternalInfo->RangeTable, &RemadeElement, &LockElement) != GenericEqual) + SharedRange = CONTAINING_RECORD(SharedEntry, LOCK_SHARED_RANGE, Entry); + LockElement.Exclusive.FileLock.FileObject = FileObject; + LockElement.Exclusive.FileLock.StartingByte = SharedRange->Start; + LockElement.Exclusive.FileLock.EndingByte = SharedRange->End; + LockElement.Exclusive.FileLock.ProcessId = SharedRange->ProcessId; + LockElement.Exclusive.FileLock.Key = SharedRange->Key; + LockElement.Exclusive.FileLock.ExclusiveLock = FALSE; + + if (LockCompare(&InternalInfo->RangeTable, &Find, &LockElement) != GenericEqual) { DPRINT("Skipping range %08x%08x:%08x%08x\n", LockElement.Exclusive.FileLock.StartingByte.HighPart, @@ -959,10 +957,7 @@ LockElement.Exclusive.FileLock.StartingByte.LowPart, LockElement.Exclusive.FileLock.EndingByte.HighPart, LockElement.Exclusive.FileLock.EndingByte.LowPart); - RtlZeroMemory(&RemadeElement, sizeof(RemadeElement)); - RemadeElement.Exclusive.FileLock.StartingByte = WatchSharedRange->Start; - RemadeElement.Exclusive.FileLock.EndingByte = WatchSharedRange->End; - FsRtlpRebuildSharedLockRange(FileLock, InternalInfo, &RemadeElement); + FsRtlpRebuildSharedLockRange(FileLock, InternalInfo, &LockElement); } } else @@ -970,7 +965,8 @@ return STATUS_RANGE_NOT_LOCKED; } } - + +#ifndef NDEBUG DPRINT("Lock still has:\n"); for (SharedEntry = InternalInfo->SharedLocks.Flink; SharedEntry != &InternalInfo->SharedLocks; @@ -985,6 +981,7 @@ SharedRange->End.LowPart, SharedRange->Key); } +#endif // this is definitely the thing we want InternalInfo->Generation++; @@ -1286,7 +1283,7 @@ { SharedRange = CONTAINING_RECORD(SharedEntry, LOCK_SHARED_RANGE, Entry); SharedEntry = SharedEntry->Flink; - RemoveEntryList(SharedEntry); + RemoveEntryList(&SharedRange->Entry); ExFreePoolWithTag(SharedRange, 'FSRA'); } while ((Entry = RtlGetElementGenericTable(&InternalInfo->RangeTable, 0)) != NULL)
12 years
1
0
0
0
[janderwald] 57797: [LIBUSB] - Remove assert - CORE-6280
by janderwald@svn.reactos.org
Author: janderwald Date: Tue Dec 4 05:38:42 2012 New Revision: 57797 URL:
http://svn.reactos.org/svn/reactos?rev=57797&view=rev
Log: [LIBUSB] - Remove assert - CORE-6280 Modified: trunk/reactos/lib/drivers/libusb/usb_device.cpp Modified: trunk/reactos/lib/drivers/libusb/usb_device.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/drivers/libusb/usb_dev…
============================================================================== --- trunk/reactos/lib/drivers/libusb/usb_device.cpp [iso-8859-1] (original) +++ trunk/reactos/lib/drivers/libusb/usb_device.cpp [iso-8859-1] Tue Dec 4 05:38:42 2012 @@ -387,7 +387,6 @@ if (!NT_SUCCESS(Status)) { DPRINT1("CUSBDevice::SetDeviceAddress> failed to retrieve configuration %lu\n", Index); - ASSERT(FALSE); break; } }
12 years
1
0
0
0
[janderwald] 57796: - Set SurpriseRemovalOK flag when IRP_MN_QUERY_CAPABILITIES was handled successfully - CORE-6447
by janderwald@svn.reactos.org
Author: janderwald Date: Tue Dec 4 05:13:22 2012 New Revision: 57796 URL:
http://svn.reactos.org/svn/reactos?rev=57796&view=rev
Log: - Set SurpriseRemovalOK flag when IRP_MN_QUERY_CAPABILITIES was handled successfully - CORE-6447 Modified: trunk/reactos/drivers/hid/hidusb/hidusb.c Modified: trunk/reactos/drivers/hid/hidusb/hidusb.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/hid/hidusb/hidusb.…
============================================================================== --- trunk/reactos/drivers/hid/hidusb/hidusb.c [iso-8859-1] (original) +++ trunk/reactos/drivers/hid/hidusb/hidusb.c [iso-8859-1] Tue Dec 4 05:13:22 2012 @@ -1686,10 +1686,13 @@ Status = Irp->IoStatus.Status; } - // - // don't need to safely remove - // - IoStack->Parameters.DeviceCapabilities.Capabilities->SurpriseRemovalOK = TRUE; + if (NT_SUCCESS(Status) && IoStack->Parameters.DeviceCapabilities.Capabilities != NULL) + { + // + // don't need to safely remove + // + IoStack->Parameters.DeviceCapabilities.Capabilities->SurpriseRemovalOK = TRUE; + } // // done
12 years
1
0
0
0
[janderwald] 57795: - Add assert for testing - CORE-6676
by janderwald@svn.reactos.org
Author: janderwald Date: Tue Dec 4 04:58:31 2012 New Revision: 57795 URL:
http://svn.reactos.org/svn/reactos?rev=57795&view=rev
Log: - Add assert for testing - CORE-6676 Modified: trunk/reactos/drivers/usb/usbuhci/usb_request.cpp Modified: trunk/reactos/drivers/usb/usbuhci/usb_request.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/usbuhci/usb_re…
============================================================================== --- trunk/reactos/drivers/usb/usbuhci/usb_request.cpp [iso-8859-1] (original) +++ trunk/reactos/drivers/usb/usbuhci/usb_request.cpp [iso-8859-1] Tue Dec 4 04:58:31 2012 @@ -1020,6 +1020,9 @@ { // get buffer base m_Base = MmGetMdlVirtualAddress(m_TransferBufferMDL); + + // sanity check + ASSERT(m_Base != NULL); } // get new buffer offset
12 years
1
0
0
0
[janderwald] 57794: - Do not assert on failed devices - CORE-6794
by janderwald@svn.reactos.org
Author: janderwald Date: Tue Dec 4 04:34:12 2012 New Revision: 57794 URL:
http://svn.reactos.org/svn/reactos?rev=57794&view=rev
Log: - Do not assert on failed devices - CORE-6794 Modified: trunk/reactos/drivers/hid/hidusb/hidusb.c Modified: trunk/reactos/drivers/hid/hidusb/hidusb.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/hid/hidusb/hidusb.…
============================================================================== --- trunk/reactos/drivers/hid/hidusb/hidusb.c [iso-8859-1] (original) +++ trunk/reactos/drivers/hid/hidusb/hidusb.c [iso-8859-1] Tue Dec 4 04:34:12 2012 @@ -1508,18 +1508,20 @@ // select configuration // Status = Hid_SelectConfiguration(DeviceObject); - ASSERT(Status == STATUS_SUCCESS); // // done // DPRINT("[HIDUSB] SelectConfiguration %x\n", Status); - // - // get protocol - // - Hid_GetProtocol(DeviceObject); - return Status; + if (NT_SUCCESS(Status)) + { + // + // get protocol + // + Hid_GetProtocol(DeviceObject); + return Status; + } } //
12 years
1
0
0
0
[pschweitzer] 57793: [FASTFAT] ExFreePool -> ExFreePoolWithTag
by pschweitzer@svn.reactos.org
Author: pschweitzer Date: Mon Dec 3 22:17:51 2012 New Revision: 57793 URL:
http://svn.reactos.org/svn/reactos?rev=57793&view=rev
Log: [FASTFAT] ExFreePool -> ExFreePoolWithTag Modified: trunk/reactos/drivers/filesystems/fastfat/fcb.c Modified: trunk/reactos/drivers/filesystems/fastfat/fcb.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/fastfa…
============================================================================== --- trunk/reactos/drivers/filesystems/fastfat/fcb.c [iso-8859-1] (original) +++ trunk/reactos/drivers/filesystems/fastfat/fcb.c [iso-8859-1] Mon Dec 3 22:17:51 2012 @@ -147,7 +147,7 @@ { if (pCcb->SearchPattern.Buffer) { - ExFreePool(pCcb->SearchPattern.Buffer); + ExFreePoolWithTag(pCcb->SearchPattern.Buffer, TAG_VFAT); } ExFreeToNPagedLookasideList(&VfatGlobalData->CcbLookasideList, pCcb); }
12 years
1
0
0
0
← Newer
1
...
25
26
27
28
29
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
Results per page:
10
25
50
100
200