- Only wait to bind to a port if INADDR_ANY is specified
- Fixes EADDRNOTAVAIL when running Firefox and ws2_32_winetest sock (which now gets further but still doesn't complete)
svn path=/trunk/; revision=52511
- We really do need to count the outstanding send IRP in our pending send count (with a detailed explanation of the reason included in the code)
- Wait on an outstanding send IRP to dispatch the disconnect
- When we receive a FIN from the other side and our receive comes back with 0 data, only close receiving on the socket because sending is still legal in this state
- Fixes many bugs on the ws2_32_winetest sock and likely lots of other partial disconnect related stuff
- Retest network related hanging bugs after this please (ftp dir hang is fixed)
svn path=/trunk/; revision=52510
Fix KiConvertToGuiThread on MSVC builds, by using a raw assembly function instead of a (broken) inline asembly function
MSVC built kernel boots further now.
svn path=/trunk/; revision=52509
- Change an ASSERT to a KeBugCheck, since the assertion can fail for any invalid memory access and this is not an internal Mm failure.
- Remove 2 cases, that "Should NEVER happen on ARM3!!!", but can very well happen.
- Do NOT make the code cleaner, by releasing the PFN lock in the same function that acquires it, but keep it 2 functions down. This is because it *SHOULD* be that way, since some internal undocumented functions, that we do not implement but that are (theoretically) called from here, also do release the PFN lock. Thanks Alex for explaining this.
svn path=/trunk/; revision=52507
- Remove socket state checks from OskitTCPRecv and OskitTCPSend
- Oskit already returns ESHUTDOWN when sosend is called on a socket with SS_CANTSENDMORE so it is unnecessary
- The check in OskitTCPRecv broke returning success and 0 bytes on a graceful shutdown (We got the FIN, set SS_CANTRCVMORE, signaled the connection, tried to read and failed with ESHUTDOWN instead of succeeding with 0 bytes)
svn path=/trunk/; revision=52505
- Signal readable when read is closed and writeable when write is closed
- This seems counterintuitive on the surface but signaling the socket in this way ensures that pending reads and writes are cancelled if either side shuts down send/receive
- Graceful close (recv() returns 0 bytes and FD_CLOSE is signaled when we receive a FIN) works much better
svn path=/trunk/; revision=52504
- Implement support for timing out disconnects
- Add debug prints for oskittcp errors
[MSAFD]
- Set a disconnect timeout value that actually makes sense (1 second vs 100 nanoseconds)
svn path=/trunk/; revision=52503
- Fix binding to an unspecified port on a connect so that it works reliably by asking the TCP library for a free port instead of assuming that one we have is free
- Fix binding to an unspecified port on a listen which previously would result in the address file not having information stored about the port number assigned
- Fix a nasty bug which resulted in us binding to an arbitrary port during a connect even when the client wanted a specific port
- Revert the hack that partially fixed this before
svn path=/trunk/; revision=52501
- Really fix loading the MSVC built kernel, by moving the FAT sector buffer beyond the area for freeldr.sys
- Load segment only in one place
svn path=/trunk/; revision=52500
- Set SO_REUSEPORT on new sockets to allow binding to ports shared by sockets which are closed according to upper layers of tcpip but still pending a close in oskittcp (see the BSD try-10-times hack)
- Fill all members of the sockaddr_in struct when fulfilling a query accept request
svn path=/trunk/; revision=52498
Add some code that does ... nothing, but fixes 2nd stage boot with msvc. To figure out why this is needed, is left as an excercise to the reader :)
svn path=/trunk/; revision=52496
- Fix several bugs related to the FD_WRITE event
- We would not set the sendable poll state if the socket had data waiting to be sent even if there was buffer space
- We did not set the poll state after performing a send
- We did not clear the sendable poll state if we ran out of buffer space
svn path=/trunk/; revision=52492
Remove the old boot method.
Its not needed anymore, since booting with more than 4GB works fine with the new method now. It didn't work anyway since the neccessary code in the kernel has been #if'ed out in r49445
svn path=/trunk/; revision=52491
Revert r52482, it didn't really work. Instead grab the StallScaleFactor from the PCR and use this as a base for the repeat count.
svn path=/trunk/; revision=52487
Use KeStallExecutionProcessor, once its ready (after KdDebuggerInitialize1 was called) for the receive timeout. Repeat 100 times with 1 ms wait. This seems to work quite well, but might be tuned for better values.
svn path=/trunk/; revision=52482
On amd64 builds, where we don't have underscored symbols, create an alias fabs for the function _fabs, since we cannot create fabs as a label directly
svn path=/trunk/; revision=52481
change the way import libs are created for MSVC. Since we don't use underscores in symbols on other architectures than x86, its not possible to create labels like "div", since it conflicts with the opcode. Therefore add a prefix and redirect all exports to the prefixed version when building an importlib
svn path=/trunk/; revision=52476
- unify spec2def and add_importlib_target, thanks to cmake_parse_arguments.
- also generate stub files only when necessary.
- better precompiled header support, commented out as it wasn't tested on any other machine than mine, and it depends on cmake features which don't exist yet.
For now only for gcc toolchain
svn path=/trunk/; revision=52460