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
September 2009
----- 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
16 participants
270 discussions
Start a n
N
ew thread
[cfinck] 43036: Rewrite internal raddr2line caller and parser - Use a better algorithm to ensure that our target line is a resolvable backtrace line. - Mimic the output of Kdbg's own address resolver completely. - Use a linked list of all EXE, DLL and SYS files inside "output-i386" instead of looking them up in "reactos.dff". This also lets us resolve addresses in modules not present in "reactos.dff". (e.g. drivers already available at setup) - Use the correct path if ROS_OUTPUT is not set.
by cfinck@svn.reactos.org
Author: cfinck Date: Sun Sep 13 04:19:14 2009 New Revision: 43036 URL:
http://svn.reactos.org/svn/reactos?rev=43036&view=rev
Log: Rewrite internal raddr2line caller and parser - Use a better algorithm to ensure that our target line is a resolvable backtrace line. - Mimic the output of Kdbg's own address resolver completely. - Use a linked list of all EXE, DLL and SYS files inside "output-i386" instead of looking them up in "reactos.dff". This also lets us resolve addresses in modules not present in "reactos.dff". (e.g. drivers already available at setup) - Use the correct path if ROS_OUTPUT is not set. Modified: trunk/tools/sysreg2/console.c trunk/tools/sysreg2/raddr2line.c trunk/tools/sysreg2/sysreg.h trunk/tools/sysreg2/virt.c Modified: trunk/tools/sysreg2/console.c URL:
http://svn.reactos.org/svn/reactos/trunk/tools/sysreg2/console.c?rev=43036&…
============================================================================== --- trunk/tools/sysreg2/console.c [iso-8859-1] (original) +++ trunk/tools/sysreg2/console.c [iso-8859-1] Sun Sep 13 04:19:14 2009 @@ -160,7 +160,7 @@ } /* Output the line, raddr2line the included addresses if necessary */ - if ((KdbgHit == 1) && (ResolveAddressFromFile(Raddr2LineBuffer, BUFFER_SIZE, Buffer))) + if (KdbgHit == 1 && ResolveAddressFromFile(Raddr2LineBuffer, sizeof(Raddr2LineBuffer), Buffer)) printf("%s", Raddr2LineBuffer); else printf("%s", Buffer); Modified: trunk/tools/sysreg2/raddr2line.c URL:
http://svn.reactos.org/svn/reactos/trunk/tools/sysreg2/raddr2line.c?rev=430…
============================================================================== --- trunk/tools/sysreg2/raddr2line.c [iso-8859-1] (original) +++ trunk/tools/sysreg2/raddr2line.c [iso-8859-1] Sun Sep 13 04:19:14 2009 @@ -8,112 +8,182 @@ #include "sysreg.h" -bool GetPackagePath(char* Buffer, int BuffSize, char* Module) +static void RecurseModuleDirectory(const char* Directory, ModuleListEntry** LastElement) { - char* ptr; - FILE* fp; - int i; + char* EntryPath; + char* Period; + DIR* dir; + struct dirent* dp; + struct stat statbuf; - fp = fopen("boot/bootdata/packages/reactos.dff", "r"); - if (fp) + dir = opendir(Directory); + if(!dir) + return; + + while(dp = readdir(dir)) { - while(fgets(Buffer, BuffSize,fp)) + if(*dp->d_name == '.') + continue; + + EntryPath = (char*)malloc(strlen(Directory) + strlen(dp->d_name) + 2); + strcpy(EntryPath, Directory); + strcat(EntryPath, "/"); + strcat(EntryPath, dp->d_name); + + if(stat(EntryPath, &statbuf) == -1) { - if (strstr(Buffer, Module)) + free(EntryPath); + continue; + } + + if(statbuf.st_mode & S_IFDIR) + { + RecurseModuleDirectory(EntryPath, LastElement); + free(EntryPath); + } + else + { + Period = strchr(dp->d_name, '.'); + + /* A file needs to have one of the following extensions to be a valid module */ + if(!Period || (strcasecmp(Period, ".exe") && strcasecmp(Period, ".dll") && strcasecmp(Period, ".sys"))) { - ptr = strchr(Buffer, ' '); - if (ptr) - *ptr = '\0'; + free(EntryPath); + continue; + } - for (i = 0; i < strlen(Buffer); i++) - { - if (Buffer[i] == '\\') - Buffer[i] = '/'; - } - fclose(fp); - return true; - } - } - fclose(fp); - } - return false; -} + (*LastElement)->Next = (ModuleListEntry*)malloc(sizeof(ModuleListEntry)); + *LastElement = (*LastElement)->Next; + (*LastElement)->Next = NULL; -bool ResolveAddressFromFile(char* Buffer, int BuffSize, char* Data) -{ - int Resolved = 0; - char* sep; - char* sep2; - char Module[32]; - char Addr[20]; - char Command[256]; - char PkgData[80]; - char emptystr[] = ""; - - if ((strstr(Data, ":>")) && (!strchr(Data, ')'))) - { - sep = strchr(Data, ':'); - if (sep) - { - strncpy(Module, Data + 1, (int) (sep - Data) - 1); - Module[(int)(sep-Data)-2] = '\0'; - sep2 = strchr(Data, '>'); - strncpy(Addr, Data + (sep - Data + 1), (int) (sep2 - sep) -1); - Addr[(int)(sep2-sep)-1] = '\0'; - Resolved = 1; + (*LastElement)->Module = (char*)malloc(strlen(dp->d_name) + 1); + strcpy((*LastElement)->Module, dp->d_name); + (*LastElement)->Path = EntryPath; } } - sep = strchr(Data, '+'); - if ((sep) && strstr(Data, ":\\")) + closedir(dir); +} + +void InitializeModuleList() +{ + ModuleListEntry* LastElement; + + ModuleList = (ModuleListEntry*)malloc(sizeof(ModuleListEntry)); + ModuleList->Next = NULL; + LastElement = ModuleList; + + RecurseModuleDirectory(OutputPath, &LastElement); +} + +void CleanModuleList() +{ + ModuleListEntry* CurrentElement; + ModuleListEntry* PreviousElement; + + CurrentElement = ModuleList->Next; + + while(CurrentElement) { - sep2 = strchr(Data + (sep - Data), ' '); - strncpy(Addr, Data + (sep - Data + 1), (int) (sep2 - sep) - 1); - Addr[(int)(sep2-sep) - 1] = '\0'; - sep = strrchr(Data, '\\'); - strcpy(Module, sep + 1); - Module[strlen(Module) - 2] = '\0'; - Resolved = 2; + free(CurrentElement->Module); + free(CurrentElement->Path); + + PreviousElement = CurrentElement; + CurrentElement = CurrentElement->Next; + free(PreviousElement); } - if (Resolved > 0) + free(ModuleList); +} + +static ModuleListEntry* FindModule(const char* Module) +{ + ModuleListEntry* CurrentElement; + + CurrentElement = ModuleList->Next; + + while(CurrentElement) { - if (GetPackagePath(PkgData, sizeof(PkgData), Module)) + if(!strcmp(CurrentElement->Module, Module)) + return CurrentElement; + + CurrentElement = CurrentElement->Next; + } + + return NULL; +} + +bool ResolveAddressFromFile(char* Buffer, size_t BufferSize, const char* Data) +{ + bool ReturnValue = false; + char* Address = NULL; + char* AddressStart; + char Command[256]; + char* Module = NULL; + char* pBuffer; + FILE* Process; + ModuleListEntry* ModuleEntry; + size_t AddressLength; + + /* A resolvable backtrace line has to look like this: + <abcdefg.dll:123a> + */ + if(*Data != '<') + return false; + + AddressStart = strchr(Data, ':'); + + if(!AddressStart) + return false; + + ++AddressStart; + AddressLength = strspn(AddressStart, "1234567890abcdefABCDEF"); + + if(!AddressLength || AddressStart[AddressLength] != '>') + return false; + + /* Ok, this looks like a backtrace line we can resolve */ + Module = (char*)malloc(AddressStart - Data - 1); + strncpy(Module, Data + 1, AddressStart - Data - 2); + Module[AddressStart - Data - 2] = 0; + + Address = (char*)malloc(AddressLength + 1); + strncpy(Address, AddressStart, AddressLength); + Address[AddressLength] = 0; + + /* Try to find the path to this module */ + if(ModuleEntry = FindModule(Module)) + { + /* Run raddr2line */ + sprintf(Command, "%s/tools/rsym/raddr2line %s %s 2>/dev/null", OutputPath, ModuleEntry->Path, Address); + Process = popen(Command, "r"); + + if(!feof(Process)) { - const char* outdir = getenv("ROS_OUTPUT"); - char* ptr; - if (!outdir) - outdir = emptystr; - sprintf(Command, "%s/tools/rsym/raddr2line %s/%s %s 2>&1", - outdir, outdir, PkgData, Addr); - FILE* p = popen(Command, "r"); - char buf[100] = {'\0'}; - while(feof(p)==0) + pBuffer = &Buffer[AddressStart - Data + AddressLength]; + strncpy(Buffer, Data, pBuffer - Buffer); + + *pBuffer++ = ' '; + *pBuffer++ = '('; + + if(fgets(pBuffer, BufferSize - (pBuffer - Buffer), Process)) { - fgets(buf,100,p); - if (strstr(buf, "error")) - strcpy(buf, "(no debug info)"); - ptr = strchr(buf, '\n'); - if (ptr) - *ptr = '\0'; - ptr = strchr(Data, '>'); - if (ptr) - *ptr = '\0'; - if (Resolved == 2) - { - ptr = strchr(Data, '\n'); - if (ptr) - *ptr = '\0'; - } - strcpy(Buffer, Data); - strcat(Buffer, " "); - if (Resolved == 2) - strcat(Buffer, "<"); - strcat(Buffer, buf); - strcat(Buffer, ">\n"); - return true; + pBuffer += strlen(pBuffer) - 1; + + *pBuffer++ = ')'; + *pBuffer++ = '>'; + *pBuffer++ = '\n'; + *pBuffer = 0; + + ReturnValue = true; } } + + pclose(Process); } - return false; + + free(Module); + free(Address); + + return ReturnValue; } Modified: trunk/tools/sysreg2/sysreg.h URL:
http://svn.reactos.org/svn/reactos/trunk/tools/sysreg2/sysreg.h?rev=43036&r…
============================================================================== --- trunk/tools/sysreg2/sysreg.h [iso-8859-1] (original) +++ trunk/tools/sysreg2/sysreg.h [iso-8859-1] Sun Sep 13 04:19:14 2009 @@ -6,6 +6,7 @@ * Copyright 2009 Colin Finck <colin(a)reactos.org> */ +#include <dirent.h> #include <fcntl.h> #include <libvirt.h> #include <poll.h> @@ -21,19 +22,24 @@ #include <libxml/tree.h> #include <libxml/xpath.h> #include <libxml/xpathInternals.h> +#include <sys/stat.h> #include <sys/sysinfo.h> +#include <sys/types.h> #define EXIT_CHECKPOINT_REACHED 0 #define EXIT_CONTINUE 1 #define EXIT_DONT_CONTINUE 2 #define NUM_STAGES 3 -typedef struct { +typedef struct _stage +{ char BootDevice[8]; char Checkpoint[80]; -} stage; +} +stage; -typedef struct { +typedef struct _Settings +{ int Timeout; char Filename[255]; char Name[80]; @@ -42,9 +48,16 @@ stage Stage[3]; unsigned int MaxCacheHits; unsigned int MaxRetries; -} Settings; +} +Settings; -Settings AppSettings; +typedef struct _ModuleListEntry +{ + struct _ModuleListEntry* Next; + char* Module; + char* Path; +} +ModuleListEntry; /* utils.c */ char* ReadFile (const char* filename); @@ -58,5 +71,11 @@ int ProcessDebugData(const char* tty, int timeout, int stage); /* raddr2line.c */ -bool GetPackagePath(char* Buffer, int BuffSize, char* Module); -bool ResolveAddressFromFile(char* Buffer, int BuffSize, char* Data); +void InitializeModuleList(); +void CleanModuleList(); +bool ResolveAddressFromFile(char* Buffer, size_t BufferSize, const char* Data); + +/* virt.c */ +extern const char* OutputPath; +extern Settings AppSettings; +extern ModuleListEntry* ModuleList; Modified: trunk/tools/sysreg2/virt.c URL:
http://svn.reactos.org/svn/reactos/trunk/tools/sysreg2/virt.c?rev=43036&r1=…
============================================================================== --- trunk/tools/sysreg2/virt.c [iso-8859-1] (original) +++ trunk/tools/sysreg2/virt.c [iso-8859-1] Sun Sep 13 04:19:14 2009 @@ -7,6 +7,11 @@ */ #include "sysreg.h" + +const char DefaultOutputPath[] = "output-i386"; +const char* OutputPath; +Settings AppSettings; +ModuleListEntry* ModuleList; bool GetConsole(virDomainPtr vDomPtr, char* console) { @@ -146,7 +151,6 @@ } return vDomPtr; } - int main(int argc, char **argv) { @@ -161,6 +165,13 @@ unsigned int Retries; unsigned int Stage; + /* Get the output path to the built ReactOS files */ + OutputPath = getenv("ROS_OUTPUT"); + if(!OutputPath) + OutputPath = DefaultOutputPath; + + InitializeModuleList(); + if (argc == 2) strcpy(config, argv[1]); else @@ -252,6 +263,8 @@ cleanup: + CleanModuleList(); + if (vConn) virConnectClose(vConn);
15 years, 3 months
1
0
0
0
[janderwald] 43035: [KS] - Store Object Header in FsContext2 - Fix allocation of create item entry in KsAllocateObjectCreateItem - Fix de-referencing in Ks[De]ReferenceSoftwareBusObject & Ks[De]ReferenceBusObject - Fake success in KsEnableEvent - Check if the list empty in KspFreeEventList - Handle GUID_NULL in KspPropertyHandler - Return STATUS_MORE_ENTRIES if outputbuffer is too small - Zero struct in KsRegisterWorker [PORTCLS] - Store dispatch context in FsContext - Ignore return value in int
by janderwald@svn.reactos.org
Author: janderwald Date: Sat Sep 12 16:35:27 2009 New Revision: 43035 URL:
http://svn.reactos.org/svn/reactos?rev=43035&view=rev
Log: [KS] - Store Object Header in FsContext2 - Fix allocation of create item entry in KsAllocateObjectCreateItem - Fix de-referencing in Ks[De]ReferenceSoftwareBusObject & Ks[De]ReferenceBusObject - Fake success in KsEnableEvent - Check if the list empty in KspFreeEventList - Handle GUID_NULL in KspPropertyHandler - Return STATUS_MORE_ENTRIES if outputbuffer is too small - Zero struct in KsRegisterWorker [PORTCLS] - Store dispatch context in FsContext - Ignore return value in interrupt sync routine [[Amine Khaldi]] - Disable assert for frame size check for now - Free buffer only if the irp was from kernel mode(hack 2 be removed) - remove unused includes [[Amine Khaldi]] - Don't attempt copying an empty resource list [[Amine Khaldi]] [WDMAUD_KERNEL] - Check if allocation succeeded [[Amine Khaldi]] [SYSAUDIO] - Store dispatch context in FsContext2 Modified: trunk/reactos/drivers/ksfilter/ks/allocators.c trunk/reactos/drivers/ksfilter/ks/api.c trunk/reactos/drivers/ksfilter/ks/connectivity.c trunk/reactos/drivers/ksfilter/ks/device.c trunk/reactos/drivers/ksfilter/ks/event.c trunk/reactos/drivers/ksfilter/ks/filter.c trunk/reactos/drivers/ksfilter/ks/irp.c trunk/reactos/drivers/ksfilter/ks/misc.c trunk/reactos/drivers/ksfilter/ks/pin.c trunk/reactos/drivers/ksfilter/ks/property.c trunk/reactos/drivers/ksfilter/ks/topology.c trunk/reactos/drivers/ksfilter/ks/worker.c trunk/reactos/drivers/wdm/audio/backpln/portcls/dispatcher.cpp trunk/reactos/drivers/wdm/audio/backpln/portcls/interrupt.cpp trunk/reactos/drivers/wdm/audio/backpln/portcls/irpstream.cpp trunk/reactos/drivers/wdm/audio/backpln/portcls/private.hpp trunk/reactos/drivers/wdm/audio/backpln/portcls/propertyhandler.cpp trunk/reactos/drivers/wdm/audio/backpln/portcls/registry.cpp trunk/reactos/drivers/wdm/audio/backpln/portcls/resource.cpp trunk/reactos/drivers/wdm/audio/backpln/portcls/undoc.cpp trunk/reactos/drivers/wdm/audio/legacy/wdmaud/control.c trunk/reactos/drivers/wdm/audio/sysaudio/control.c trunk/reactos/drivers/wdm/audio/sysaudio/pin.c trunk/reactos/drivers/wdm/audio/sysaudio/sysaudio.h Modified: trunk/reactos/drivers/ksfilter/ks/allocators.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/ksfilter/ks/alloca…
============================================================================== --- trunk/reactos/drivers/ksfilter/ks/allocators.c [iso-8859-1] (original) +++ trunk/reactos/drivers/ksfilter/ks/allocators.c [iso-8859-1] Sat Sep 12 16:35:27 2009 @@ -445,7 +445,7 @@ ASSERT(FileObject); /* get object header */ - Header = (PKSIOBJECT_HEADER)FileObject->FsContext; + Header = (PKSIOBJECT_HEADER)FileObject->FsContext2; /* get real allocator */ Status = Header->Unknown->lpVtbl->QueryInterface(Header->Unknown, &IID_IKsAllocator, (PVOID*)&Allocator); Modified: trunk/reactos/drivers/ksfilter/ks/api.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/ksfilter/ks/api.c?…
============================================================================== --- trunk/reactos/drivers/ksfilter/ks/api.c [iso-8859-1] (original) +++ trunk/reactos/drivers/ksfilter/ks/api.c [iso-8859-1] Sat Sep 12 16:35:27 2009 @@ -494,8 +494,8 @@ Entry = (PCREATE_ITEM_ENTRY)CONTAINING_RECORD(RemoveHeadList(ListHead), CREATE_ITEM_ENTRY, Entry); /* caller shouldnt have any references */ - ASSERT(Entry->ReferenceCount == 0); - ASSERT(IsListEmpty(&Entry->ObjectItemList)); + //ASSERT(Entry->ReferenceCount == 0); + //ASSERT(IsListEmpty(&Entry->ObjectItemList)); /* does the creator wish notification */ if (Entry->ItemFreeCallback) @@ -687,8 +687,7 @@ } } /* store the object in the file object */ - ASSERT(IoStack->FileObject->FsContext == NULL); - IoStack->FileObject->FsContext = ObjectHeader; + IoStack->FileObject->FsContext2 = ObjectHeader; /* store parent device */ ObjectHeader->ParentDeviceObject = IoGetRelatedDeviceObject(IoStack->FileObject); @@ -719,6 +718,8 @@ IN PVOID Header) { PKSIOBJECT_HEADER ObjectHeader = (PKSIOBJECT_HEADER) Header; + + DPRINT1("KsFreeObjectHeader Header %p Class %wZ\n", Header, &ObjectHeader->ObjectClass); if (ObjectHeader->ObjectClass.Buffer) { @@ -825,7 +826,7 @@ /* increment create item count */ InterlockedIncrement(&Header->ItemListCount); } - + DPRINT("KsAddObjectCreateItemToDeviceHeader Status %x\n", Status); return Status; } @@ -898,7 +899,7 @@ return STATUS_INVALID_PARAMETER_2; /* first allocate a create entry */ - CreateEntry = AllocateItem(NonPagedPool, sizeof(PCREATE_ITEM_ENTRY)); + CreateEntry = AllocateItem(NonPagedPool, sizeof(CREATE_ITEM_ENTRY)); /* check for allocation success */ if (!CreateEntry) @@ -1121,7 +1122,7 @@ /* get object header */ - ObjectHeader = (PKSIOBJECT_HEADER)FileObject->FsContext; + ObjectHeader = (PKSIOBJECT_HEADER)FileObject->FsContext2; /* check if there is fast device io function */ if (ObjectHeader && ObjectHeader->DispatchTable.FastDeviceIoControl) @@ -1129,7 +1130,7 @@ IoStatusBlock.Status = STATUS_UNSUCCESSFUL; IoStatusBlock.Information = 0; - /* it is send the request */ + /* send the request */ Status = ObjectHeader->DispatchTable.FastDeviceIoControl(FileObject, TRUE, InBuffer, InSize, OutBuffer, OutSize, IoControl, &IoStatusBlock, DeviceObject); /* check if the request was handled */ //DPRINT("Handled %u Status %x Length %u\n", Status, IoStatusBlock.Status, IoStatusBlock.Information); Modified: trunk/reactos/drivers/ksfilter/ks/connectivity.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/ksfilter/ks/connec…
============================================================================== --- trunk/reactos/drivers/ksfilter/ks/connectivity.c [iso-8859-1] (original) +++ trunk/reactos/drivers/ksfilter/ks/connectivity.c [iso-8859-1] Sat Sep 12 16:35:27 2009 @@ -199,6 +199,8 @@ IoStack = IoGetCurrentIrpStackLocation(Irp); Buffer = Irp->UserBuffer; + + DPRINT("KsPinPropertyHandler Irp %p Property %p Data %p DescriptorsCount %u Descriptor %p OutputLength %u Id %x\n", Irp, Property, Data, DescriptorsCount, Descriptor, IoStack->Parameters.DeviceIoControl.OutputBufferLength, Property->Id); switch(Property->Id) { Modified: trunk/reactos/drivers/ksfilter/ks/device.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/ksfilter/ks/device…
============================================================================== --- trunk/reactos/drivers/ksfilter/ks/device.c [iso-8859-1] (original) +++ trunk/reactos/drivers/ksfilter/ks/device.c [iso-8859-1] Sat Sep 12 16:35:27 2009 @@ -570,7 +570,7 @@ if (IoStack->FileObject->RelatedFileObject != NULL) { /* request is to instantiate a pin / node / clock / allocator */ - ObjectHeader = (PKSIOBJECT_HEADER)IoStack->FileObject->RelatedFileObject->FsContext; + ObjectHeader = (PKSIOBJECT_HEADER)IoStack->FileObject->RelatedFileObject->FsContext2; /* sanity check */ ASSERT(ObjectHeader); @@ -717,7 +717,7 @@ PKSIDEVICE_HEADER DeviceHeader = (PKSIDEVICE_HEADER)Header; /* get device interface */ - Device = (IKsDevice*)&DeviceHeader->lpVtblIKsDevice; + Device = (IKsDevice*)DeviceHeader->lpVtblIKsDevice; if (Device) { @@ -741,7 +741,7 @@ PKSIDEVICE_HEADER DeviceHeader = (PKSIDEVICE_HEADER)Header; /* get device interface */ - Device = (IKsDevice*)&DeviceHeader->lpVtblIKsDevice; + Device = (IKsDevice*)DeviceHeader->lpVtblIKsDevice; if (Device) { @@ -766,7 +766,7 @@ PKSIDEVICE_HEADER DeviceHeader = (PKSIDEVICE_HEADER)Header; /* get device interface */ - Device = (IKsDevice*)&DeviceHeader->lpVtblIKsDevice; + Device = (IKsDevice*)DeviceHeader->lpVtblIKsDevice; if (Device) { @@ -783,11 +783,14 @@ NTAPI KsDereferenceSoftwareBusObject( IN KSDEVICE_HEADER Header) -{ IKsDevice * Device; +{ + IKsDevice * Device; PKSIDEVICE_HEADER DeviceHeader = (PKSIDEVICE_HEADER)Header; + DPRINT1("KsDereferenceSoftwareBusObject DeviceHeader %p\n", Header); + /* get device interface */ - Device = (IKsDevice*)&DeviceHeader->lpVtblIKsDevice; + Device = (IKsDevice*)DeviceHeader->lpVtblIKsDevice; if (Device) { Modified: trunk/reactos/drivers/ksfilter/ks/event.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/ksfilter/ks/event.…
============================================================================== --- trunk/reactos/drivers/ksfilter/ks/event.c [iso-8859-1] (original) +++ trunk/reactos/drivers/ksfilter/ks/event.c [iso-8859-1] Sat Sep 12 16:35:27 2009 @@ -87,7 +87,7 @@ IN PVOID EventsLock OPTIONAL) { UNIMPLEMENTED; - return STATUS_UNSUCCESSFUL; + return STATUS_SUCCESS; } /* @@ -218,7 +218,7 @@ KsDiscardEvent( IN PKSEVENT_ENTRY EventEntry) { - UNIMPLEMENTED; + //UNIMPLEMENTED; } @@ -232,6 +232,9 @@ /* check valid input */ if (!Ctx || !Ctx->List) + return FALSE; + + if (IsListEmpty(Ctx->List)) return FALSE; /* remove first entry */ @@ -358,7 +361,7 @@ IoStack = IoGetCurrentIrpStackLocation(Irp); /* now get the object header */ - ObjectHeader =(PKSIOBJECT_HEADER)IoStack->FileObject->FsContext; + ObjectHeader =(PKSIOBJECT_HEADER)IoStack->FileObject->FsContext2; /* sanity check */ ASSERT(ObjectHeader->ObjectType); Modified: trunk/reactos/drivers/ksfilter/ks/filter.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/ksfilter/ks/filter…
============================================================================== --- trunk/reactos/drivers/ksfilter/ks/filter.c [iso-8859-1] (original) +++ trunk/reactos/drivers/ksfilter/ks/filter.c [iso-8859-1] Sat Sep 12 16:35:27 2009 @@ -444,7 +444,7 @@ /* santiy check */ ASSERT(IoStack->FileObject != NULL); - ObjectHeader = (PKSIOBJECT_HEADER)IoStack->FileObject->FsContext; + ObjectHeader = (PKSIOBJECT_HEADER)IoStack->FileObject->FsContext2; /* sanity is important */ ASSERT(ObjectHeader != NULL); @@ -1529,7 +1529,7 @@ ASSERT(IoStack->FileObject); /* get object header */ - ObjectHeader = (PKSIOBJECT_HEADER)IoStack->FileObject->FsContext; + ObjectHeader = (PKSIOBJECT_HEADER)IoStack->FileObject->FsContext2; if (ObjectHeader->Type == KsObjectTypeFilter) { Modified: trunk/reactos/drivers/ksfilter/ks/irp.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/ksfilter/ks/irp.c?…
============================================================================== --- trunk/reactos/drivers/ksfilter/ks/irp.c [iso-8859-1] (original) +++ trunk/reactos/drivers/ksfilter/ks/irp.c [iso-8859-1] Sat Sep 12 16:35:27 2009 @@ -555,7 +555,7 @@ if (RequestorMode || ExGetPreviousMode() == KernelMode) { /* requestor is from kernel land */ - ObjectHeader = (PKSIOBJECT_HEADER)FileObject->FsContext; + ObjectHeader = (PKSIOBJECT_HEADER)FileObject->FsContext2; if (ObjectHeader) { @@ -1348,6 +1348,8 @@ PLIST_ENTRY CurEntry; KIRQL OldIrql; + DPRINT("KsRemoveIrpFromCancelableQueue ListHead %p SpinLock %p ListLocation %x RemovalOperation %x\n", QueueHead, SpinLock, ListLocation, RemovalOperation); + /* check parameters */ if (!QueueHead || !SpinLock) return NULL; @@ -1572,6 +1574,8 @@ PKSPIN_LOCK SpinLock; KIRQL OldLevel; + DPRINT("KsRemoveSpecificIrpFromCancelableQueue %p\n", Irp); + /* get internal queue lock */ SpinLock = KSQUEUE_SPINLOCK_IRP_STORAGE(Irp); @@ -1603,6 +1607,7 @@ PIO_STACK_LOCATION IoStack; KIRQL OldLevel; + DPRINT1("KsAddIrpToCancelableQueue QueueHead %p SpinLock %p Irp %p ListLocation %x DriverCancel %p\n", QueueHead, SpinLock, Irp, ListLocation, DriverCancel); /* check for required parameters */ if (!QueueHead || !SpinLock || !Irp) return; @@ -1796,7 +1801,7 @@ if (IoStack->FileObject->RelatedFileObject != NULL) { /* request is to instantiate a pin / node / clock / allocator */ - ObjectHeader = (PKSIOBJECT_HEADER)IoStack->FileObject->RelatedFileObject->FsContext; + ObjectHeader = (PKSIOBJECT_HEADER)IoStack->FileObject->RelatedFileObject->FsContext2; /* sanity check */ ASSERT(ObjectHeader); @@ -1858,7 +1863,7 @@ ASSERT(IoStack->FileObject); /* get object header */ - ObjectHeader = (PKSIOBJECT_HEADER) IoStack->FileObject->FsContext; + ObjectHeader = (PKSIOBJECT_HEADER) IoStack->FileObject->FsContext2; if (!ObjectHeader) { @@ -1931,11 +1936,18 @@ IN PDRIVER_OBJECT DriverObject, IN ULONG MajorFunction) { + DPRINT("KsSetMajorFunctionHandler Function %x\n", MajorFunction); +#if 0 + // HACK + // for MS PORTCLS + // + DriverObject->MajorFunction[IRP_MJ_CREATE] = KspCreate; +#endif + switch ( MajorFunction ) { case IRP_MJ_CREATE: DriverObject->MajorFunction[MajorFunction] = KspCreate; - break; break; case IRP_MJ_DEVICE_CONTROL: case IRP_MJ_CLOSE: @@ -1947,6 +1959,7 @@ DriverObject->MajorFunction[MajorFunction] = KspDispatchIrp; break; default: + DPRINT1("NotSupported %x\n", MajorFunction); return STATUS_INVALID_PARAMETER; }; @@ -1966,6 +1979,8 @@ PIO_STACK_LOCATION IoStack; PKSIDEVICE_HEADER DeviceHeader; PDEVICE_EXTENSION DeviceExtension; + + DPRINT("KsDispatchIrp DeviceObject %p Irp %p\n", DeviceObject, Irp); /* get device extension */ DeviceExtension = (PDEVICE_EXTENSION)DeviceObject->DeviceExtension; Modified: trunk/reactos/drivers/ksfilter/ks/misc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/ksfilter/ks/misc.c…
============================================================================== --- trunk/reactos/drivers/ksfilter/ks/misc.c [iso-8859-1] (original) +++ trunk/reactos/drivers/ksfilter/ks/misc.c [iso-8859-1] Sat Sep 12 16:35:27 2009 @@ -151,7 +151,7 @@ PKSIOBJECT_HEADER ObjectHeader; /* get object header */ - ObjectHeader = (PKSIOBJECT_HEADER)FileObject->FsContext; + ObjectHeader = (PKSIOBJECT_HEADER)FileObject->FsContext2; /* return associated object */ return ObjectHeader->ObjectType; @@ -169,7 +169,7 @@ PKSIOBJECT_HEADER ObjectHeader; /* get object header */ - ObjectHeader = (PKSIOBJECT_HEADER)FileObject->FsContext; + ObjectHeader = (PKSIOBJECT_HEADER)FileObject->FsContext2; /* return type */ return ObjectHeader->Type; } @@ -188,7 +188,7 @@ /* get current irp stack */ IoStack = IoGetCurrentIrpStackLocation(Irp); /* get object header */ - ObjectHeader = (PKSIOBJECT_HEADER)IoStack->FileObject->FsContext; + ObjectHeader = (PKSIOBJECT_HEADER)IoStack->FileObject->FsContext2; /* return type */ return ObjectHeader->Type; } Modified: trunk/reactos/drivers/ksfilter/ks/pin.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/ksfilter/ks/pin.c?…
============================================================================== --- trunk/reactos/drivers/ksfilter/ks/pin.c [iso-8859-1] (original) +++ trunk/reactos/drivers/ksfilter/ks/pin.c [iso-8859-1] Sat Sep 12 16:35:27 2009 @@ -548,7 +548,7 @@ PIO_STACK_LOCATION IoStack = IoGetCurrentIrpStackLocation(Irp); /* get object header */ - ObjectHeader = (PKSIOBJECT_HEADER)IoStack->FileObject->FsContext; + ObjectHeader = (PKSIOBJECT_HEADER)IoStack->FileObject->FsContext2; /* return object type */ return (PKSPIN)ObjectHeader->ObjectType; @@ -904,10 +904,10 @@ /* sanity check */ ASSERT(IoStack->FileObject); - ASSERT(IoStack->FileObject->FsContext); + ASSERT(IoStack->FileObject->FsContext2); /* get the object header */ - ObjectHeader = (PKSIOBJECT_HEADER)IoStack->FileObject->FsContext; + ObjectHeader = (PKSIOBJECT_HEADER)IoStack->FileObject->FsContext2; /* locate ks pin implemention fro KSPIN offset */ This = (IKsPinImpl*)CONTAINING_RECORD(ObjectHeader->ObjectType, IKsPinImpl, Pin); @@ -961,10 +961,10 @@ /* sanity check */ ASSERT(IoStack->FileObject); - ASSERT(IoStack->FileObject->FsContext); + ASSERT(IoStack->FileObject->FsContext2); /* get the object header */ - ObjectHeader = (PKSIOBJECT_HEADER)IoStack->FileObject->FsContext; + ObjectHeader = (PKSIOBJECT_HEADER)IoStack->FileObject->FsContext2; /* locate ks pin implemention fro KSPIN offset */ This = (IKsPinImpl*)CONTAINING_RECORD(ObjectHeader->ObjectType, IKsPinImpl, Pin); Modified: trunk/reactos/drivers/ksfilter/ks/property.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/ksfilter/ks/proper…
============================================================================== --- trunk/reactos/drivers/ksfilter/ks/property.c [iso-8859-1] (original) +++ trunk/reactos/drivers/ksfilter/ks/property.c [iso-8859-1] Sat Sep 12 16:35:27 2009 @@ -25,6 +25,8 @@ for(Index = 0; Index < PropertySetCount; Index++) { + ASSERT(PropertySet[Index].Set); + if (IsEqualGUIDAligned(&Property->Set, PropertySet[Index].Set)) { for(ItemIndex = 0; ItemIndex < PropertySet[Index].PropertiesCount; ItemIndex++) @@ -42,7 +44,7 @@ { /* too small output buffer */ IoStatus->Information = PropertySet[Index].PropertyItem[ItemIndex].MinData; - return STATUS_BUFFER_TOO_SMALL; + return STATUS_MORE_ENTRIES; } #if 0 if (Property->Flags & KSPROPERTY_TYPE_BASICSUPPORT) @@ -112,6 +114,8 @@ PIO_STACK_LOCATION IoStack; NTSTATUS Status; PFNKSHANDLER PropertyHandler = NULL; + ULONG Index; + LPGUID Guid; /* get current irp stack */ IoStack = IoGetCurrentIrpStackLocation(Irp); @@ -126,17 +130,13 @@ /* FIXME probe the input / output buffer if from user mode */ - /* get input property request */ Property = (PKSPROPERTY)IoStack->Parameters.DeviceIoControl.Type3InputBuffer; + DPRINT("KspPropertyHandler Irp %p PropertySetsCount %u PropertySet %p Allocator %p PropertyItemSize %u ExpectedPropertyItemSize %u\n", Irp, PropertySetsCount, PropertySet, Allocator, PropertyItemSize, sizeof(KSPROPERTY_ITEM)); + /* sanity check */ ASSERT(PropertyItemSize == 0 || PropertyItemSize == sizeof(KSPROPERTY_ITEM)); - if (IsEqualGUIDAligned(&Property->Set, &KSPROPSETID_Topology)) - { - /* use KsTopologyPropertyHandler for this business */ - return STATUS_INVALID_PARAMETER; - } /* find the property handler */ Status = FindPropertyHandler(&Irp->IoStatus, PropertySet, PropertySetsCount, Property, IoStack->Parameters.DeviceIoControl.InputBufferLength, IoStack->Parameters.DeviceIoControl.OutputBufferLength, Irp->UserBuffer, &PropertyHandler); @@ -165,6 +165,26 @@ Status = PropertyHandler(Irp, Property, Irp->UserBuffer); } } + } + else if (IsEqualGUIDAligned(&Property->Set, &GUID_NULL) && Property->Id == 0 && Property->Flags == KSPROPERTY_TYPE_SETSUPPORT) + { + // store output size + Irp->IoStatus.Information = sizeof(GUID) * PropertySetsCount; + if (IoStack->Parameters.DeviceIoControl.OutputBufferLength < sizeof(GUID) * PropertySetsCount) + { + // buffer too small + return STATUS_BUFFER_OVERFLOW; + } + + // get output buffer + Guid = (LPGUID)Irp->UserBuffer; + + // copy property guids from property sets + for(Index = 0; Index < PropertySetsCount; Index++) + { + RtlMoveMemory(&Guid[Index], PropertySet[Index].Set, sizeof(GUID)); + } + return STATUS_SUCCESS; } /* done */ Modified: trunk/reactos/drivers/ksfilter/ks/topology.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/ksfilter/ks/topolo…
============================================================================== --- trunk/reactos/drivers/ksfilter/ks/topology.c [iso-8859-1] (original) +++ trunk/reactos/drivers/ksfilter/ks/topology.c [iso-8859-1] Sat Sep 12 16:35:27 2009 @@ -160,6 +160,8 @@ HANDLE hKey; PKEY_VALUE_PARTIAL_INFORMATION KeyInfo; + DPRINT("KsTopologyPropertyHandler Irp %p Property %p Data %p Topology %p\n", Irp, Property, Data, Topology); + if (Property->Flags != KSPROPERTY_TYPE_GET) { Irp->IoStatus.Status = STATUS_NOT_IMPLEMENTED; Modified: trunk/reactos/drivers/ksfilter/ks/worker.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/ksfilter/ks/worker…
============================================================================== --- trunk/reactos/drivers/ksfilter/ks/worker.c [iso-8859-1] (original) +++ trunk/reactos/drivers/ksfilter/ks/worker.c [iso-8859-1] Sat Sep 12 16:35:27 2009 @@ -46,6 +46,9 @@ do { + /* sanity check */ + ASSERT(!IsListEmpty(&KsWorker->QueuedWorkItems)); + /* remove first entry */ Entry = RemoveHeadList(&KsWorker->QueuedWorkItems); /* get offset to work item */ @@ -95,7 +98,7 @@ } /* allocate worker context */ - KsWorker = ExAllocatePool(NonPagedPool, sizeof(KSIWORKER)); + KsWorker = AllocateItem(NonPagedPool, sizeof(KSIWORKER)); if (!KsWorker) return STATUS_INSUFFICIENT_RESOURCES; @@ -103,8 +106,6 @@ ExInitializeWorkItem(&KsWorker->WorkItem, WorkItemRoutine, (PVOID)KsWorker); /* setup type */ KsWorker->Type = WorkQueueType; - /* set counter to zero */ - KsWorker->Counter = 0; /* Initialize work item queue */ InitializeListHead(&KsWorker->QueuedWorkItems); /* initialize work item lock */ Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/dispatcher.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
============================================================================== --- trunk/reactos/drivers/wdm/audio/backpln/portcls/dispatcher.cpp [iso-8859-1] (original) +++ trunk/reactos/drivers/wdm/audio/backpln/portcls/dispatcher.cpp [iso-8859-1] Sat Sep 12 16:35:27 2009 @@ -22,7 +22,7 @@ IoStack = IoGetCurrentIrpStackLocation(Irp); // access IrpTarget - IrpTarget = (IIrpTarget *)IoStack->FileObject->FsContext2; + IrpTarget = (IIrpTarget *)IoStack->FileObject->FsContext; // let IrpTarget handle request return IrpTarget->DeviceIoControl(DeviceObject, Irp); @@ -41,7 +41,7 @@ IoStack = IoGetCurrentIrpStackLocation(Irp); // access IrpTarget - IrpTarget = (IIrpTarget *)IoStack->FileObject->FsContext2; + IrpTarget = (IIrpTarget *)IoStack->FileObject->FsContext; // let IrpTarget handle request @@ -61,7 +61,7 @@ IoStack = IoGetCurrentIrpStackLocation(Irp); // access IrpTarget - IrpTarget = (IIrpTarget *)IoStack->FileObject->FsContext2; + IrpTarget = (IIrpTarget *)IoStack->FileObject->FsContext; // let IrpTarget handle request @@ -81,7 +81,7 @@ IoStack = IoGetCurrentIrpStackLocation(Irp); // access IrpTarget - IrpTarget = (IIrpTarget *)IoStack->FileObject->FsContext2; + IrpTarget = (IIrpTarget *)IoStack->FileObject->FsContext; // let IrpTarget handle request @@ -101,7 +101,7 @@ IoStack = IoGetCurrentIrpStackLocation(Irp); // access IrpTarget - IrpTarget = (IIrpTarget *)IoStack->FileObject->FsContext2; + IrpTarget = (IIrpTarget *)IoStack->FileObject->FsContext; // let IrpTarget handle request @@ -121,7 +121,7 @@ IoStack = IoGetCurrentIrpStackLocation(Irp); // access IrpTarget - IrpTarget = (IIrpTarget *)IoStack->FileObject->FsContext2; + IrpTarget = (IIrpTarget *)IoStack->FileObject->FsContext; // let IrpTarget handle request @@ -141,7 +141,7 @@ IoStack = IoGetCurrentIrpStackLocation(Irp); // access IrpTarget - IrpTarget = (IIrpTarget *)IoStack->FileObject->FsContext2; + IrpTarget = (IIrpTarget *)IoStack->FileObject->FsContext; // let IrpTarget handle request @@ -164,7 +164,7 @@ IIrpTarget * IrpTarget; // access IrpTarget - IrpTarget = (IIrpTarget *)FileObject->FsContext2; + IrpTarget = (IIrpTarget *)FileObject->FsContext; // let IrpTarget handle request return IrpTarget->FastDeviceIoControl(FileObject, Wait, InputBuffer, InputBufferLength, OutputBuffer, OutputBufferLength, IoControlCode, IoStatus, DeviceObject); @@ -186,7 +186,7 @@ IIrpTarget * IrpTarget; // access IrpTarget - IrpTarget = (IIrpTarget *)FileObject->FsContext2; + IrpTarget = (IIrpTarget *)FileObject->FsContext; // let IrpTarget handle request return IrpTarget->FastRead(FileObject, FileOffset, Length, Wait, LockKey, Buffer, IoStatus, DeviceObject); @@ -207,7 +207,7 @@ IIrpTarget * IrpTarget; // access IrpTarget - IrpTarget = (IIrpTarget *)FileObject->FsContext2; + IrpTarget = (IIrpTarget *)FileObject->FsContext; // let IrpTarget handle request return IrpTarget->FastWrite(FileObject, FileOffset, Length, Wait, LockKey, Buffer, IoStatus, DeviceObject); } @@ -242,7 +242,7 @@ // get current irp stack location IoStack = IoGetCurrentIrpStackLocation(Irp); - IoStack->FileObject->FsContext2 = (PVOID)Target; + IoStack->FileObject->FsContext = (PVOID)Target; Status = KsAllocateObjectHeader(&ObjectHeader, CreateItemCount, CreateItem, Irp, &DispatchTable); DPRINT("KsAllocateObjectHeader result %x\n", Status); Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/interrupt.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
============================================================================== --- trunk/reactos/drivers/wdm/audio/backpln/portcls/interrupt.cpp [iso-8859-1] (original) +++ trunk/reactos/drivers/wdm/audio/backpln/portcls/interrupt.cpp [iso-8859-1] Sat Sep 12 16:35:27 2009 @@ -180,7 +180,7 @@ while (CurEntry != &This->m_ServiceRoutines) { Entry = CONTAINING_RECORD(CurEntry, SYNC_ENTRY, ListEntry); - Status = Entry->SyncRoutine((CInterruptSync*)This, Entry->DynamicContext); + Entry->SyncRoutine((CInterruptSync*)This, Entry->DynamicContext); CurEntry = CurEntry->Flink; } DPRINT("Returning TRUE with mode InterruptSyncModeAll\n"); Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/irpstream.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
============================================================================== --- trunk/reactos/drivers/wdm/audio/backpln/portcls/irpstream.cpp [iso-8859-1] (original) +++ trunk/reactos/drivers/wdm/audio/backpln/portcls/irpstream.cpp [iso-8859-1] Sat Sep 12 16:35:27 2009 @@ -147,7 +147,7 @@ PC_ASSERT(Header); // dont exceed max frame size - PC_ASSERT(m_MaxFrameSize >= Header->DataUsed); + //PC_ASSERT(m_MaxFrameSize >= Header->DataUsed); // increment num mappings InterlockedIncrement(&m_NumMappings); @@ -282,7 +282,7 @@ m_Irp->IoStatus.Information = StreamHeader->FrameExtent; - if (m_Irp->RequestorMode != KernelMode) + if (m_Irp->RequestorMode == KernelMode) { // HACK - WDMAUD should pass PKSSTREAM_HEADERs ExFreePool(StreamHeader->Data); Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/private.hpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
============================================================================== --- trunk/reactos/drivers/wdm/audio/backpln/portcls/private.hpp [iso-8859-1] (original) +++ trunk/reactos/drivers/wdm/audio/backpln/portcls/private.hpp [iso-8859-1] Sat Sep 12 16:35:27 2009 @@ -17,15 +17,10 @@ #include <dmusicks.h> #include <kcom.h> -#include "stdunk.h" #include "interfaces.hpp" #include <ks.h> #include <ksmedia.h> -#include <stdio.h> -#include <math.h> #include <intrin.h> - -#include <assert.h> #define TAG_PORTCLASS 'SLCP' Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/propertyhandler.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
============================================================================== --- trunk/reactos/drivers/wdm/audio/backpln/portcls/propertyhandler.cpp [iso-8859-1] (original) +++ trunk/reactos/drivers/wdm/audio/backpln/portcls/propertyhandler.cpp [iso-8859-1] Sat Sep 12 16:35:27 2009 @@ -139,7 +139,7 @@ IoStack = IoGetCurrentIrpStackLocation(Irp); // Get the IrpTarget - IrpTarget = (IIrpTarget*)IoStack->FileObject->FsContext2; + IrpTarget = (IIrpTarget*)IoStack->FileObject->FsContext; // Get the parent Status = IrpTarget->QueryInterface(IID_IPort, (PVOID*)&Port); if (!NT_SUCCESS(Status)) Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/registry.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
============================================================================== --- trunk/reactos/drivers/wdm/audio/backpln/portcls/registry.cpp [iso-8859-1] (original) +++ trunk/reactos/drivers/wdm/audio/backpln/portcls/registry.cpp [iso-8859-1] Sat Sep 12 16:35:27 2009 @@ -168,6 +168,7 @@ { ZwClose(hKey); delete RegistryKey; + return Status; } *RegistrySubKey = (PREGISTRYKEY)RegistryKey; Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/resource.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
============================================================================== --- trunk/reactos/drivers/wdm/audio/backpln/portcls/resource.cpp [iso-8859-1] (original) +++ trunk/reactos/drivers/wdm/audio/backpln/portcls/resource.cpp [iso-8859-1] Sat Sep 12 16:35:27 2009 @@ -348,6 +348,14 @@ delete NewList; } + if (!TranslatedResourceList) + { + // + // empty resource list + // + return STATUS_SUCCESS; + } + // calculate translated resource list size ResourceCount = TranslatedResourceList->List[0].PartialResourceList.Count; #ifdef _MSC_VER @@ -371,7 +379,7 @@ NewTranslatedResources = (PCM_RESOURCE_LIST)AllocateItem(PoolType, NewTranslatedSize, TAG_PORTCLASS); if (!NewTranslatedResources) { - FreeItem(NewList, TAG_PORTCLASS); + delete NewList; return STATUS_INSUFFICIENT_RESOURCES; } @@ -379,8 +387,7 @@ NewUntranslatedResources = (PCM_RESOURCE_LIST)AllocateItem(PoolType, NewUntranslatedSize, TAG_PORTCLASS); if (!NewUntranslatedResources) { - FreeItem(NewList, TAG_PORTCLASS); - FreeItem(NewTranslatedResources, TAG_PORTCLASS); + delete NewList; return STATUS_INSUFFICIENT_RESOURCES; } Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/undoc.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
============================================================================== --- trunk/reactos/drivers/wdm/audio/backpln/portcls/undoc.cpp [iso-8859-1] (original) +++ trunk/reactos/drivers/wdm/audio/backpln/portcls/undoc.cpp [iso-8859-1] Sat Sep 12 16:35:27 2009 @@ -25,8 +25,8 @@ { PC_ASSERT(FileObject); - // IrpTarget is stored in FsContext2 - return (IIrpTarget*)FileObject->FsContext2; + // IrpTarget is stored in FsContext + return (IIrpTarget*)FileObject->FsContext; } IIrpTarget * Modified: trunk/reactos/drivers/wdm/audio/legacy/wdmaud/control.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/legacy/w…
============================================================================== --- trunk/reactos/drivers/wdm/audio/legacy/wdmaud/control.c [iso-8859-1] (original) +++ trunk/reactos/drivers/wdm/audio/legacy/wdmaud/control.c [iso-8859-1] Sat Sep 12 16:35:27 2009 @@ -554,6 +554,12 @@ /* read DriverDescName value */ PartialInformation = ReadKeyValue(hSubKey, &DriverDescName); + if (!PartialInformation) + { + /* failed to read driver desc key */ + return STATUS_UNSUCCESSFUL; + } + /* copy key name */ Length = min(ProductNameSize * sizeof(WCHAR), PartialInformation->DataLength); RtlMoveMemory(ProductName, (PVOID)PartialInformation->Data, Length); @@ -948,16 +954,16 @@ IN PIRP LowerIrp, IN PVOID Context) { - PIRP Irp; + //PIRP Irp; ASSERT(LowerIrp->PendingReturned == FALSE); /* get original irp */ - Irp = (PIRP)Context; + //Irp = (PIRP)Context; /* save status */ - Irp->IoStatus.Status = LowerIrp->IoStatus.Status; - Irp->IoStatus.Information = LowerIrp->IoStatus.Information; + //Irp->IoStatus.Status = LowerIrp->IoStatus.Status; + //Irp->IoStatus.Information = LowerIrp->IoStatus.Information; /* complete request */ - IoCompleteRequest(Irp, IO_SOUND_INCREMENT); + //IoCompleteRequest(Irp, IO_SOUND_INCREMENT); /* return success to free irp */ return STATUS_SUCCESS; } @@ -1130,14 +1136,17 @@ IoSetCompletionRoutine(LowerIrp, WdmAudWriteCompletion, (PVOID)Irp, TRUE, TRUE, TRUE); /* mark irp as pending */ - IoMarkIrpPending(Irp); - + //IoMarkIrpPending(Irp); + Irp->IoStatus.Information = DeviceInfo->BufferSize; + Irp->IoStatus.Status = STATUS_SUCCESS; + IoCompleteRequest(Irp, IO_NO_INCREMENT); + DPRINT1("Wrote %u\n", DeviceInfo->BufferSize); /* call the driver */ Status = IoCallDriver(IoGetRelatedDeviceObject(FileObject), LowerIrp); /* dereference file object */ ObDereferenceObject(FileObject); - return STATUS_PENDING; + return STATUS_SUCCESS; #endif } Modified: trunk/reactos/drivers/wdm/audio/sysaudio/control.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/sysaudio…
============================================================================== --- trunk/reactos/drivers/wdm/audio/sysaudio/control.c [iso-8859-1] (original) +++ trunk/reactos/drivers/wdm/audio/sysaudio/control.c [iso-8859-1] Sat Sep 12 16:35:27 2009 @@ -79,10 +79,10 @@ Entry = GetListEntry(&DeviceExtension->KsAudioDeviceList, DeviceNumber); ASSERT(Entry != NULL); - /* store device entry in FsContext2 + /* store device entry in FsContext * see pin.c DispatchCreateSysAudioPin for details */ - IoStack->FileObject->FsContext2 = (PVOID)Entry; + IoStack->FileObject->FsContext = (PVOID)Entry; return SetIrpIoStatus(Irp, STATUS_SUCCESS, 0); } Modified: trunk/reactos/drivers/wdm/audio/sysaudio/pin.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/sysaudio…
============================================================================== --- trunk/reactos/drivers/wdm/audio/sysaudio/pin.c [iso-8859-1] (original) +++ trunk/reactos/drivers/wdm/audio/sysaudio/pin.c [iso-8859-1] Sat Sep 12 16:35:27 2009 @@ -25,8 +25,8 @@ /* Get current stack location */ IoStack = IoGetCurrentIrpStackLocation(Irp); - /* The dispatch context is stored in the FsContext2 member */ - Context = (PDISPATCH_CONTEXT)IoStack->FileObject->FsContext2; + /* The dispatch context is stored in the FsContext member */ + Context = (PDISPATCH_CONTEXT)IoStack->FileObject->FsContext; /* Sanity check */ ASSERT(Context); @@ -76,8 +76,8 @@ /* Get current stack location */ IoStack = IoGetCurrentIrpStackLocation(Irp); - /* The dispatch context is stored in the FsContext2 member */ - Context = (PDISPATCH_CONTEXT)IoStack->FileObject->FsContext2; + /* The dispatch context is stored in the FsContext member */ + Context = (PDISPATCH_CONTEXT)IoStack->FileObject->FsContext; /* Sanity check */ ASSERT(Context); @@ -136,8 +136,8 @@ /* Get current stack location */ IoStack = IoGetCurrentIrpStackLocation(Irp); - /* The dispatch context is stored in the FsContext2 member */ - Context = (PDISPATCH_CONTEXT)IoStack->FileObject->FsContext2; + /* The dispatch context is stored in the FsContext member */ + Context = (PDISPATCH_CONTEXT)IoStack->FileObject->FsContext; /* Sanity check */ ASSERT(Context); @@ -210,8 +210,8 @@ /* Get current stack location */ IoStack = IoGetCurrentIrpStackLocation(Irp); - /* The dispatch context is stored in the FsContext2 member */ - Context = (PDISPATCH_CONTEXT)IoStack->FileObject->FsContext2; + /* The dispatch context is stored in the FsContext member */ + Context = (PDISPATCH_CONTEXT)IoStack->FileObject->FsContext; /* Sanity check */ ASSERT(Context); @@ -282,8 +282,8 @@ /* Get current stack location */ IoStack = IoGetCurrentIrpStackLocation(Irp); - /* The dispatch context is stored in the FsContext2 member */ - Context = (PDISPATCH_CONTEXT)IoStack->FileObject->FsContext2; + /* The dispatch context is stored in the FsContext member */ + Context = (PDISPATCH_CONTEXT)IoStack->FileObject->FsContext; if (Context->Handle) { @@ -379,7 +379,7 @@ DPRINT("Pin_fnFastWrite called DeviceObject %p Irp %p\n", DeviceObject); - Context = (PDISPATCH_CONTEXT)FileObject->FsContext2; + Context = (PDISPATCH_CONTEXT)FileObject->FsContext; if (Context->hMixerPin) { @@ -404,7 +404,7 @@ Status = KsStreamIo(RealFileObject, NULL, NULL, NULL, NULL, 0, IoStatus, Buffer, Length, KSSTREAM_WRITE, UserMode); - ObDereferenceObject(RealFileObject); + //ObDereferenceObject(RealFileObject); if (NT_SUCCESS(Status)) return TRUE; @@ -636,7 +636,6 @@ IN PIRP Irp) { NTSTATUS Status = STATUS_SUCCESS; - KSOBJECT_HEADER ObjectHeader; PIO_STACK_LOCATION IoStack; PKSAUDIO_DEVICE_ENTRY DeviceEntry; PKSPIN_CONNECT Connect = NULL; @@ -650,10 +649,10 @@ /* sanity checks */ ASSERT(IoStack->FileObject); ASSERT(IoStack->FileObject->RelatedFileObject); - ASSERT(IoStack->FileObject->RelatedFileObject->FsContext2); + ASSERT(IoStack->FileObject->RelatedFileObject->FsContext); /* get current attached virtual device */ - DeviceEntry = (PKSAUDIO_DEVICE_ENTRY)IoStack->FileObject->RelatedFileObject->FsContext2; + DeviceEntry = (PKSAUDIO_DEVICE_ENTRY)IoStack->FileObject->RelatedFileObject->FsContext; /* now validate pin connect request */ Status = KsValidateConnectRequest(Irp, DeviceEntry->PinDescriptorsCount, DeviceEntry->PinDescriptors, &Connect); @@ -681,7 +680,7 @@ RtlZeroMemory(DispatchContext, sizeof(DISPATCH_CONTEXT)); /* allocate object header */ - Status = KsAllocateObjectHeader(&ObjectHeader, 0, NULL, Irp, &PinTable); + Status = KsAllocateObjectHeader(&DispatchContext->ObjectHeader, 0, NULL, Irp, &PinTable); if (!NT_SUCCESS(Status)) { /* failed */ @@ -696,13 +695,13 @@ if (!NT_SUCCESS(Status)) { /* failed */ - KsFreeObjectHeader(ObjectHeader); + KsFreeObjectHeader(DispatchContext->ObjectHeader); ExFreePool(DispatchContext); } else { /* store dispatch context */ - IoStack->FileObject->FsContext2 = (PVOID)DispatchContext; + IoStack->FileObject->FsContext = (PVOID)DispatchContext; } Modified: trunk/reactos/drivers/wdm/audio/sysaudio/sysaudio.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/sysaudio…
============================================================================== --- trunk/reactos/drivers/wdm/audio/sysaudio/sysaudio.h [iso-8859-1] (original) +++ trunk/reactos/drivers/wdm/audio/sysaudio/sysaudio.h [iso-8859-1] Sat Sep 12 16:35:27 2009 @@ -22,8 +22,8 @@ LIST_ENTRY Entry; // device entry for KsAudioDeviceList UNICODE_STRING DeviceName; // symbolic link of audio device - HANDLE Handle; // handle to audio sub device - PFILE_OBJECT FileObject; // file objecto to audio sub device + HANDLE Handle; // handle to audio device + PFILE_OBJECT FileObject; // file objecto to audio device PIN_INFO * Pins; // array of PIN_INFO ULONG PinDescriptorsCount; // number of pin descriptors @@ -55,6 +55,7 @@ typedef struct { + KSOBJECT_HEADER ObjectHeader; // pin object header HANDLE Handle; // audio irp pin handle ULONG PinId; // pin id of device PKSAUDIO_DEVICE_ENTRY AudioEntry; // pointer to audio device entry
15 years, 3 months
1
0
0
0
[dchapyshev] 43034: - Remove unused variable. Found by Amine Khaldi.
by dchapyshev@svn.reactos.org
Author: dchapyshev Date: Sat Sep 12 14:14:21 2009 New Revision: 43034 URL:
http://svn.reactos.org/svn/reactos?rev=43034&view=rev
Log: - Remove unused variable. Found by Amine Khaldi. Modified: trunk/reactos/base/applications/cacls/cacls.c Modified: trunk/reactos/base/applications/cacls/cacls.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/cacls/ca…
============================================================================== --- trunk/reactos/base/applications/cacls/cacls.c [iso-8859-1] (original) +++ trunk/reactos/base/applications/cacls/cacls.c [iso-8859-1] Sat Sep 12 14:14:21 2009 @@ -529,7 +529,6 @@ WIN32_FIND_DATA FindData; HANDLE hFind; DWORD LastError; - BOOL ContinueAccessDenied = FALSE; if (argc > 2) { @@ -572,8 +571,7 @@ { LastError = GetLastError(); - if (LastError == ERROR_ACCESS_DENIED && - ContinueAccessDenied) + if (LastError == ERROR_ACCESS_DENIED) { PrintErrorMessage(LastError); }
15 years, 3 months
1
0
0
0
[dchapyshev] 43033: - Add NULL pointer check. Found by Amine Khaldi.
by dchapyshev@svn.reactos.org
Author: dchapyshev Date: Sat Sep 12 14:04:39 2009 New Revision: 43033 URL:
http://svn.reactos.org/svn/reactos?rev=43033&view=rev
Log: - Add NULL pointer check. Found by Amine Khaldi. Modified: trunk/reactos/dll/win32/advapi32/sec/misc.c Modified: trunk/reactos/dll/win32/advapi32/sec/misc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/advapi32/sec/mis…
============================================================================== --- trunk/reactos/dll/win32/advapi32/sec/misc.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/advapi32/sec/misc.c [iso-8859-1] Sat Sep 12 14:04:39 2009 @@ -1200,8 +1200,11 @@ else { *pdwDomainName = dwSrcLen; - RtlCopyMemory ( pDomainName, ReferencedDomain->Domains[0].Name.Buffer, ReferencedDomain->Domains[0].Name.Length ); - pDomainName[ReferencedDomain->Domains[0].Name.Length / sizeof(WCHAR)] = L'\0'; + if (pDomainName) + { + RtlCopyMemory ( pDomainName, ReferencedDomain->Domains[0].Name.Buffer, ReferencedDomain->Domains[0].Name.Length ); + pDomainName[ReferencedDomain->Domains[0].Name.Length / sizeof(WCHAR)] = L'\0'; + } } } }
15 years, 3 months
1
0
0
0
[cgutman] 43032: - Fix memory leaks when reading strings and binary values from the registry - Fix list manipulation
by cgutman@svn.reactos.org
Author: cgutman Date: Sat Sep 12 04:26:33 2009 New Revision: 43032 URL:
http://svn.reactos.org/svn/reactos?rev=43032&view=rev
Log: - Fix memory leaks when reading strings and binary values from the registry - Fix list manipulation Modified: trunk/reactos/drivers/network/ndis/include/miniport.h trunk/reactos/drivers/network/ndis/ndis/config.c Modified: trunk/reactos/drivers/network/ndis/include/miniport.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/ndis/inclu…
============================================================================== --- trunk/reactos/drivers/network/ndis/include/miniport.h [iso-8859-1] (original) +++ trunk/reactos/drivers/network/ndis/include/miniport.h [iso-8859-1] Sat Sep 12 04:26:33 2009 @@ -41,7 +41,8 @@ } NDIS_M_DEVICE_BLOCK, *PNDIS_M_DEVICE_BLOCK; /* resources allocated on behalf on the miniport */ -#define MINIPORT_RESOURCE_TYPE_MEMORY 0 +#define MINIPORT_RESOURCE_TYPE_REGISTRY_DATA 0 +#define MINIPORT_RESOURCE_TYPE_MEMORY 1 typedef struct _MINIPORT_RESOURCE { LIST_ENTRY ListEntry; ULONG ResourceType; Modified: trunk/reactos/drivers/network/ndis/ndis/config.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/ndis/ndis/…
============================================================================== --- trunk/reactos/drivers/network/ndis/ndis/config.c [iso-8859-1] (original) +++ trunk/reactos/drivers/network/ndis/ndis/config.c [iso-8859-1] Sat Sep 12 04:26:33 2009 @@ -139,14 +139,43 @@ { PMINIPORT_CONFIGURATION_CONTEXT ConfigurationContext = (PMINIPORT_CONFIGURATION_CONTEXT)ConfigurationHandle; PMINIPORT_RESOURCE Resource; - - while(!IsListEmpty(&ConfigurationContext->ResourceListHead)) - { - Resource = (PMINIPORT_RESOURCE)ExInterlockedRemoveHeadList(&ConfigurationContext->ResourceListHead, &ConfigurationContext->ResourceLock); - if(Resource->ResourceType == MINIPORT_RESOURCE_TYPE_MEMORY) + PNDIS_CONFIGURATION_PARAMETER ParameterValue; + PLIST_ENTRY CurrentEntry; + + while((CurrentEntry = ExInterlockedRemoveHeadList(&ConfigurationContext->ResourceListHead, + &ConfigurationContext->ResourceLock)) != NULL) + { + Resource = CONTAINING_RECORD(CurrentEntry, MINIPORT_RESOURCE, ListEntry); + switch(Resource->ResourceType) { + case MINIPORT_RESOURCE_TYPE_REGISTRY_DATA: + ParameterValue = Resource->Resource; + + switch (ParameterValue->ParameterType) + { + case NdisParameterBinary: + ExFreePool(ParameterValue->ParameterData.BinaryData.Buffer); + break; + + case NdisParameterString: + case NdisParameterMultiString: + ExFreePool(ParameterValue->ParameterData.StringData.Buffer); + break; + + default: + break; + } + + /* Fall through to free NDIS_CONFIGURATION_PARAMETER struct */ + + case MINIPORT_RESOURCE_TYPE_MEMORY: NDIS_DbgPrint(MAX_TRACE,("freeing 0x%x\n", Resource->Resource)); ExFreePool(Resource->Resource); + break; + + default: + NDIS_DbgPrint(MIN_TRACE,("Unknown resource type: %d\n", Resource->ResourceType)); + break; } ExFreePool(Resource); @@ -359,7 +388,7 @@ return; } - MiniportResource->ResourceType = 0; + MiniportResource->ResourceType = MINIPORT_RESOURCE_TYPE_REGISTRY_DATA; MiniportResource->Resource = *ParameterValue; NDIS_DbgPrint(MID_TRACE,("inserting 0x%x into the resource list\n", @@ -398,7 +427,7 @@ return; } - MiniportResource->ResourceType = 0; + MiniportResource->ResourceType = MINIPORT_RESOURCE_TYPE_REGISTRY_DATA; MiniportResource->Resource = *ParameterValue; NDIS_DbgPrint(MID_TRACE,("inserting 0x%x into the resource list\n", MiniportResource->Resource)); ExInterlockedInsertTailList(&ConfigurationContext->ResourceListHead, @@ -434,7 +463,7 @@ return; } - MiniportResource->ResourceType = 0; + MiniportResource->ResourceType = MINIPORT_RESOURCE_TYPE_REGISTRY_DATA; MiniportResource->Resource = *ParameterValue; NDIS_DbgPrint(MID_TRACE,("inserting 0x%x into the resource list\n", MiniportResource->Resource)); ExInterlockedInsertTailList(&ConfigurationContext->ResourceListHead, @@ -578,7 +607,7 @@ } } - MiniportResource->ResourceType = MINIPORT_RESOURCE_TYPE_MEMORY; + MiniportResource->ResourceType = MINIPORT_RESOURCE_TYPE_REGISTRY_DATA; MiniportResource->Resource = *ParameterValue; ExInterlockedInsertTailList(&ConfigurationContext->ResourceListHead, &MiniportResource->ListEntry, &ConfigurationContext->ResourceLock); @@ -731,7 +760,7 @@ return; } - MiniportResource->ResourceType = 0; + MiniportResource->ResourceType = MINIPORT_RESOURCE_TYPE_MEMORY; MiniportResource->Resource = IntArray; NDIS_DbgPrint(MID_TRACE,("inserting 0x%x into the resource list\n", MiniportResource->Resource)); ExInterlockedInsertTailList(&ConfigurationContext->ResourceListHead, &MiniportResource->ListEntry, &ConfigurationContext->ResourceLock);
15 years, 3 months
1
0
0
0
[sginsberg] 43031: - ObpCreateDosDevicesDirectory: Check that allocation succeeded before dereference
by sginsberg@svn.reactos.org
Author: sginsberg Date: Sat Sep 12 00:31:46 2009 New Revision: 43031 URL:
http://svn.reactos.org/svn/reactos?rev=43031&view=rev
Log: - ObpCreateDosDevicesDirectory: Check that allocation succeeded before dereference Modified: trunk/reactos/ntoskrnl/ob/obname.c Modified: trunk/reactos/ntoskrnl/ob/obname.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ob/obname.c?rev=4…
============================================================================== --- trunk/reactos/ntoskrnl/ob/obname.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ob/obname.c [iso-8859-1] Sat Sep 12 00:31:46 2009 @@ -101,6 +101,7 @@ ObSystemDeviceMap = ExAllocatePoolWithTag(NonPagedPool, sizeof(*ObSystemDeviceMap), 'mDbO'); + if (!ObSystemDeviceMap) return STATUS_INSUFFICIENT_RESOURCES; RtlZeroMemory(ObSystemDeviceMap, sizeof(*ObSystemDeviceMap)); /* Return status */
15 years, 3 months
1
0
0
0
[sginsberg] 43030: - Remove accidental change from 42918
by sginsberg@svn.reactos.org
Author: sginsberg Date: Fri Sep 11 20:18:21 2009 New Revision: 43030 URL:
http://svn.reactos.org/svn/reactos?rev=43030&view=rev
Log: - Remove accidental change from 42918 Modified: trunk/rostests/tests/pseh2/psehtest.c Modified: trunk/rostests/tests/pseh2/psehtest.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/tests/pseh2/psehtest.c?re…
============================================================================== --- trunk/rostests/tests/pseh2/psehtest.c [iso-8859-1] (original) +++ trunk/rostests/tests/pseh2/psehtest.c [iso-8859-1] Fri Sep 11 20:18:21 2009 @@ -778,12 +778,6 @@ _SEH2_END; return ret == return_positive(); -} - -DEFINE_TEST(test_continue_execution_13) -{ - /* XXX */ - return 1; } //}}} @@ -2579,8 +2573,6 @@ USE_TEST(test_execute_handler_12), USE_TEST(test_continue_execution_12), - USE_TEST(test_continue_execution_13), - USE_TEST(test_leave_1), USE_TEST(test_leave_2), USE_TEST(test_leave_3),
15 years, 3 months
1
0
0
0
[jimtabor] 43029: - Quick implementation of RtlIsThreadWithinLoaderCallout.
by jimtabor@svn.reactos.org
Author: jimtabor Date: Fri Sep 11 09:12:30 2009 New Revision: 43029 URL:
http://svn.reactos.org/svn/reactos?rev=43029&view=rev
Log: - Quick implementation of RtlIsThreadWithinLoaderCallout. Modified: trunk/reactos/dll/ntdll/def/ntdll_i386.def trunk/reactos/dll/ntdll/ldr/startup.c trunk/reactos/dll/ntdll/rtl/libsupp.c trunk/reactos/include/ndk/rtlfuncs.h Modified: trunk/reactos/dll/ntdll/def/ntdll_i386.def URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/ntdll/def/ntdll_i386.d…
============================================================================== --- trunk/reactos/dll/ntdll/def/ntdll_i386.def [iso-8859-1] (original) +++ trunk/reactos/dll/ntdll/def/ntdll_i386.def [iso-8859-1] Fri Sep 11 09:12:30 2009 @@ -748,7 +748,7 @@ RtlIsGenericTableEmptyAvl@4 RtlIsNameLegalDOS8Dot3@12 RtlIsTextUnicode@12 -;RtlIsThreadWithinLoaderCallout +RtlIsThreadWithinLoaderCallout@0 RtlIsValidHandle@8 RtlIsValidIndexHandle@12 RtlLargeIntegerAdd@16 Modified: trunk/reactos/dll/ntdll/ldr/startup.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/ntdll/ldr/startup.c?re…
============================================================================== --- trunk/reactos/dll/ntdll/ldr/startup.c [iso-8859-1] (original) +++ trunk/reactos/dll/ntdll/ldr/startup.c [iso-8859-1] Fri Sep 11 09:12:30 2009 @@ -19,6 +19,7 @@ VOID NTAPI RtlpInitDeferedCriticalSection(VOID); NTSTATUS LdrpAttachThread(VOID); VOID RtlpInitializeVectoredExceptionHandling(VOID); +extern PTEB LdrpTopLevelDllBeingLoadedTeb; /* GLOBALS *******************************************************************/ @@ -470,6 +471,8 @@ ExeModule->SizeOfImage = LdrpGetResidentSize(NTHeaders); ExeModule->TimeDateStamp = NTHeaders->FileHeader.TimeDateStamp; + LdrpTopLevelDllBeingLoadedTeb = NtCurrentTeb(); + InsertHeadList(&Peb->Ldr->InLoadOrderModuleList, &ExeModule->InLoadOrderLinks); Modified: trunk/reactos/dll/ntdll/rtl/libsupp.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/ntdll/rtl/libsupp.c?re…
============================================================================== --- trunk/reactos/dll/ntdll/rtl/libsupp.c [iso-8859-1] (original) +++ trunk/reactos/dll/ntdll/rtl/libsupp.c [iso-8859-1] Fri Sep 11 09:12:30 2009 @@ -14,6 +14,7 @@ #include <debug.h> SIZE_T RtlpAllocDeallocQueryBufferSize = PAGE_SIZE; +PTEB LdrpTopLevelDllBeingLoadedTeb = NULL; /* FUNCTIONS ***************************************************************/ @@ -201,6 +202,13 @@ *StackBegin = (ULONG_PTR)NtCurrentTeb()->Tib.StackLimit; *StackEnd = (ULONG_PTR)NtCurrentTeb()->Tib.StackBase; return TRUE; +} + +BOOLEAN +NTAPI +RtlIsThreadWithinLoaderCallout(VOID) +{ + return LdrpTopLevelDllBeingLoadedTeb == NtCurrentTeb(); } /* RTL Atom Tables ************************************************************/ Modified: trunk/reactos/include/ndk/rtlfuncs.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/rtlfuncs.h?rev…
============================================================================== --- trunk/reactos/include/ndk/rtlfuncs.h [iso-8859-1] (original) +++ trunk/reactos/include/ndk/rtlfuncs.h [iso-8859-1] Fri Sep 11 09:12:30 2009 @@ -2013,6 +2013,11 @@ ); NTSYSAPI +BOOLEAN +NTAPI +RtlIsThreadWithinLoaderCallout(VOID); + +NTSYSAPI PRTL_USER_PROCESS_PARAMETERS NTAPI RtlNormalizeProcessParams(IN PRTL_USER_PROCESS_PARAMETERS ProcessParameters);
15 years, 3 months
1
0
0
0
[janderwald] 43028: - Fix build #2
by janderwald@svn.reactos.org
Author: janderwald Date: Fri Sep 11 08:53:50 2009 New Revision: 43028 URL:
http://svn.reactos.org/svn/reactos?rev=43028&view=rev
Log: - Fix build #2 Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/pool.cpp Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/pool.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
============================================================================== --- trunk/reactos/drivers/wdm/audio/backpln/portcls/pool.cpp [iso-8859-1] (original) +++ trunk/reactos/drivers/wdm/audio/backpln/portcls/pool.cpp [iso-8859-1] Fri Sep 11 08:53:50 2009 @@ -6,7 +6,7 @@ * PROGRAMMER: Johannes Anderwald */ -#include "private.h" +#include "private.hpp" PVOID AllocateItem(
15 years, 3 months
1
0
0
0
[janderwald] 43027: - Fix build
by janderwald@svn.reactos.org
Author: janderwald Date: Fri Sep 11 08:45:30 2009 New Revision: 43027 URL:
http://svn.reactos.org/svn/reactos?rev=43027&view=rev
Log: - Fix build Modified: trunk/reactos/include/ddk/kcom.h Modified: trunk/reactos/include/ddk/kcom.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/kcom.h?rev=430…
============================================================================== --- trunk/reactos/include/ddk/kcom.h [iso-8859-1] (original) +++ trunk/reactos/include/ddk/kcom.h [iso-8859-1] Fri Sep 11 08:45:30 2009 @@ -236,7 +236,7 @@ #if defined(_SYS_GUID_OPERATOR_EQ_) #define _GUID_OPERATORS_ -#pragma message("WARNING: Using system operator==/!= for GUIDs") +//#pragma message("WARNING: Using system operator==/!= for GUIDs") #endif #ifndef _GUID_OPERATORS_
15 years, 3 months
1
0
0
0
← Newer
1
...
19
20
21
22
23
24
25
26
27
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
Results per page:
10
25
50
100
200