- Only tell the caller how much we sent/received if it completed successfully
- Set SO_DONTROUTE on accepted sockets too
- Disable the core routing code
- Make our MSS calculation much better by sharing the existing code
svn path=/trunk/; revision=48628
- Fix to PpSetCustomTargetEvent(), not to make caller wait forever in case it provided an event it waits for
- Patch by Pierre Schweitzer
svn path=/trunk/; revision=48626
- Prevent multiple wakeups for the same event which caused nasty problems for the SEL_FIN event because we dereferenced our connection context 3 times which not only caused the connection endpoint to be freed while holding its spin lock but made the reference count negative
[TCPIP]
- Disassociate the address file from the connection endpoint before dereferencing/closing it to avoid a double dereference of the address file (not as harmful in this case as in the connection endpoint case)
[IP]
- Dereference the connection endpoint again if it was associated with an address file as the connection endpoint to fix a reference leak
svn path=/trunk/; revision=48624
Add bugs_regtest. This can be used to create testcases / regression tests for already fixed bugs. I added a first test for bug 3481
svn path=/trunk/; revision=48615
- Rewrite MiFindEmptyAddressRangeDownTree. The old implementation's "most awesome loop" duplicated both the initialization and the interation steps. It was also overcomplicated. The new implementation additionally returns the parent for the following table insertion, so this doesnt need to be done in an extra search. The return value is changed from NTSTATUS to TABLE_SEARCH_RESULT
- Modify MiInsertNode to accept a parent and TABLE_SEARCH_RESULT instead of searching for a free location.
- Modify MiCreatePebOrTeb to make use of the new features
- Handle failed allocation of the PEB/TEB
- Fixes a failed assertion that Olaf got
- I tested this code quite some time and no problems were found
svn path=/trunk/; revision=48606
Move the allocation of the vis region of the DC to a later position, so that all mandatory fields are initialized before we try to delete the DC in failure case. Fixes yet another possible crash.
svn path=/trunk/; revision=48604
- Read the IP information from the interface key inside the Tcpip service key (confirmed on XP)
- Fix a logic error in my code (no idea how I missed it)
- Restores static IP functionality (still waiting on janderwald to fix netcfgx's DNS value writing)
svn path=/trunk/; revision=48602
- GetTextExtentExPointI and GetTextExtentPointI take an array of glyph indices, not characters. Pass a flag GTEF_INDICES (This is a reactos specific definition and not exactly like on Windows XP, but the real names/values are undocumented and this is the easiest way.) to NtGdiGetTextExtent/NtGdiGetTextExtentExW and handle this flag in TextIntGetTextExtentPoint to account for this.
Fixes bug 3481
svn path=/trunk/; revision=48597
- When doing a cleanup for a DC, check, if the default brushes are set, before dereferencing them. Fixes a possible kernel mode crash.
- Remove some obsolete casts
svn path=/trunk/; revision=48595
- Write the DNS servers in a REG_MULTI_SZ value
[IPHLPAPI]
- Rewrite the registry reading code
- Use HeapFree to free memory from the allocated from heap
svn path=/trunk/; revision=48593
Use the object type index, not the shifted full object type to decide what to do with an object in NtGdiDeleteObjectApp. Fixes leaking derived types such as pens.
svn path=/trunk/; revision=48582
- Allocate the DCs prgnVis in DC_AllocDC, instead of "on demand" in GdiSelectVisRgn and properly handle failure case. This fixes a possible crash, when running out of gdi handles.
svn path=/trunk/; revision=48579
- co_IntTranslateMouseMessage: properly initialize *HitTest and only send WM_NCHITTEST when the message is going to be removed
- co_IntPeekMessage: Prevent possible use of uninitialized HitTest by ProcessMouseMessage()
- Patch by Jan Roeloffzen [jroeloffzen at hotmail dot com]
- Fixes bug 2139
svn path=/trunk/; revision=48576
- The trailing NULL is NOT included in the string length
- IopNotifyPlugPlayNotification needs a pointer to an actual GUID not a UNICODE_STRING
- The Power Manager can now see ACPI power devices again
- ROS will now do a graceful shutdown and power off if the power button is pressed and ACPI is enabled
svn path=/trunk/; revision=48574
- Do all of the work inside the DPC so we don't have IRQL issues when entering the memory manager
- This is a slight hack but we can be assured that data won't be over 24 bits unless somebody wants to push the power/sleep button over 16 million times
svn path=/trunk/; revision=48573
- Shutdown the system if we receive a SYS_BUTTON_POWER event
- Register for GUID_DEVICE_LID arrival events so we can receive lid events
svn path=/trunk/; revision=48572
- Add a special case to IopInitializeDevice for raw devices
- Call IopInitializeDevice to set up our device node and ready it to start
- Fixes assertions hit by ACPI and PCIX
svn path=/trunk/; revision=48570
- Disable routing because oskit needs to let our code do that
- Comment out the ACK hack and restore the default BSD behavior
svn path=/trunk/; revision=48569
- For SetTimer nIDEvent can be 0 in which case return 1. Zero still needs to be used for nIDEvent when killing the timer. Fixes bug 5553.
- Modify windowless timers to use IDEvent values decrementing from the max number of windowless timers vice incrementing from 1. Done to match windows behavior.
svn path=/trunk/; revision=48568
Fix handling of next instruction in kdbg.
Patch by Daniel Zimmermann, modified by Aleksey Bragin
See issue #4457 for more details.
svn path=/trunk/; revision=48566
- Implement support for /BURNMEMORY option.
- Don't stop boot on bad memory type
Patch by Jay Smith, modified by Aleksey, even more modified by me.
See issue #4957 for more details.
svn path=/trunk/; revision=48565
- Allocate memory for the TCP table properly
- Only netstat -a should show UDP connections
- Patch by Jan Roeloffzen [jroeloffzen at hotmail dot com]
svn path=/trunk/; revision=48564
- Copy our TCP table into the caller's buffer if we actually get one (not yet!)
- Return ERROR_NO_DATA if we fail to get anything from TCP/IP
- Fixes bug #4185
svn path=/trunk/; revision=48563
- Initialize the Parent member of the new Vad to NULL. This also initializes the Balance to 0 aka RtlBalancedAvlTree
Should fix the failed assertion that randomly occurs.
svn path=/trunk/; revision=48562
- Fix a major bug in socket closure. Prior to this, a socket with pending IRPs that could not be satisfied when the socket was closed would be destroyed without completing the pending requests. Now, we check all of our IRP queues if we get a SEL_FIN signal and kill all the requests that cannot be satisfied immediately.
- Maybe it's just me but Firefox 2 seems much more responsive after this fix (like actually usable!)
svn path=/trunk/; revision=48561
Make our FAT driver PNP aware.
On PNP requests it should handle, it will return STATUS_NOT_IMPLEMENTED.
On the others, it will pass them to lower driver.
This is the first step outside the kernel into getting IoGetRelatedTargetDevice (and so notifications) working.
It doesn't work at the moment, as class2 doesn't handle PNP.
[NTOSKRNL]
Some fixes to IRP cancelation process:
- Renamed IopRemoveThreadIrp() to IopDisassociateThreadIrp() to match Windows 2k3
- Made dead IRP global, to make its debug easier.
- IopDisassociateThreadIrp(), Handle dead IRP at dispatch level, using IoCompletionLock.
- IopDisassociateThreadIrp(), Use the proper error code to write the entry to logs.
- IoCancelIrp(), removed non needed ASSERT, which is even not present on Windows, removed corresponding var as well.
- IoCancelIrp(), fixed parameters to KeBugCheckEx() call.
- IoCancelThreadIo() is pageable.
- IoCancelThreadIo() under Windows isn't using given thread, but using current. Do the same here.
All that stuff doesn't fix bug #5550, it comes from outside.
Patch by Pierre Schweitzer, modified by me to make it compile. If it breaks anything, don't blame me!
svn path=/trunk/; revision=48560
- Simplified IopGetRelatedTargetDevice implementation
- Added notification in case of success in NtSetVolumeInformationFile()
Patch by Pierre Schweitzer
svn path=/trunk/; revision=48559
- Fixed IoGetRequestorProcess, IoGetRequestorProcessId, IoGetRequestorSessionId
- Pass user buffer in NtNotifyChangeDirectoryFile
- Fixed magic value in IoGetPagingIoPriority
Patch by Pierre Schweitzer
svn path=/trunk/; revision=48557