Author: tfaber
Date: Mon Oct 3 14:40:39 2011
New Revision: 53955
URL:
http://svn.reactos.org/svn/reactos?rev=53955&view=rev
Log:
[MSAFD/FORMATTING]
- Trim trailing whitespace
Modified:
trunk/reactos/dll/win32/msafd/misc/dllmain.c
trunk/reactos/dll/win32/msafd/misc/event.c
trunk/reactos/dll/win32/msafd/misc/helpers.c
trunk/reactos/dll/win32/msafd/misc/sndrcv.c
trunk/reactos/dll/win32/msafd/misc/stubs.c
trunk/reactos/dll/win32/msafd/msafd.h
Modified: trunk/reactos/dll/win32/msafd/misc/dllmain.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msafd/misc/dllma…
==============================================================================
--- trunk/reactos/dll/win32/msafd/misc/dllmain.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/msafd/misc/dllmain.c [iso-8859-1] Mon Oct 3 14:40:39 2011
@@ -43,8 +43,8 @@
* RETURNS:
* Created socket, or INVALID_SOCKET if it could not be created
*/
-SOCKET
-WSPAPI
+SOCKET
+WSPAPI
WSPSocket(int AddressFamily,
int SocketType,
int Protocol,
@@ -148,8 +148,8 @@
EABuffer->NextEntryOffset = 0;
EABuffer->Flags = 0;
EABuffer->EaNameLength = AFD_PACKET_COMMAND_LENGTH;
- RtlCopyMemory (EABuffer->EaName,
- AfdCommand,
+ RtlCopyMemory (EABuffer->EaName,
+ AfdCommand,
AFD_PACKET_COMMAND_LENGTH + 1);
EABuffer->EaValueLength = SizeOfPacket;
@@ -157,7 +157,7 @@
AfdPacket = (PAFD_CREATE_PACKET)(EABuffer->EaName + EABuffer->EaNameLength +
1);
AfdPacket->SizeOfTransportName = TransportName.Length;
RtlCopyMemory (AfdPacket->TransportName,
- TransportName.Buffer,
+ TransportName.Buffer,
TransportName.Length + sizeof(WCHAR));
AfdPacket->GroupID = g;
@@ -483,7 +483,7 @@
break;
}
- /*
+ /*
* We have to execute a sleep, so it's kind of like
* a block. If the socket is Nonblock, we cannot
* go on since asyncronous operation is expected
@@ -498,7 +498,7 @@
}
/* Now we can sleep, and decrement the linger wait */
- /*
+ /*
* FIXME: It seems Windows does some funky acceleration
* since the waiting seems to be longer and longer. I
* don't think this improves performance so much, so we
@@ -515,7 +515,7 @@
{
DisconnectInfo.Timeout = RtlConvertLongToLargeInteger(0);
DisconnectInfo.DisconnectType = LingerWait < 0 ? AFD_DISCONNECT_SEND :
AFD_DISCONNECT_ABORT;
-
+
if (((DisconnectInfo.DisconnectType & AFD_DISCONNECT_SEND) &&
(!Socket->SharedData.SendShutdown)) ||
((DisconnectInfo.DisconnectType & AFD_DISCONNECT_ABORT) &&
(!Socket->SharedData.ReceiveShutdown)))
{
@@ -530,7 +530,7 @@
sizeof(DisconnectInfo),
NULL,
0);
-
+
/* Wait for return */
if (Status == STATUS_PENDING)
{
@@ -709,7 +709,7 @@
return MsafdReturnWithErrno ( Status, lpErrno, 0, NULL );
}
-int
+int
WSPAPI
WSPListen(SOCKET Handle,
int Backlog,
@@ -813,7 +813,7 @@
BOOL HandleCounted;
LARGE_INTEGER Timeout;
- /* Find out how many sockets we have, and how large the buffer needs
+ /* Find out how many sockets we have, and how large the buffer needs
* to be */
HandleCount = ( readfds ? readfds->fd_count : 0 ) +
@@ -830,7 +830,7 @@
PollBufferSize = sizeof(*PollInfo) + ((HandleCount - 1) * sizeof(AFD_HANDLE));
- AFD_DbgPrint(MID_TRACE,("HandleCount: %u BufferSize: %u\n",
+ AFD_DbgPrint(MID_TRACE,("HandleCount: %u BufferSize: %u\n",
HandleCount, PollBufferSize));
/* Convert Timeout to NT Format */
@@ -844,7 +844,7 @@
{
Timeout = RtlEnlargedIntegerMultiply
((timeout->tv_sec * 1000) + (timeout->tv_usec / 1000), -10000);
- /* Negative timeouts are illegal. Since the kernel represents an
+ /* Negative timeouts are illegal. Since the kernel represents an
* incremental timeout as a negative number, we check for a positive
* result.
*/
@@ -1010,7 +1010,7 @@
{
switch( IOSB.Status )
{
- case STATUS_SUCCESS:
+ case STATUS_SUCCESS:
case STATUS_TIMEOUT:
*lpErrno = 0;
break;
@@ -1027,7 +1027,7 @@
}
SOCKET
-WSPAPI
+WSPAPI
WSPAccept(SOCKET Handle,
struct sockaddr *SocketAddress,
int *SocketAddressLength,
@@ -1128,7 +1128,7 @@
if (lpfnCondition != NULL)
{
- if ((Socket->SharedData.ServiceFlags1 & XP1_CONNECT_DATA) != 0)
+ if ((Socket->SharedData.ServiceFlags1 & XP1_CONNECT_DATA) != 0)
{
/* Find out how much data is pending */
PendingAcceptData.SequenceNumber = ListenReceiveData->SequenceNumber;
@@ -1221,8 +1221,8 @@
}
/* Set up Address in SOCKADDR Format */
- RtlCopyMemory (RemoteAddress,
- &ListenReceiveData->Address.Address[0].AddressType,
+ RtlCopyMemory (RemoteAddress,
+ &ListenReceiveData->Address.Address[0].AddressType,
sizeof(*RemoteAddress));
/* Build Caller ID */
@@ -1244,7 +1244,7 @@
}
CalleeData.buf = CalleeDataBuffer;
CalleeData.len = 4096;
- }
+ }
else
{
/* Nothing */
@@ -1369,7 +1369,7 @@
MsafdReturnWithErrno( Status, lpErrno, 0, NULL );
return INVALID_SOCKET;
}
-
+
AcceptSocketInfo = GetSocketStructure(AcceptSocket);
if (!AcceptSocketInfo)
{
@@ -1378,7 +1378,7 @@
MsafdReturnWithErrno( STATUS_INVALID_CONNECTION, lpErrno, 0, NULL );
return INVALID_SOCKET;
}
-
+
AcceptSocketInfo->SharedData.State = SocketConnected;
/* Return Address in SOCKADDR FORMAT */
@@ -1420,7 +1420,7 @@
}
int
-WSPAPI
+WSPAPI
WSPConnect(SOCKET Handle,
const struct sockaddr * SocketAddress,
int SocketAddressLength,
@@ -1472,8 +1472,8 @@
MsafdReturnWithErrno( STATUS_INSUFFICIENT_RESOURCES, lpErrno, 0, NULL );
return INVALID_SOCKET;
}
- Socket->HelperData->WSHGetWildcardSockaddr (Socket->HelperContext,
- BindAddress,
+ Socket->HelperData->WSHGetWildcardSockaddr (Socket->HelperContext,
+ BindAddress,
&BindAddressLength);
/* Bind it */
if (WSPBind(Handle, BindAddress, BindAddressLength, lpErrno) == SOCKET_ERROR)
@@ -1516,8 +1516,8 @@
SocketAddress->sa_data,
SocketAddressLength - sizeof(SocketAddress->sa_family));
- /*
- * Disable FD_WRITE and FD_CONNECT
+ /*
+ * Disable FD_WRITE and FD_CONNECT
* The latter fixes a race condition where the FD_CONNECT is re-enabled
* at the end of this function right after the Async Thread disables it.
* This should only happen at the *next* WSPConnect
@@ -1652,7 +1652,7 @@
return MsafdReturnWithErrno( Status, lpErrno, 0, NULL );
}
int
-WSPAPI
+WSPAPI
WSPShutdown(SOCKET Handle,
int HowTo,
LPINT lpErrno)
@@ -1772,7 +1772,7 @@
}
/* Allocate a buffer for the address */
- TdiAddressSize =
+ TdiAddressSize =
sizeof(TRANSPORT_ADDRESS) + Socket->SharedData.SizeOfLocalAddress;
TdiAddress = HeapAlloc(GlobalHeap, 0, TdiAddressSize);
@@ -1812,7 +1812,7 @@
{
Name->sa_family = SocketAddress->Address[0].AddressType;
RtlCopyMemory (Name->sa_data,
- SocketAddress->Address[0].Address,
+ SocketAddress->Address[0].Address,
SocketAddress->Address[0].AddressLength);
*NameLength = Socket->SharedData.SizeOfLocalAddress;
AFD_DbgPrint (MID_TRACE, ("NameLength %d Address: %x Port %x\n",
@@ -1917,7 +1917,7 @@
{
Name->sa_family = SocketAddress->Address[0].AddressType;
RtlCopyMemory (Name->sa_data,
- SocketAddress->Address[0].Address,
+ SocketAddress->Address[0].Address,
SocketAddress->Address[0].AddressLength);
*NameLength = Socket->SharedData.SizeOfRemoteAddress;
AFD_DbgPrint (MID_TRACE, ("NameLength %d Address: %s Port %x\n",
@@ -1962,7 +1962,7 @@
*lpErrno = WSAENOTSOCK;
return SOCKET_ERROR;
}
-
+
*lpcbBytesReturned = 0;
switch( dwIoControlCode )
@@ -2011,7 +2011,7 @@
lpOverlapped,
lpCompletionRoutine,
(LPBOOL)&NeedsCompletion);
-
+
if (*lpErrno != NO_ERROR)
return SOCKET_ERROR;
else
@@ -2110,7 +2110,7 @@
*lpErrno = WSAEINVAL;
return SOCKET_ERROR;
}
-
+
if (*OptionLength < BufferSize)
{
*lpErrno = WSAEFAULT;
@@ -2296,11 +2296,11 @@
-int
-GetSocketInformation(PSOCKET_INFORMATION Socket,
- ULONG AfdInformationClass,
+int
+GetSocketInformation(PSOCKET_INFORMATION Socket,
+ ULONG AfdInformationClass,
PBOOLEAN Boolean OPTIONAL,
- PULONG Ulong OPTIONAL,
+ PULONG Ulong OPTIONAL,
PLARGE_INTEGER LargeInteger OPTIONAL)
{
IO_STATUS_BLOCK IOSB;
@@ -2363,11 +2363,11 @@
}
-int
-SetSocketInformation(PSOCKET_INFORMATION Socket,
+int
+SetSocketInformation(PSOCKET_INFORMATION Socket,
ULONG AfdInformationClass,
PBOOLEAN Boolean OPTIONAL,
- PULONG Ulong OPTIONAL,
+ PULONG Ulong OPTIONAL,
PLARGE_INTEGER LargeInteger OPTIONAL)
{
IO_STATUS_BLOCK IOSB;
@@ -2469,11 +2469,11 @@
/* Create Context */
ContextData.SharedData = Socket->SharedData;
ContextData.SizeOfHelperData = 0;
- RtlCopyMemory (&ContextData.LocalAddress,
- Socket->LocalAddress,
+ RtlCopyMemory (&ContextData.LocalAddress,
+ Socket->LocalAddress,
Socket->SharedData.SizeOfLocalAddress);
- RtlCopyMemory (&ContextData.RemoteAddress,
- Socket->RemoteAddress,
+ RtlCopyMemory (&ContextData.RemoteAddress,
+ Socket->RemoteAddress,
Socket->SharedData.SizeOfRemoteAddress);
/* Send IOCTL */
@@ -2527,7 +2527,7 @@
AFD_DbgPrint(MID_TRACE,("Failed to create completion port\n"));
return FALSE;
}
- /* Protect Handle */
+ /* Protect Handle */
HandleFlags.ProtectFromClose = TRUE;
HandleFlags.Inherit = FALSE;
Status = NtSetInformationObject(SockAsyncCompletionPort,
@@ -2570,7 +2570,7 @@
SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_ABOVE_NORMAL);
/* Do a KQUEUE/WorkItem Style Loop, thanks to IoCompletion Ports */
- do
+ do
{
Status = NtRemoveIoCompletion (SockAsyncCompletionPort,
(PVOID*)&AsyncCompletionRoutine,
@@ -2628,8 +2628,8 @@
NULL,
0);
- /*
- * Now Set up the Completion Port Information
+ /*
+ * Now Set up the Completion Port Information
* This means that whenever a Poll is finished, the routine will be executed
*/
CompletionInfo.Port = SockAsyncCompletionPort;
@@ -2873,7 +2873,7 @@
BOOL FreeContext = TRUE;
PSOCKET_INFORMATION Socket;
- /* Get the Socket */
+ /* Get the Socket */
Socket = AsyncData->ParentSocket;
/* If someone closed it, stop the function */
@@ -2925,7 +2925,7 @@
AsyncData = HeapAlloc(GetProcessHeap(), 0, sizeof(ASYNC_DATA));
if (!AsyncData) return;
- /* Create the Asynch Thread if Needed */
+ /* Create the Asynch Thread if Needed */
SockCreateOrReferenceAsyncThread();
/* Increase the sequence number to stop anything else */
Modified: trunk/reactos/dll/win32/msafd/misc/event.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msafd/misc/event…
==============================================================================
--- trunk/reactos/dll/win32/msafd/misc/event.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/msafd/misc/event.c [iso-8859-1] Mon Oct 3 14:40:39 2011
@@ -12,12 +12,12 @@
#include <msafd.h>
-int
-WSPAPI
+int
+WSPAPI
WSPEventSelect(
- SOCKET Handle,
- WSAEVENT hEventObject,
- long lNetworkEvents,
+ SOCKET Handle,
+ WSAEVENT hEventObject,
+ long lNetworkEvents,
LPINT lpErrno)
{
IO_STATUS_BLOCK IOSB;
@@ -133,9 +133,9 @@
INT
WSPAPI
WSPEnumNetworkEvents(
- IN SOCKET Handle,
- IN WSAEVENT hEventObject,
- OUT LPWSANETWORKEVENTS lpNetworkEvents,
+ IN SOCKET Handle,
+ IN WSAEVENT hEventObject,
+ OUT LPWSANETWORKEVENTS lpNetworkEvents,
OUT LPINT lpErrno)
{
AFD_ENUM_NETWORK_EVENTS_INFO EnumReq;
@@ -193,7 +193,7 @@
return MsafdReturnWithErrno(Status, lpErrno, 0, NULL);
AFD_DbgPrint(MID_TRACE,("Closed event\n"));
- AFD_DbgPrint(MID_TRACE,("About to touch struct at %x (%d)\n",
+ AFD_DbgPrint(MID_TRACE,("About to touch struct at %x (%d)\n",
lpNetworkEvents, sizeof(*lpNetworkEvents)));
lpNetworkEvents->lNetworkEvents = 0;
@@ -221,13 +221,13 @@
lpNetworkEvents->iErrorCode[FD_ACCEPT_BIT] =
TranslateNtStatusError(EnumReq.EventStatus[FD_ACCEPT_BIT]);
}
- if (EnumReq.PollEvents &
+ if (EnumReq.PollEvents &
(AFD_EVENT_CONNECT | AFD_EVENT_CONNECT_FAIL)) {
lpNetworkEvents->lNetworkEvents |= FD_CONNECT;
lpNetworkEvents->iErrorCode[FD_CONNECT_BIT] =
TranslateNtStatusError(EnumReq.EventStatus[FD_CONNECT_BIT]);
}
- if (EnumReq.PollEvents &
+ if (EnumReq.PollEvents &
(AFD_EVENT_DISCONNECT | AFD_EVENT_ABORT | AFD_EVENT_CLOSE)) {
lpNetworkEvents->lNetworkEvents |= FD_CLOSE;
lpNetworkEvents->iErrorCode[FD_CLOSE_BIT] =
TranslateNtStatusError(EnumReq.EventStatus[FD_CLOSE_BIT]);
Modified: trunk/reactos/dll/win32/msafd/misc/helpers.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msafd/misc/helpe…
==============================================================================
--- trunk/reactos/dll/win32/msafd/misc/helpers.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/msafd/misc/helpers.c [iso-8859-1] Mon Oct 3 14:40:39 2011
@@ -15,16 +15,16 @@
LIST_ENTRY HelperDLLDatabaseListHead;
-INT
+INT
SockGetTdiName(
- PINT AddressFamily,
- PINT SocketType,
- PINT Protocol,
- GROUP Group,
- DWORD Flags,
- PUNICODE_STRING TransportName,
- PVOID *HelperDllContext,
- PHELPER_DATA *HelperDllData,
+ PINT AddressFamily,
+ PINT SocketType,
+ PINT Protocol,
+ GROUP Group,
+ DWORD Flags,
+ PUNICODE_STRING TransportName,
+ PVOID *HelperDllContext,
+ PHELPER_DATA *HelperDllData,
PDWORD Events)
{
PHELPER_DATA HelperData;
@@ -38,15 +38,15 @@
/* Check in our Current Loaded Helpers */
for (Helpers = SockHelpersListHead.Flink;
- Helpers != &SockHelpersListHead;
+ Helpers != &SockHelpersListHead;
Helpers = Helpers->Flink ) {
HelperData = CONTAINING_RECORD(Helpers, HELPER_DATA, Helpers);
/* See if this Mapping works for us */
- if (SockIsTripleInMapping (HelperData->Mapping,
- *AddressFamily,
- *SocketType,
+ if (SockIsTripleInMapping (HelperData->Mapping,
+ *AddressFamily,
+ *SocketType,
*Protocol)) {
/* Call the Helper Dll function get the Transport Name */
@@ -86,16 +86,16 @@
AFD_DbgPrint(MIN_TRACE, ("Can't get transport list\n"));
return Status;
}
-
+
/* Loop through each transport until we find one that can satisfy us */
- for (Transport = Transports;
- *Transports != 0;
+ for (Transport = Transports;
+ *Transports != 0;
Transport += wcslen(Transport) + 1) {
AFD_DbgPrint(MID_TRACE, ("Transport: %S\n", Transports));
/* See what mapping this Transport supports */
Status = SockLoadTransportMapping(Transport, &Mapping);
-
+
/* Check for error */
if (Status) {
AFD_DbgPrint(MIN_TRACE, ("Can't get mapping\n"));
@@ -146,7 +146,7 @@
/*HeapFree(GlobalHeap, 0, Mapping);*/
return NO_ERROR;
}
-
+
HeapFree(GlobalHeap, 0, Mapping);
}
HeapFree(GlobalHeap, 0, Transports);
@@ -155,7 +155,7 @@
INT
SockLoadTransportMapping(
- PWSTR TransportName,
+ PWSTR TransportName,
PWINSOCK_MAPPING *Mapping)
{
PWSTR TransportKey;
@@ -211,7 +211,7 @@
/* Read the Mapping */
Status = RegQueryValueExW(KeyHandle, L"Mapping", NULL, NULL,
(LPBYTE)*Mapping, &MappingSize);
-
+
/* Check for error */
if (Status) {
AFD_DbgPrint(MIN_TRACE, ("Error reading transport mapping
registry\n"));
@@ -224,7 +224,7 @@
return 0;
}
-INT
+INT
SockLoadTransportList(
PWSTR *TransportList)
{
@@ -233,12 +233,12 @@
LONG Status;
AFD_DbgPrint(MID_TRACE,("Called\n"));
-
+
/* Open the Transports Key */
Status = RegOpenKeyExW (HKEY_LOCAL_MACHINE,
-
L"SYSTEM\\CurrentControlSet\\Services\\Winsock\\Parameters",
- 0,
- KEY_READ,
+
L"SYSTEM\\CurrentControlSet\\Services\\Winsock\\Parameters",
+ 0,
+ KEY_READ,
&KeyHandle);
/* Check for error */
@@ -246,7 +246,7 @@
AFD_DbgPrint(MIN_TRACE, ("Error reading transport list registry\n"));
return WSAEINVAL;
}
-
+
/* Get the Transport List Size */
Status = RegQueryValueExW(KeyHandle,
L"Transports",
@@ -271,11 +271,11 @@
}
/* Get the Transports */
- Status = RegQueryValueExW (KeyHandle,
- L"Transports",
- NULL,
- NULL,
- (LPBYTE)*TransportList,
+ Status = RegQueryValueExW (KeyHandle,
+ L"Transports",
+ NULL,
+ NULL,
+ (LPBYTE)*TransportList,
&TransportListSize);
/* Check for error */
@@ -292,8 +292,8 @@
INT
SockLoadHelperDll(
- PWSTR TransportName,
- PWINSOCK_MAPPING Mapping,
+ PWSTR TransportName,
+ PWINSOCK_MAPPING Mapping,
PHELPER_DATA *HelperDllData)
{
PHELPER_DATA HelperData;
@@ -303,7 +303,7 @@
HKEY KeyHandle;
ULONG DataSize;
LONG Status;
-
+
/* Allocate space for the Helper Structure and TransportName */
HelperData = HeapAlloc(GlobalHeap, 0, sizeof(*HelperData) + (wcslen(TransportName) +
1) * sizeof(WCHAR));
@@ -312,10 +312,10 @@
AFD_DbgPrint(MIN_TRACE, ("Buffer allocation failed\n"));
return WSAEINVAL;
}
-
+
/* Allocate Space for the Helper DLL Key */
HelperKey = HeapAlloc(GlobalHeap, 0, (54 + wcslen(TransportName)) * sizeof(WCHAR));
-
+
/* Check for error */
if (HelperKey == NULL) {
AFD_DbgPrint(MIN_TRACE, ("Buffer allocation failed\n"));
@@ -339,37 +339,37 @@
HeapFree(GlobalHeap, 0, HelperData);
return WSAEINVAL;
}
-
+
/* Read Size of SockAddr Structures */
DataSize = sizeof(HelperData->MinWSAddressLength);
HelperData->MinWSAddressLength = 16;
- RegQueryValueExW (KeyHandle,
- L"MinSockaddrLength",
- NULL,
- NULL,
- (LPBYTE)&HelperData->MinWSAddressLength,
+ RegQueryValueExW (KeyHandle,
+ L"MinSockaddrLength",
+ NULL,
+ NULL,
+ (LPBYTE)&HelperData->MinWSAddressLength,
&DataSize);
DataSize = sizeof(HelperData->MinWSAddressLength);
HelperData->MaxWSAddressLength = 16;
- RegQueryValueExW (KeyHandle,
- L"MaxSockaddrLength",
- NULL,
- NULL,
- (LPBYTE)&HelperData->MaxWSAddressLength,
+ RegQueryValueExW (KeyHandle,
+ L"MaxSockaddrLength",
+ NULL,
+ NULL,
+ (LPBYTE)&HelperData->MaxWSAddressLength,
&DataSize);
/* Size of TDI Structures */
HelperData->MinTDIAddressLength = HelperData->MinWSAddressLength + 6;
HelperData->MaxTDIAddressLength = HelperData->MaxWSAddressLength + 6;
-
+
/* Read Delayed Acceptance Setting */
DataSize = sizeof(DWORD);
HelperData->UseDelayedAcceptance = FALSE;
- RegQueryValueExW (KeyHandle,
- L"UseDelayedAcceptance",
- NULL,
- NULL,
- (LPBYTE)&HelperData->UseDelayedAcceptance,
+ RegQueryValueExW (KeyHandle,
+ L"UseDelayedAcceptance",
+ NULL,
+ NULL,
+ (LPBYTE)&HelperData->UseDelayedAcceptance,
&DataSize);
/* Allocate Space for the Helper DLL Names */
@@ -383,7 +383,7 @@
}
FullHelperDllName = HeapAlloc(GlobalHeap, 0, 512);
-
+
/* Check for error */
if (FullHelperDllName == NULL) {
AFD_DbgPrint(MIN_TRACE, ("Buffer allocation failed\n"));
@@ -394,11 +394,11 @@
/* Get the name of the Helper DLL*/
DataSize = 512;
- Status = RegQueryValueExW (KeyHandle,
- L"HelperDllName",
- NULL,
- NULL,
- (LPBYTE)HelperDllName,
+ Status = RegQueryValueExW (KeyHandle,
+ L"HelperDllName",
+ NULL,
+ NULL,
+ (LPBYTE)HelperDllName,
&DataSize);
/* Check for error */
@@ -412,7 +412,7 @@
/* Get the Full name, expanding Environment Strings */
ExpandEnvironmentStringsW (HelperDllName,
- FullHelperDllName,
+ FullHelperDllName,
256);
/* Load the DLL */
@@ -443,7 +443,7 @@
HelperData->WSHNotify = (PWSH_NOTIFY)
GetProcAddress(HelperData->hInstance, "WSHNotify");
HelperData->WSHGetSocketInformation = (PWSH_GET_SOCKET_INFORMATION)
- GetProcAddress(HelperData->hInstance,
+ GetProcAddress(HelperData->hInstance,
"WSHGetSocketInformation");
HelperData->WSHSetSocketInformation = (PWSH_SET_SOCKET_INFORMATION)
GetProcAddress(HelperData->hInstance,
@@ -484,14 +484,14 @@
BOOL
SockIsTripleInMapping(
- PWINSOCK_MAPPING Mapping,
- INT AddressFamily,
- INT SocketType,
+ PWINSOCK_MAPPING Mapping,
+ INT AddressFamily,
+ INT SocketType,
INT Protocol)
{
/* The Windows version returns more detailed information on which of the 3 parameters
failed...we should do this later */
ULONG Row;
-
+
AFD_DbgPrint(MID_TRACE,("Called, Mapping rows = %d\n", Mapping->Rows));
/* Loop through Mapping to Find a matching one */
@@ -503,8 +503,8 @@
(INT)Mapping->Mapping[Row].Protocol));
/* Check of all three values Match */
- if (((INT)Mapping->Mapping[Row].AddressFamily == AddressFamily) &&
- ((INT)Mapping->Mapping[Row].SocketType == SocketType) &&
+ if (((INT)Mapping->Mapping[Row].AddressFamily == AddressFamily) &&
+ ((INT)Mapping->Mapping[Row].SocketType == SocketType) &&
((INT)Mapping->Mapping[Row].Protocol == Protocol)) {
AFD_DbgPrint(MID_TRACE,("Found\n"));
return TRUE;
Modified: trunk/reactos/dll/win32/msafd/misc/sndrcv.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msafd/misc/sndrc…
==============================================================================
--- trunk/reactos/dll/win32/msafd/misc/sndrcv.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/msafd/misc/sndrcv.c [iso-8859-1] Mon Oct 3 14:40:39 2011
@@ -55,7 +55,7 @@
}
}
- /* Create the Asynch Thread if Needed */
+ /* Create the Asynch Thread if Needed */
SockCreateOrReferenceAsyncThread();
/* Open a Handle to AFD's Async Helper */
@@ -91,7 +91,7 @@
}
-int
+int
WSPAPI
WSPRecv(SOCKET Handle,
LPWSABUF lpBuffers,
@@ -167,7 +167,7 @@
APCFunction = NULL;
Event = SockEvent;
IOSB = &DummyIOSB;
- }
+ }
else
{
if (lpCompletionRoutine == NULL)
@@ -225,7 +225,7 @@
case STATUS_RECEIVE_EXPEDITED:
*ReceiveFlags = MSG_OOB;
break;
- case STATUS_RECEIVE_PARTIAL_EXPEDITED:
+ case STATUS_RECEIVE_PARTIAL_EXPEDITED:
*ReceiveFlags = MSG_PARTIAL | MSG_OOB;
break;
case STATUS_RECEIVE_PARTIAL:
@@ -246,18 +246,18 @@
return MsafdReturnWithErrno ( Status, lpErrno, IOSB->Information,
lpNumberOfBytesRead );
}
-int
-WSPAPI
-WSPRecvFrom(SOCKET Handle,
- LPWSABUF lpBuffers,
- DWORD dwBufferCount,
- LPDWORD lpNumberOfBytesRead,
- LPDWORD ReceiveFlags,
- struct sockaddr *SocketAddress,
- int *SocketAddressLength,
- LPWSAOVERLAPPED lpOverlapped,
- LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine,
- LPWSATHREADID lpThreadId,
+int
+WSPAPI
+WSPRecvFrom(SOCKET Handle,
+ LPWSABUF lpBuffers,
+ DWORD dwBufferCount,
+ LPDWORD lpNumberOfBytesRead,
+ LPDWORD ReceiveFlags,
+ struct sockaddr *SocketAddress,
+ int *SocketAddressLength,
+ LPWSAOVERLAPPED lpOverlapped,
+ LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine,
+ LPWSATHREADID lpThreadId,
LPINT lpErrno )
{
PIO_STATUS_BLOCK IOSB;
@@ -277,7 +277,7 @@
*lpErrno = WSAENOTSOCK;
return SOCKET_ERROR;
}
-
+
if (!(Socket->SharedData.ServiceFlags1 & XP1_CONNECTIONLESS))
{
/* Call WSPRecv for a non-datagram socket */
@@ -313,7 +313,7 @@
}
else
{
- if (*ReceiveFlags & MSG_OOB)
+ if (*ReceiveFlags & MSG_OOB)
{
RecvInfo.TdiFlags |= TDI_RECEIVE_EXPEDITED;
}
@@ -331,7 +331,7 @@
/* Verifiy if we should use APC */
- if (lpOverlapped == NULL)
+ if (lpOverlapped == NULL)
{
/* Not using Overlapped structure, so use normal blocking on event */
APCContext = NULL;
@@ -390,7 +390,7 @@
{
case STATUS_RECEIVE_EXPEDITED: *ReceiveFlags = MSG_OOB;
break;
- case STATUS_RECEIVE_PARTIAL_EXPEDITED:
+ case STATUS_RECEIVE_PARTIAL_EXPEDITED:
*ReceiveFlags = MSG_PARTIAL | MSG_OOB;
break;
case STATUS_RECEIVE_PARTIAL:
@@ -413,7 +413,7 @@
int
-WSPAPI
+WSPAPI
WSPSend(SOCKET Handle,
LPWSABUF lpBuffers,
DWORD dwBufferCount,
@@ -536,7 +536,7 @@
return MsafdReturnWithErrno( Status, lpErrno, IOSB->Information,
lpNumberOfBytesSent );
}
-int
+int
WSPAPI
WSPSendTo(SOCKET Handle,
LPWSABUF lpBuffers,
@@ -570,7 +570,7 @@
*lpErrno = WSAENOTSOCK;
return SOCKET_ERROR;
}
-
+
if (!(Socket->SharedData.ServiceFlags1 & XP1_CONNECTIONLESS))
{
/* Use WSPSend for connection-oriented sockets */
Modified: trunk/reactos/dll/win32/msafd/misc/stubs.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msafd/misc/stubs…
==============================================================================
--- trunk/reactos/dll/win32/msafd/misc/stubs.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/msafd/misc/stubs.c [iso-8859-1] Mon Oct 3 14:40:39 2011
@@ -69,9 +69,9 @@
BOOL
WSPAPI
WSPGetQOSByName(
- IN SOCKET s,
- IN OUT LPWSABUF lpQOSName,
- OUT LPQOS lpQOS,
+ IN SOCKET s,
+ IN OUT LPWSABUF lpQOSName,
+ OUT LPQOS lpQOS,
OUT LPINT lpErrno)
{
UNIMPLEMENTED
Modified: trunk/reactos/dll/win32/msafd/msafd.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msafd/msafd.h?re…
==============================================================================
--- trunk/reactos/dll/win32/msafd/msafd.h [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/msafd/msafd.h [iso-8859-1] Mon Oct 3 14:40:39 2011
@@ -148,17 +148,17 @@
INT
WSPAPI
WSPAsyncSelect(
- IN SOCKET s,
- IN HWND hWnd,
- IN UINT wMsg,
- IN LONG lEvent,
+ IN SOCKET s,
+ IN HWND hWnd,
+ IN UINT wMsg,
+ IN LONG lEvent,
OUT LPINT lpErrno);
INT
WSPAPI WSPBind(
IN SOCKET s,
- IN CONST SOCKADDR *name,
- IN INT namelen,
+ IN CONST SOCKADDR *name,
+ IN INT namelen,
OUT LPINT lpErrno);
INT
@@ -200,9 +200,9 @@
INT
WSPAPI
WSPEnumNetworkEvents(
- IN SOCKET s,
- IN WSAEVENT hEventObject,
- OUT LPWSANETWORKEVENTS lpNetworkEvents,
+ IN SOCKET s,
+ IN WSAEVENT hEventObject,
+ OUT LPWSANETWORKEVENTS lpNetworkEvents,
OUT LPINT lpErrno);
INT
@@ -226,17 +226,17 @@
INT
WSPAPI
WSPGetPeerName(
- IN SOCKET s,
- OUT LPSOCKADDR name,
- IN OUT LPINT namelen,
+ IN SOCKET s,
+ OUT LPSOCKADDR name,
+ IN OUT LPINT namelen,
OUT LPINT lpErrno);
BOOL
WSPAPI
WSPGetQOSByName(
- IN SOCKET s,
- IN OUT LPWSABUF lpQOSName,
- OUT LPQOS lpQOS,
+ IN SOCKET s,
+ IN OUT LPWSABUF lpQOSName,
+ OUT LPQOS lpQOS,
OUT LPINT lpErrno);
INT
@@ -443,7 +443,7 @@
PVOID ThreadParam
);
-VOID
+VOID
SockProcessAsyncSelect(
PSOCKET_INFORMATION Socket,
PASYNC_DATA AsyncData
@@ -476,7 +476,7 @@
);
typedef VOID (*PASYNC_COMPLETION_ROUTINE)(PVOID Context, PIO_STATUS_BLOCK
IoStatusBlock);
-
+
DWORD
FORCEINLINE
MsafdReturnWithErrno(NTSTATUS Status,