Author: fireball
Date: Fri Aug 14 21:36:55 2009
New Revision: 42668
URL:
http://svn.reactos.org/svn/reactos?rev=42668&view=rev
Log:
- Merge 42350-42376.
Added:
branches/arwinss/reactos/include/ddk/swenum.h
- copied unchanged from r42375, trunk/reactos/include/ddk/swenum.h
Modified:
branches/arwinss/reactos/ (props changed)
branches/arwinss/reactos/ReactOS-generic.rbuild
branches/arwinss/reactos/base/applications/network/ping/ping.c
branches/arwinss/reactos/base/applications/paint/drawing.c
branches/arwinss/reactos/base/applications/paint/winproc.c
branches/arwinss/reactos/base/setup/reactos/reactos.c
branches/arwinss/reactos/dll/cpl/mmsys/volume.c
branches/arwinss/reactos/dll/win32/gdiplus/graphicspath.c
branches/arwinss/reactos/dll/win32/kernel32/kernel32.rbuild
branches/arwinss/reactos/drivers/network/afd/afd/tdi.c
branches/arwinss/reactos/drivers/network/dd/pcnet/pcnet.c
branches/arwinss/reactos/drivers/network/tcpip/tcpip/fileobjs.c
branches/arwinss/reactos/drivers/storage/class/ramdisk/ramdisk.c
branches/arwinss/reactos/include/ddk/strmini.h
branches/arwinss/reactos/lib/3rdparty/mingw/gs_support.c
branches/arwinss/reactos/lib/drivers/ip/network/address.c
branches/arwinss/reactos/lib/drivers/ip/network/interface.c
branches/arwinss/reactos/lib/drivers/ip/network/neighbor.c
branches/arwinss/reactos/lib/drivers/ip/transport/datagram/datagram.c
branches/arwinss/reactos/lib/drivers/sound/mmebuddy/auxiliary/auxMessage.c
branches/arwinss/reactos/lib/drivers/sound/mmebuddy/midi/midMessage.c
branches/arwinss/reactos/lib/drivers/sound/mmebuddy/midi/modMessage.c
branches/arwinss/reactos/lib/drivers/sound/mmebuddy/mixer/mxdMessage.c
branches/arwinss/reactos/lib/drivers/sound/mmebuddy/wave/header.c
branches/arwinss/reactos/lib/drivers/sound/mmebuddy/wave/widMessage.c
branches/arwinss/reactos/lib/drivers/sound/mmebuddy/wave/wodMessage.c
branches/arwinss/reactos/lib/sdk/crt/mbstring/mbslwr.c
branches/arwinss/reactos/lib/sdk/crt/stdio/stat64.c
branches/arwinss/reactos/ntoskrnl/ke/freeldr.c
branches/arwinss/reactos/ntoskrnl/ke/i386/kiinit.c
branches/arwinss/reactos/tools/rsym/rsym.c (props changed)
branches/arwinss/reactos/tools/rsym/rsym.h (props changed)
branches/arwinss/reactos/tools/rsym/rsym.mak (props changed)
branches/arwinss/reactos/tools/rsym/rsym_common.c (props changed)
Propchange: branches/arwinss/reactos/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Aug 14 21:36:55 2009
@@ -1,1 +1,1 @@
-/trunk/reactos:42000-42350,42376,42419
+/trunk/reactos:42000-42376,42419
Modified: branches/arwinss/reactos/ReactOS-generic.rbuild
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/ReactOS-generic…
==============================================================================
--- branches/arwinss/reactos/ReactOS-generic.rbuild [iso-8859-1] (original)
+++ branches/arwinss/reactos/ReactOS-generic.rbuild [iso-8859-1] Fri Aug 14 21:36:55 2009
@@ -95,6 +95,7 @@
<group compilerset="msc">
<define name="inline" compiler="cc">__inline</define>
+ <define name="__STDC__" compiler="cc">1</define>
<compilerflag>/Zl</compilerflag>
<compilerflag>/Zi</compilerflag>
<compilerflag>/W1</compilerflag>
Modified: branches/arwinss/reactos/base/applications/network/ping/ping.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/base/applicatio…
==============================================================================
--- branches/arwinss/reactos/base/applications/network/ping/ping.c [iso-8859-1]
(original)
+++ branches/arwinss/reactos/base/applications/network/ping/ping.c [iso-8859-1] Fri Aug 14
21:36:55 2009
@@ -437,6 +437,14 @@
return FALSE;
}
+ if (from->sin_addr.s_addr != Target.sin_addr.s_addr)
+ {
+#ifndef NDEBUG
+ printf("Bad source address (%s should be %s)\n",
inet_ntoa(from->sin_addr), inet_ntoa(Target.sin_addr));
+#endif /* !NDEBUG */
+ return FALSE;
+ }
+
QueryTime(&LargeTime);
RelativeTime.QuadPart = (LargeTime.QuadPart - Icmp->Timestamp.QuadPart);
@@ -543,44 +551,40 @@
Timeval.tv_sec = Timeout / 1000;
Timeval.tv_usec = Timeout % 1000;
- Status = select(0, &Fds, NULL, NULL, &Timeval);
- if ((Status != SOCKET_ERROR) && (Status != 0))
- {
- Length = sizeof(From);
- Status = recvfrom(IcmpSock, Buffer, Size, 0, &From, &Length);
+ do {
+ Status = select(0, &Fds, NULL, NULL, &Timeval);
+ if ((Status != SOCKET_ERROR) && (Status != 0))
+ {
+ Length = sizeof(From);
+ Status = recvfrom(IcmpSock, Buffer, Size, 0, &From, &Length);
#ifndef NDEBUG
- printf("Received packet\n");
- DisplayBuffer(Buffer, Status);
- printf("\n");
+ printf("Received packet\n");
+ DisplayBuffer(Buffer, Status);
+ printf("\n");
#endif /* !NDEBUG */
- }
- else
- LostCount++;
- if (Status == SOCKET_ERROR)
- {
- if (WSAGetLastError() != WSAETIMEDOUT)
- {
- printf("Could not receive data (%d).\n", WSAGetLastError());
+ }
+ else
+ LostCount++;
+ if (Status == SOCKET_ERROR)
+ {
+ if (WSAGetLastError() != WSAETIMEDOUT)
+ {
+ printf("Could not receive data (%d).\n", WSAGetLastError());
+ GlobalFree(Buffer);
+ return FALSE;
+ }
+ Status = 0;
+ }
+
+ if (Status == 0)
+ {
+ printf("Request timed out.\n");
GlobalFree(Buffer);
- return FALSE;
- }
- Status = 0;
- }
-
- if (Status == 0)
- {
- printf("Request timed out.\n");
- GlobalFree(Buffer);
- return TRUE;
- }
-
- if (!DecodeResponse(Buffer, Status, (PSOCKADDR_IN)&From))
- {
- /* FIXME: Wait again as it could be another ICMP message type */
- printf("Request timed out (incomplete datagram received).\n");
- LostCount++;
- }
+ return TRUE;
+ }
+
+ } while (!DecodeResponse(Buffer, Status, (PSOCKADDR_IN)&From));
GlobalFree(Buffer);
return TRUE;
Modified: branches/arwinss/reactos/base/applications/paint/drawing.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/base/applicatio…
==============================================================================
--- branches/arwinss/reactos/base/applications/paint/drawing.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/base/applications/paint/drawing.c [iso-8859-1] Fri Aug 14
21:36:55 2009
@@ -81,12 +81,13 @@
void Bezier(HDC hdc, POINT p1, POINT p2, POINT p3, POINT p4, int color, int thickness)
{
+ HPEN oldPen;
POINT fourPoints[4];
fourPoints[0] = p1;
fourPoints[1] = p2;
fourPoints[2] = p3;
fourPoints[3] = p4;
- HPEN oldPen = SelectObject(hdc, CreatePen(PS_SOLID, thickness, color));
+ oldPen = SelectObject(hdc, CreatePen(PS_SOLID, thickness, color));
PolyBezier(hdc, fourPoints, 4);
DeleteObject(SelectObject(hdc, oldPen));
}
Modified: branches/arwinss/reactos/base/applications/paint/winproc.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/base/applicatio…
==============================================================================
--- branches/arwinss/reactos/base/applications/paint/winproc.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/base/applications/paint/winproc.c [iso-8859-1] Fri Aug 14
21:36:55 2009
@@ -313,8 +313,9 @@
if (hwnd==hwndMiniature)
{
long mclient[4];
+ HDC hdc;
GetClientRect(hwndMiniature, (LPRECT)&mclient);
- HDC hdc = GetDC(hwndMiniature);
+ hdc = GetDC(hwndMiniature);
BitBlt(hdc, -min(imgXRes*GetScrollPos(hScrollbox, SB_HORZ)/10000,
imgXRes-mclient[2]),
-min(imgYRes*GetScrollPos(hScrollbox, SB_VERT)/10000,
imgYRes-mclient[3]), imgXRes, imgYRes, hDrawingDC, 0, 0, SRCCOPY);
ReleaseDC(hwndMiniature, hdc);
Modified: branches/arwinss/reactos/base/setup/reactos/reactos.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/base/setup/reac…
==============================================================================
--- branches/arwinss/reactos/base/setup/reactos/reactos.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/base/setup/reactos/reactos.c [iso-8859-1] Fri Aug 14 21:36:55
2009
@@ -364,8 +364,9 @@
if (tindex != CB_ERR)
{
+ WORD LangID;
SetupData.SelectedLangId = SendMessage(hList, CB_GETITEMDATA,
(WPARAM) tindex, (LPARAM) 0);
- WORD LangID =
_tcstol(SetupData.pLanguages[SetupData.SelectedLangId].LangId, NULL, 16);
+ LangID =
_tcstol(SetupData.pLanguages[SetupData.SelectedLangId].LangId, NULL, 16);
SetThreadLocale(MAKELCID(LangID, SORT_DEFAULT));
// FIXME: need to reload all resource to force
// the new language setting
Modified: branches/arwinss/reactos/dll/cpl/mmsys/volume.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/cpl/mmsys/v…
==============================================================================
--- branches/arwinss/reactos/dll/cpl/mmsys/volume.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/dll/cpl/mmsys/volume.c [iso-8859-1] Fri Aug 14 21:36:55 2009
@@ -292,9 +292,9 @@
LPARAM lParam)
{
static IMGINFO ImgInfo;
+ PGLOBAL_DATA pGlobalData;
UNREFERENCED_PARAMETER(lParam);
UNREFERENCED_PARAMETER(wParam);
- PGLOBAL_DATA pGlobalData;
pGlobalData = (PGLOBAL_DATA)GetWindowLongPtr(hwndDlg, DWLP_USER);
Modified: branches/arwinss/reactos/dll/win32/gdiplus/graphicspath.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/gdipl…
==============================================================================
--- branches/arwinss/reactos/dll/win32/gdiplus/graphicspath.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/dll/win32/gdiplus/graphicspath.c [iso-8859-1] Fri Aug 14
21:36:55 2009
@@ -775,7 +775,7 @@
TRACE("(%p, %d, %d, %d, %d, %.2f, %.2f)\n",
path, x, y, width, height, startAngle, sweepAngle);
- return GdipAddPathPieI(path, (REAL)x, (REAL)y, (REAL)width, (REAL)height, startAngle,
sweepAngle);
+ return GdipAddPathPie(path, (REAL)x, (REAL)y, (REAL)width, (REAL)height, startAngle,
sweepAngle);
}
GpStatus WINGDIPAPI GdipAddPathPolygon(GpPath *path, GDIPCONST GpPointF *points, INT
count)
Modified: branches/arwinss/reactos/dll/win32/kernel32/kernel32.rbuild
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/kerne…
==============================================================================
--- branches/arwinss/reactos/dll/win32/kernel32/kernel32.rbuild [iso-8859-1] (original)
+++ branches/arwinss/reactos/dll/win32/kernel32/kernel32.rbuild [iso-8859-1] Fri Aug 14
21:36:55 2009
@@ -1,155 +1,144 @@
<?xml version="1.0"?>
<!DOCTYPE group SYSTEM "../../../tools/rbuild/project.dtd">
-<group>
- <module name="kernel32_base" type="objectlibrary"
crt="dll">
- <include base="kernel32_base">.</include>
- <include base="kernel32_base">include</include>
- <include base="ReactOS">include/reactos/subsys</include>
- <define name="_KERNEL32_" />
- <redefine name="_WIN32_WINNT">0x0600</redefine>
- <define name="__NO_CTYPE_INLINES" />
- <define name="NTDDI_VERSION">0x05020100</define>
- <dependency>errcodes</dependency>
- <!-- See
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38269
- <pch>k32.h</pch>
- -->
- <group compilerset="gcc">
- <!-- See
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38054#c7 -->
- <compilerflag>-fno-unit-at-a-time</compilerflag>
- <compilerflag compiler="cxx">-fno-exceptions</compilerflag>
- <compilerflag compiler="cxx">-fno-rtti</compilerflag>
- </group>
- <directory name="debug">
- <file>debugger.c</file>
- <file>output.c</file>
- </directory>
- <directory name="except">
- <file>except.c</file>
- </directory>
- <directory name="file">
- <file>backup.c</file>
- <file>bintype.c</file>
- <file>cnotify.c</file>
- <file>copy.c</file>
- <file>create.c</file>
- <file>curdir.c</file>
- <file>delete.c</file>
- <file>deviceio.c</file>
- <file>dir.c</file>
- <file>dosdev.c</file>
- <file>file.c</file>
- <file>find.c</file>
- <file>hardlink.c</file>
- <file>iocompl.c</file>
- <file>lfile.c</file>
- <file>lock.c</file>
- <file>mailslot.c</file>
- <file>move.c</file>
- <file>npipe.c</file>
- <file>pipe.c</file>
- <file>rw.c</file>
- <file>tape.c</file>
- <file>volume.c</file>
- </directory>
- <directory name="mem">
- <file>global.c</file>
- <file>heap.c</file>
- <file>isbad.c</file>
- <file>local.c</file>
- <file>procmem.c</file>
- <file>resnotify.c</file>
- <file>section.c</file>
- <file>virtual.c</file>
- </directory>
- <directory name="misc">
- <file>actctx.c</file>
- <file>atom.c</file>
- <file>chartype.c</file>
- <file>collation.c</file>
- <file>casemap.c</file>
- <file>comm.c</file>
- <file>commdcb.c</file>
- <file>computername.c</file>
- <file>console.c</file>
- <file>dllmain.c</file>
- <file>env.c</file>
- <file>error.c</file>
- <file>errormsg.c</file>
- <file>fold.c</file>
- <file>handle.c</file>
- <file>lang.c</file>
- <file>ldr.c</file>
- <file>lzexpand.c</file>
- <file>muldiv.c</file>
- <file>nls.c</file>
- <file>perfcnt.c</file>
- <file>power.c</file>
- <file>recovery.c</file>
- <file>res.c</file>
- <file>sortkey.c</file>
- <file>stubs.c</file>
- <file>sysinfo.c</file>
- <file>time.c</file>
- <file>timerqueue.c</file>
- <file>toolhelp.c</file>
- <file>version.c</file>
- </directory>
- <directory name="process">
- <file>cmdline.c</file>
- <file>procsup.c</file>
- <file>job.c</file>
- <file>proc.c</file>
- <file>session.c</file>
- </directory>
- <directory name="string">
- <file>lstring.c</file>
- </directory>
- <directory name="synch">
- <file>condvar.c</file>
- <file>critical.c</file>
- <file>event.c</file>
- <file>mutex.c</file>
- <file>sem.c</file>
- <file>timer.c</file>
- <file>wait.c</file>
- </directory>
- <directory name="thread">
- <file>fiber.c</file>
- <file>fls.c</file>
- <file>thread.c</file>
- <file>tls.c</file>
- </directory>
- <directory name="misc">
- <file>lcformat.c</file>
- <file>profile.c</file>
- <file>utils.c</file>
- </directory>
- <directory name="thread">
- <if property="ARCH" value="i386">
- <directory name="i386">
- <file>fiber.S</file>
- <file>thread.S</file>
- </directory>
- </if>
- </directory>
-
- <directory name="misc">
- <file>icustubs.cpp</file>
- </directory>
- <library>normalize</library>
- </module>
- <module name="kernel32" type="win32dll"
baseaddress="${BASEADDRESS_KERNEL32}" installbase="system32"
installname="kernel32.dll" crt="dll">
- <importlibrary definition="kernel32.pspec" />
- <include base="kernel32">.</include>
- <include base="kernel32"
root="intermediate">.</include>
- <include base="kernel32">include</include>
- <library>kernel32_base</library>
- <library>wine</library>
- <library>pseh</library>
- <library>win32ksys</library>
-
- <file>kernel32.rc</file>
-
- <library>ntdll</library>
- </module>
-</group>
+<module name="kernel32" type="win32dll" crt="dll"
baseaddress="${BASEADDRESS_KERNEL32}" installbase="system32"
installname="kernel32.dll">
+ <importlibrary definition="kernel32.pspec" />
+ <include base="kernel32">.</include>
+ <include base="kernel32"
root="intermediate">.</include>
+ <include base="kernel32">include</include>
+ <include base="ReactOS">include/reactos/subsys</include>
+ <library>wine</library>
+ <library>pseh</library>
+ <library>normalize</library>
+ <library>ntdll</library>
+ <define name="_KERNEL32_" />
+ <redefine name="_WIN32_WINNT">0x0600</redefine>
+ <define name="__NO_CTYPE_INLINES" />
+ <define name="NTDDI_VERSION">0x05020100</define>
+ <dependency>errcodes</dependency>
+ <!-- See
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38269
+ <pch>k32.h</pch>
+ -->
+ <group compilerset="gcc">
+ <!-- See
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38054#c7 -->
+ <compilerflag>-fno-unit-at-a-time</compilerflag>
+ <compilerflag compiler="cxx">-fno-exceptions</compilerflag>
+ <compilerflag compiler="cxx">-fno-rtti</compilerflag>
+ </group>
+ <directory name="debug">
+ <file>debugger.c</file>
+ <file>output.c</file>
+ </directory>
+ <directory name="except">
+ <file>except.c</file>
+ </directory>
+ <directory name="file">
+ <file>backup.c</file>
+ <file>bintype.c</file>
+ <file>cnotify.c</file>
+ <file>copy.c</file>
+ <file>create.c</file>
+ <file>curdir.c</file>
+ <file>delete.c</file>
+ <file>deviceio.c</file>
+ <file>dir.c</file>
+ <file>dosdev.c</file>
+ <file>file.c</file>
+ <file>find.c</file>
+ <file>hardlink.c</file>
+ <file>iocompl.c</file>
+ <file>lfile.c</file>
+ <file>lock.c</file>
+ <file>mailslot.c</file>
+ <file>move.c</file>
+ <file>npipe.c</file>
+ <file>pipe.c</file>
+ <file>rw.c</file>
+ <file>tape.c</file>
+ <file>volume.c</file>
+ </directory>
+ <directory name="mem">
+ <file>global.c</file>
+ <file>heap.c</file>
+ <file>isbad.c</file>
+ <file>local.c</file>
+ <file>procmem.c</file>
+ <file>resnotify.c</file>
+ <file>section.c</file>
+ <file>virtual.c</file>
+ </directory>
+ <directory name="misc">
+ <file>actctx.c</file>
+ <file>atom.c</file>
+ <file>chartype.c</file>
+ <file>collation.c</file>
+ <file>casemap.c</file>
+ <file>comm.c</file>
+ <file>commdcb.c</file>
+ <file>computername.c</file>
+ <file>console.c</file>
+ <file>dllmain.c</file>
+ <file>env.c</file>
+ <file>error.c</file>
+ <file>errormsg.c</file>
+ <file>fold.c</file>
+ <file>handle.c</file>
+ <file>lang.c</file>
+ <file>ldr.c</file>
+ <file>lzexpand.c</file>
+ <file>muldiv.c</file>
+ <file>nls.c</file>
+ <file>perfcnt.c</file>
+ <file>power.c</file>
+ <file>recovery.c</file>
+ <file>res.c</file>
+ <file>sortkey.c</file>
+ <file>stubs.c</file>
+ <file>sysinfo.c</file>
+ <file>time.c</file>
+ <file>timerqueue.c</file>
+ <file>toolhelp.c</file>
+ <file>version.c</file>
+ </directory>
+ <directory name="process">
+ <file>cmdline.c</file>
+ <file>procsup.c</file>
+ <file>job.c</file>
+ <file>proc.c</file>
+ <file>session.c</file>
+ </directory>
+ <directory name="string">
+ <file>lstring.c</file>
+ </directory>
+ <directory name="synch">
+ <file>condvar.c</file>
+ <file>critical.c</file>
+ <file>event.c</file>
+ <file>mutex.c</file>
+ <file>sem.c</file>
+ <file>timer.c</file>
+ <file>wait.c</file>
+ </directory>
+ <directory name="thread">
+ <file>fiber.c</file>
+ <file>fls.c</file>
+ <file>thread.c</file>
+ <file>tls.c</file>
+ </directory>
+ <directory name="misc">
+ <file>lcformat.c</file>
+ <file>profile.c</file>
+ <file>utils.c</file>
+ </directory>
+ <directory name="thread">
+ <if property="ARCH" value="i386">
+ <directory name="i386">
+ <file>fiber.S</file>
+ <file>thread.S</file>
+ </directory>
+ </if>
+ </directory>
+ <directory name="misc">
+ <file>icustubs.cpp</file>
+ </directory>
+ <file>kernel32.rc</file>
+</module>
Modified: branches/arwinss/reactos/drivers/network/afd/afd/tdi.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/drivers/network…
==============================================================================
--- branches/arwinss/reactos/drivers/network/afd/afd/tdi.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/drivers/network/afd/afd/tdi.c [iso-8859-1] Fri Aug 14
21:36:55 2009
@@ -154,23 +154,6 @@
}
-NTSTATUS TdiCloseDevice(
- HANDLE Handle,
- PFILE_OBJECT FileObject)
-{
- AFD_DbgPrint(MAX_TRACE, ("Called. Handle (0x%X) FileObject (0x%X)\n",
- Handle, FileObject));
-
- if (Handle)
- ZwClose(Handle);
-
- if (FileObject)
- ObDereferenceObject(FileObject);
-
- return STATUS_SUCCESS;
-}
-
-
NTSTATUS TdiOpenAddressFile(
PUNICODE_STRING DeviceName,
PTRANSPORT_ADDRESS Name,
Modified: branches/arwinss/reactos/drivers/network/dd/pcnet/pcnet.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/drivers/network…
==============================================================================
--- branches/arwinss/reactos/drivers/network/dd/pcnet/pcnet.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/drivers/network/dd/pcnet/pcnet.c [iso-8859-1] Fri Aug 14
21:36:55 2009
@@ -1283,7 +1283,7 @@
{
ULONG Data;
- NdisRawWritePortUshort(Adapter->PortOffset + RAP, BCR4);
+ NdisRawWritePortUshort(Adapter->PortOffset + RAP, BCR6);
NdisRawReadPortUshort(Adapter->PortOffset + BDP, &Data);
return Data & BCR6_LEDOUT ? 100 : 10;
Modified: branches/arwinss/reactos/drivers/network/tcpip/tcpip/fileobjs.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/drivers/network…
==============================================================================
--- branches/arwinss/reactos/drivers/network/tcpip/tcpip/fileobjs.c [iso-8859-1]
(original)
+++ branches/arwinss/reactos/drivers/network/tcpip/tcpip/fileobjs.c [iso-8859-1] Fri Aug
14 21:36:55 2009
@@ -98,7 +98,8 @@
(Current->Protocol == SearchContext->Protocol) &&
(AddrIsEqual(IPAddress, SearchContext->Address) ||
AddrIsBroadcast(IPAddress, SearchContext->Address) ||
- AddrIsUnspecified(IPAddress))) {
+ AddrIsUnspecified(IPAddress) ||
+ AddrIsUnspecified(SearchContext->Address))) {
/* We've found a match */
Found = TRUE;
break;
@@ -139,25 +140,161 @@
}
-VOID DeleteAddress(PADDRESS_FILE AddrFile)
-/*
- * FUNCTION: Deletes an address file object
- * ARGUMENTS:
- * AddrFile = Pointer to address file object to delete
- */
+/*
+ * FUNCTION: Open an address file object
+ * ARGUMENTS:
+ * Request = Pointer to TDI request structure for this request
+ * Address = Pointer to address to be opened
+ * Protocol = Protocol on which to open the address
+ * Options = Pointer to option buffer
+ * RETURNS:
+ * Status of operation
+ */
+NTSTATUS FileOpenAddress(
+ PTDI_REQUEST Request,
+ PTA_IP_ADDRESS Address,
+ USHORT Protocol,
+ PVOID Options)
+{
+ IPv4_RAW_ADDRESS IPv4Address;
+ PADDRESS_FILE AddrFile;
+
+ TI_DbgPrint(MID_TRACE, ("Called (Proto %d).\n", Protocol));
+
+ AddrFile = exAllocatePool(NonPagedPool, sizeof(ADDRESS_FILE));
+ if (!AddrFile) {
+ TI_DbgPrint(MIN_TRACE, ("Insufficient resources.\n"));
+ return STATUS_INSUFFICIENT_RESOURCES;
+ }
+
+ TI_DbgPrint(DEBUG_ADDRFILE, ("Address file object allocated at (0x%X).\n",
AddrFile));
+
+ RtlZeroMemory(AddrFile, sizeof(ADDRESS_FILE));
+
+ AddrFile->Free = AddrFileFree;
+
+ /* Make sure address is a local unicast address or 0 */
+ /* FIXME: IPv4 only */
+ AddrFile->Family = Address->Address[0].AddressType;
+ IPv4Address = Address->Address[0].Address[0].in_addr;
+ if (IPv4Address != 0 &&
+ !AddrLocateADEv4(IPv4Address, &AddrFile->Address)) {
+ exFreePool(AddrFile);
+ TI_DbgPrint(MIN_TRACE, ("Non-local address given (0x%X).\n",
DN2H(IPv4Address)));
+ return STATUS_INVALID_PARAMETER;
+ }
+ else
+ {
+ /* Bound to the default address ... Copy the address type */
+ AddrFile->Address.Type = IP_ADDRESS_V4;
+ }
+
+ TI_DbgPrint(MID_TRACE, ("Opening address %s for communication (P=%d
U=%d).\n",
+ A2S(&AddrFile->Address), Protocol, IPPROTO_UDP));
+
+ /* Protocol specific handling */
+ switch (Protocol) {
+ case IPPROTO_TCP:
+ AddrFile->Port =
+ TCPAllocatePort(Address->Address[0].Address[0].sin_port);
+
+ if ((Address->Address[0].Address[0].sin_port &&
+ AddrFile->Port != Address->Address[0].Address[0].sin_port) ||
+ AddrFile->Port == 0xffff)
+ {
+ exFreePool(AddrFile);
+ return STATUS_INVALID_PARAMETER;
+ }
+
+ AddrFile->Send = NULL; /* TCPSendData */
+ break;
+
+ case IPPROTO_UDP:
+ TI_DbgPrint(MID_TRACE,("Allocating udp port\n"));
+ AddrFile->Port =
+ UDPAllocatePort(Address->Address[0].Address[0].sin_port);
+
+ if ((Address->Address[0].Address[0].sin_port &&
+ AddrFile->Port != Address->Address[0].Address[0].sin_port) ||
+ AddrFile->Port == 0xffff)
+ {
+ exFreePool(AddrFile);
+ return STATUS_INVALID_PARAMETER;
+ }
+
+ TI_DbgPrint(MID_TRACE,("Setting port %d (wanted %d)\n",
+ AddrFile->Port,
+ Address->Address[0].Address[0].sin_port));
+ AddrFile->Send = UDPSendDatagram;
+ break;
+
+ case IPPROTO_ICMP:
+ AddrFile->Port = 0;
+ AddrFile->Send = ICMPSendDatagram;
+ break;
+
+ default:
+ /* Use raw IP for all other protocols */
+ AddrFile->Port = 0;
+ AddrFile->Send = RawIPSendDatagram;
+ break;
+ }
+
+ TI_DbgPrint(MID_TRACE, ("IP protocol number for address file object is
%d.\n",
+ Protocol));
+
+ TI_DbgPrint(MID_TRACE, ("Port number for address file object is %d.\n",
+ WN2H(AddrFile->Port)));
+
+ /* Set protocol */
+ AddrFile->Protocol = Protocol;
+
+ /* Initialize receive and transmit queues */
+ InitializeListHead(&AddrFile->ReceiveQueue);
+ InitializeListHead(&AddrFile->TransmitQueue);
+
+ /* Initialize spin lock that protects the address file object */
+ KeInitializeSpinLock(&AddrFile->Lock);
+
+ /* Set valid flag so the address can be used */
+ AF_SET_VALID(AddrFile);
+
+ /* Return address file object */
+ Request->Handle.AddressHandle = AddrFile;
+
+ /* Add address file to global list */
+ ExInterlockedInsertTailList(
+ &AddressFileListHead,
+ &AddrFile->ListEntry,
+ &AddressFileListLock);
+
+ TI_DbgPrint(MAX_TRACE, ("Leaving.\n"));
+
+ return STATUS_SUCCESS;
+}
+
+
+/*
+ * FUNCTION: Closes an address file object
+ * ARGUMENTS:
+ * Request = Pointer to TDI request structure for this request
+ * RETURNS:
+ * Status of operation
+ */
+NTSTATUS FileCloseAddress(
+ PTDI_REQUEST Request)
{
KIRQL OldIrql;
+ PADDRESS_FILE AddrFile;
+ NTSTATUS Status = STATUS_SUCCESS;
+ PDATAGRAM_SEND_REQUEST SendRequest;
+ PDATAGRAM_RECEIVE_REQUEST ReceiveRequest;
PLIST_ENTRY CurrentEntry;
PLIST_ENTRY NextEntry;
- PDATAGRAM_SEND_REQUEST SendRequest;
- PDATAGRAM_RECEIVE_REQUEST ReceiveRequest;
TI_DbgPrint(MID_TRACE, ("Called.\n"));
- /* Remove address file from the global list */
- TcpipAcquireSpinLock(&AddressFileListLock, &OldIrql);
- RemoveEntryList(&AddrFile->ListEntry);
- TcpipReleaseSpinLock(&AddressFileListLock, OldIrql);
+ AddrFile = Request->Handle.AddressHandle;
TcpipAcquireSpinLock(&AddrFile->Lock, &OldIrql);
@@ -197,143 +334,9 @@
TcpipReleaseSpinLock(&AddrFile->Lock, OldIrql);
- (*AddrFile->Free)(AddrFile);
-
- TI_DbgPrint(MAX_TRACE, ("Leaving.\n"));
-}
-
-
-/*
- * FUNCTION: Open an address file object
- * ARGUMENTS:
- * Request = Pointer to TDI request structure for this request
- * Address = Pointer to address to be opened
- * Protocol = Protocol on which to open the address
- * Options = Pointer to option buffer
- * RETURNS:
- * Status of operation
- */
-NTSTATUS FileOpenAddress(
- PTDI_REQUEST Request,
- PTA_IP_ADDRESS Address,
- USHORT Protocol,
- PVOID Options)
-{
- IPv4_RAW_ADDRESS IPv4Address;
- PADDRESS_FILE AddrFile;
-
- TI_DbgPrint(MID_TRACE, ("Called (Proto %d).\n", Protocol));
-
- AddrFile = exAllocatePool(NonPagedPool, sizeof(ADDRESS_FILE));
- if (!AddrFile) {
- TI_DbgPrint(MIN_TRACE, ("Insufficient resources.\n"));
- return STATUS_INSUFFICIENT_RESOURCES;
- }
-
- TI_DbgPrint(DEBUG_ADDRFILE, ("Address file object allocated at (0x%X).\n",
AddrFile));
-
- RtlZeroMemory(AddrFile, sizeof(ADDRESS_FILE));
-
- AddrFile->Free = AddrFileFree;
-
- /* Make sure address is a local unicast address or 0 */
- /* FIXME: IPv4 only */
- AddrFile->Family = Address->Address[0].AddressType;
- IPv4Address = Address->Address[0].Address[0].in_addr;
- if (IPv4Address != 0 &&
- !AddrLocateADEv4(IPv4Address, &AddrFile->Address)) {
- exFreePool(AddrFile);
- TI_DbgPrint(MIN_TRACE, ("Non-local address given (0x%X).\n",
DN2H(IPv4Address)));
- return STATUS_INVALID_PARAMETER;
- }
- else
- {
- /* Bound to the default address ... Copy the address type */
- AddrFile->Address.Type = IP_ADDRESS_V4;
- }
-
- TI_DbgPrint(MID_TRACE, ("Opening address %s for communication (P=%d
U=%d).\n",
- A2S(&AddrFile->Address), Protocol, IPPROTO_UDP));
-
- /* Protocol specific handling */
- switch (Protocol) {
- case IPPROTO_TCP:
- AddrFile->Port =
- TCPAllocatePort(Address->Address[0].Address[0].sin_port);
-
- if ((Address->Address[0].Address[0].sin_port &&
- AddrFile->Port != Address->Address[0].Address[0].sin_port) ||
- AddrFile->Port == 0xffff)
- {
- exFreePool(AddrFile);
- return STATUS_INVALID_PARAMETER;
- }
-
- AddrFile->Send = NULL; /* TCPSendData */
- break;
-
- case IPPROTO_UDP:
- TI_DbgPrint(MID_TRACE,("Allocating udp port\n"));
- AddrFile->Port =
- UDPAllocatePort(Address->Address[0].Address[0].sin_port);
-
- if ((Address->Address[0].Address[0].sin_port &&
- AddrFile->Port != Address->Address[0].Address[0].sin_port) ||
- AddrFile->Port == 0xffff)
- {
- exFreePool(AddrFile);
- return STATUS_INVALID_PARAMETER;
- }
-
- TI_DbgPrint(MID_TRACE,("Setting port %d (wanted %d)\n",
- AddrFile->Port,
- Address->Address[0].Address[0].sin_port));
- AddrFile->Send = UDPSendDatagram;
- break;
-
- case IPPROTO_ICMP:
- AddrFile->Port = 0;
- AddrFile->Send = ICMPSendDatagram;
- break;
-
- default:
- /* Use raw IP for all other protocols */
- AddrFile->Port = 0;
- AddrFile->Send = RawIPSendDatagram;
- break;
- }
-
- TI_DbgPrint(MID_TRACE, ("IP protocol number for address file object is
%d.\n",
- Protocol));
-
- TI_DbgPrint(MID_TRACE, ("Port number for address file object is %d.\n",
- WN2H(AddrFile->Port)));
-
- /* Set protocol */
- AddrFile->Protocol = Protocol;
-
- /* Initialize receive and transmit queues */
- InitializeListHead(&AddrFile->ReceiveQueue);
- InitializeListHead(&AddrFile->TransmitQueue);
-
- /* Initialize spin lock that protects the address file object */
- KeInitializeSpinLock(&AddrFile->Lock);
-
- /* Set valid flag so the address can be used */
- AF_SET_VALID(AddrFile);
-
- /* Return address file object */
- Request->Handle.AddressHandle = AddrFile;
-
- /* Add address file to global list */
- ExInterlockedInsertTailList(
- &AddressFileListHead,
- &AddrFile->ListEntry,
- &AddressFileListLock);
-
- TI_DbgPrint(MAX_TRACE, ("Leaving.\n"));
-
- return STATUS_SUCCESS;
+ TI_DbgPrint(MAX_TRACE, ("Leaving.\n"));
+
+ return Status;
}
@@ -344,24 +347,21 @@
* RETURNS:
* Status of operation
*/
-NTSTATUS FileCloseAddress(
+NTSTATUS FileFreeAddress(
PTDI_REQUEST Request)
{
- KIRQL OldIrql;
PADDRESS_FILE AddrFile;
NTSTATUS Status = STATUS_SUCCESS;
+ KIRQL OldIrql;
+
+ AddrFile = Request->Handle.AddressHandle;
TI_DbgPrint(MID_TRACE, ("Called.\n"));
- AddrFile = Request->Handle.AddressHandle;
-
- TcpipAcquireSpinLock(&AddrFile->Lock, &OldIrql);
-
- /* Set address file object exclusive to us */
- AF_SET_BUSY(AddrFile);
- AF_CLR_VALID(AddrFile);
-
- TcpipReleaseSpinLock(&AddrFile->Lock, OldIrql);
+ /* Remove address file from the global list */
+ TcpipAcquireSpinLock(&AddressFileListLock, &OldIrql);
+ RemoveEntryList(&AddrFile->ListEntry);
+ TcpipReleaseSpinLock(&AddressFileListLock, OldIrql);
/* Protocol specific handling */
switch (AddrFile->Protocol) {
@@ -380,30 +380,7 @@
break;
}
- TI_DbgPrint(MAX_TRACE, ("Leaving.\n"));
-
- return Status;
-}
-
-
-/*
- * FUNCTION: Closes an address file object
- * ARGUMENTS:
- * Request = Pointer to TDI request structure for this request
- * RETURNS:
- * Status of operation
- */
-NTSTATUS FileFreeAddress(
- PTDI_REQUEST Request)
-{
- PADDRESS_FILE AddrFile;
- NTSTATUS Status = STATUS_SUCCESS;
-
- AddrFile = Request->Handle.AddressHandle;
-
- TI_DbgPrint(MID_TRACE, ("Called.\n"));
-
- DeleteAddress(AddrFile);
+ (*AddrFile->Free)(AddrFile);
TI_DbgPrint(MAX_TRACE, ("Leaving.\n"));
Modified: branches/arwinss/reactos/drivers/storage/class/ramdisk/ramdisk.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/drivers/storage…
==============================================================================
--- branches/arwinss/reactos/drivers/storage/class/ramdisk/ramdisk.c [iso-8859-1]
(original)
+++ branches/arwinss/reactos/drivers/storage/class/ramdisk/ramdisk.c [iso-8859-1] Fri Aug
14 21:36:55 2009
@@ -1022,7 +1022,6 @@
Irp->IoStatus.Status = Status;
Irp->IoStatus.Information = 0;
IoCompleteRequest(Irp, IO_NO_INCREMENT);
- return;
}
NTSTATUS
Modified: branches/arwinss/reactos/include/ddk/strmini.h
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/include/ddk/str…
==============================================================================
--- branches/arwinss/reactos/include/ddk/strmini.h [iso-8859-1] (original)
+++ branches/arwinss/reactos/include/ddk/strmini.h [iso-8859-1] Fri Aug 14 21:36:55 2009
@@ -2,6 +2,7 @@
#define _STREAM_H
#include <ntddk.h>
+#include <windef.h>
#include <ks.h>
#define STREAMAPI __stdcall
Modified: branches/arwinss/reactos/lib/3rdparty/mingw/gs_support.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/lib/3rdparty/mi…
==============================================================================
--- branches/arwinss/reactos/lib/3rdparty/mingw/gs_support.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/lib/3rdparty/mingw/gs_support.c [iso-8859-1] Fri Aug 14
21:36:55 2009
@@ -108,12 +108,22 @@
else
#endif
{
+#ifdef __GNUC__
#ifdef _WIN64
GS_ContextRecord.Rip = (ULONGLONG) __builtin_return_address (0);
GS_ContextRecord.Rsp = (ULONGLONG) __builtin_frame_address (0) + 8;
#else
GS_ContextRecord.Eip = (DWORD) __builtin_return_address (0);
GS_ContextRecord.Esp = (DWORD) __builtin_frame_address (0) + 4;
+#endif
+#else
+#ifdef _WIN64
+ GS_ContextRecord.Rip = (ULONGLONG) _ReturnAddress();
+ GS_ContextRecord.Rsp = (ULONGLONG) _AddressOfReturnAddress();
+#else
+ GS_ContextRecord.Eip = (DWORD) _ReturnAddress();
+ GS_ContextRecord.Esp = (DWORD) _AddressOfReturnAddress();
+#endif
#endif
}
Modified: branches/arwinss/reactos/lib/drivers/ip/network/address.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/lib/drivers/ip/…
==============================================================================
--- branches/arwinss/reactos/lib/drivers/ip/network/address.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/lib/drivers/ip/network/address.c [iso-8859-1] Fri Aug 14
21:36:55 2009
@@ -122,7 +122,8 @@
{
switch (Address->Type) {
case IP_ADDRESS_V4:
- return (Address->Address.IPv4Address == 0);
+ return (Address->Address.IPv4Address == 0 ||
+ Address->Address.IPv4Address == 0xFFFFFFFF);
case IP_ADDRESS_V6:
/* FIXME: IPv6 is not supported */
Modified: branches/arwinss/reactos/lib/drivers/ip/network/interface.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/lib/drivers/ip/…
==============================================================================
--- branches/arwinss/reactos/lib/drivers/ip/network/interface.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/lib/drivers/ip/network/interface.c [iso-8859-1] Fri Aug 14
21:36:55 2009
@@ -152,6 +152,26 @@
return TRUE;
}
+static PIP_INTERFACE GetDefaultInterface(VOID)
+{
+ KIRQL OldIrql;
+ IF_LIST_ITER(CurrentIF);
+
+ TcpipAcquireSpinLock(&InterfaceListLock, &OldIrql);
+ ForEachInterface(CurrentIF) {
+ if (CurrentIF->Context) {
+ TcpipReleaseSpinLock(&InterfaceListLock, OldIrql);
+ return CurrentIF;
+ }
+ } EndFor(CurrentIF);
+ TcpipReleaseSpinLock(&InterfaceListLock, OldIrql);
+
+ /* There are no physical interfaces on the system
+ * so we must pick the loopback interface */
+
+ return Loopback;
+}
+
PIP_INTERFACE FindOnLinkInterface(PIP_ADDRESS Address)
/*
* FUNCTION: Checks all on-link prefixes to find out if an address is on-link
@@ -166,6 +186,9 @@
TI_DbgPrint(DEBUG_ROUTER, ("Called. Address (0x%X)\n", Address));
TI_DbgPrint(DEBUG_ROUTER, ("Address (%s)\n", A2S(Address)));
+
+ if (AddrIsUnspecified(Address))
+ return GetDefaultInterface();
TcpipAcquireSpinLock(&InterfaceListLock, &OldIrql);
Modified: branches/arwinss/reactos/lib/drivers/ip/network/neighbor.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/lib/drivers/ip/…
==============================================================================
--- branches/arwinss/reactos/lib/drivers/ip/network/neighbor.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/lib/drivers/ip/network/neighbor.c [iso-8859-1] Fri Aug 14
21:36:55 2009
@@ -421,7 +421,8 @@
if (NCE == NULL)
{
TI_DbgPrint(MID_TRACE,("BCAST: %s\n",
A2S(&Interface->Broadcast)));
- if( AddrIsEqual(Address, &Interface->Broadcast) ) {
+ if( AddrIsEqual(Address, &Interface->Broadcast) ||
+ AddrIsUnspecified(Address) ) {
TI_DbgPrint(MID_TRACE,("Packet targeted at broadcast addr\n"));
NCE = NBAddNeighbor(Interface, Address, NULL,
Interface->AddressLength, NUD_CONNECTED);
Modified: branches/arwinss/reactos/lib/drivers/ip/transport/datagram/datagram.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/lib/drivers/ip/…
==============================================================================
--- branches/arwinss/reactos/lib/drivers/ip/transport/datagram/datagram.c [iso-8859-1]
(original)
+++ branches/arwinss/reactos/lib/drivers/ip/transport/datagram/datagram.c [iso-8859-1] Fri
Aug 14 21:36:55 2009
@@ -95,67 +95,60 @@
{
PLIST_ENTRY CurrentEntry;
PDATAGRAM_RECEIVE_REQUEST Current = NULL;
- BOOLEAN Found;
PTA_IP_ADDRESS RTAIPAddress;
TI_DbgPrint(MAX_TRACE, ("There is a receive request.\n"));
/* Search receive request list to find a match */
- Found = FALSE;
CurrentEntry = AddrFile->ReceiveQueue.Flink;
- while((CurrentEntry != &AddrFile->ReceiveQueue) && (!Found)) {
+ while(CurrentEntry != &AddrFile->ReceiveQueue) {
Current = CONTAINING_RECORD(CurrentEntry, DATAGRAM_RECEIVE_REQUEST,
ListEntry);
-
+ CurrentEntry = CurrentEntry->Flink;
if( DstPort == AddrFile->Port &&
(AddrIsEqual(DstAddress, &AddrFile->Address) ||
AddrIsUnspecified(&AddrFile->Address) ||
AddrIsUnspecified(DstAddress))) {
- Found = TRUE;
+
/* Remove the request from the queue */
RemoveEntryList(&Current->ListEntry);
- break;
- } else {
- CurrentEntry = CurrentEntry->Flink;
+
+ TI_DbgPrint(MAX_TRACE, ("Suitable receive request found.\n"));
+
+ TI_DbgPrint(MAX_TRACE,
+ ("Target Buffer: %x, Source Buffer: %x, Size %d\n",
+ Current->Buffer, DataBuffer, DataSize));
+
+ /* Copy the data into buffer provided by the user */
+ RtlCopyMemory( Current->Buffer,
+ DataBuffer,
+ MIN(Current->BufferSize, DataSize) );
+
+ RTAIPAddress = (PTA_IP_ADDRESS)Current->ReturnInfo->RemoteAddress;
+ RTAIPAddress->TAAddressCount = 1;
+ RTAIPAddress->Address->AddressType = TDI_ADDRESS_TYPE_IP;
+ RTAIPAddress->Address->Address->sin_port = SrcPort;
+
+ TI_DbgPrint(MAX_TRACE, ("(A: %08x) Addr %08x Port %04x\n",
+ RTAIPAddress,
+ SrcAddress->Address.IPv4Address, SrcPort));
+
+ RtlCopyMemory( &RTAIPAddress->Address->Address->in_addr,
+ &SrcAddress->Address.IPv4Address,
+ sizeof(SrcAddress->Address.IPv4Address) );
+
+ TcpipReleaseSpinLock(&AddrFile->Lock, OldIrql);
+
+ /* Complete the receive request */
+ if (Current->BufferSize < DataSize)
+ Current->Complete(Current->Context, STATUS_BUFFER_OVERFLOW,
Current->BufferSize);
+ else
+ Current->Complete(Current->Context, STATUS_SUCCESS, DataSize);
+
+ TcpipAcquireSpinLock(&AddrFile->Lock, &OldIrql);
}
}
TcpipReleaseSpinLock(&AddrFile->Lock, OldIrql);
-
- if (Found)
- {
- TI_DbgPrint(MAX_TRACE, ("Suitable receive request found.\n"));
-
- TI_DbgPrint(MAX_TRACE,
- ("Target Buffer: %x, Source Buffer: %x, Size %d\n",
- Current->Buffer, DataBuffer, DataSize));
-
- if (DataSize > Current->BufferSize)
- {
- Current->Complete(Current->Context, STATUS_BUFFER_TOO_SMALL,
DataSize);
- return;
- }
-
- /* Copy the data into buffer provided by the user */
- RtlCopyMemory( Current->Buffer,
- DataBuffer,
- DataSize );
-
- RTAIPAddress = (PTA_IP_ADDRESS)Current->ReturnInfo->RemoteAddress;
- RTAIPAddress->TAAddressCount = 1;
- RTAIPAddress->Address->AddressType = TDI_ADDRESS_TYPE_IP;
- RTAIPAddress->Address->Address->sin_port = SrcPort;
-
- TI_DbgPrint(MAX_TRACE, ("(A: %08x) Addr %08x Port %04x\n",
- RTAIPAddress,
- SrcAddress->Address.IPv4Address, SrcPort));
-
- RtlCopyMemory( &RTAIPAddress->Address->Address->in_addr,
- &SrcAddress->Address.IPv4Address,
- sizeof(SrcAddress->Address.IPv4Address) );
-
- /* Complete the receive request */
- Current->Complete(Current->Context, STATUS_SUCCESS, DataSize);
- }
}
else if (AddrFile->RegisteredReceiveDatagramHandler)
{
Modified: branches/arwinss/reactos/lib/drivers/sound/mmebuddy/auxiliary/auxMessage.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/lib/drivers/sou…
==============================================================================
--- branches/arwinss/reactos/lib/drivers/sound/mmebuddy/auxiliary/auxMessage.c
[iso-8859-1] (original)
+++ branches/arwinss/reactos/lib/drivers/sound/mmebuddy/auxiliary/auxMessage.c
[iso-8859-1] Fri Aug 14 21:36:55 2009
@@ -21,7 +21,8 @@
/*
Standard MME driver entry-point for messages relating to auxiliary devices.
*/
-APIENTRY DWORD
+DWORD
+APIENTRY
auxMessage(
DWORD DeviceId,
DWORD Message,
Modified: branches/arwinss/reactos/lib/drivers/sound/mmebuddy/midi/midMessage.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/lib/drivers/sou…
==============================================================================
--- branches/arwinss/reactos/lib/drivers/sound/mmebuddy/midi/midMessage.c [iso-8859-1]
(original)
+++ branches/arwinss/reactos/lib/drivers/sound/mmebuddy/midi/midMessage.c [iso-8859-1] Fri
Aug 14 21:36:55 2009
@@ -21,7 +21,8 @@
/*
Standard MME driver entry-point for messages relating to MIDI input.
*/
-APIENTRY DWORD
+DWORD
+APIENTRY
midMessage(
DWORD DeviceId,
DWORD Message,
Modified: branches/arwinss/reactos/lib/drivers/sound/mmebuddy/midi/modMessage.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/lib/drivers/sou…
==============================================================================
--- branches/arwinss/reactos/lib/drivers/sound/mmebuddy/midi/modMessage.c [iso-8859-1]
(original)
+++ branches/arwinss/reactos/lib/drivers/sound/mmebuddy/midi/modMessage.c [iso-8859-1] Fri
Aug 14 21:36:55 2009
@@ -21,7 +21,8 @@
/*
Standard MME driver entry-point for messages relating to MIDI output.
*/
-APIENTRY DWORD
+DWORD
+APIENTRY
modMessage(
DWORD DeviceId,
DWORD Message,
Modified: branches/arwinss/reactos/lib/drivers/sound/mmebuddy/mixer/mxdMessage.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/lib/drivers/sou…
==============================================================================
--- branches/arwinss/reactos/lib/drivers/sound/mmebuddy/mixer/mxdMessage.c [iso-8859-1]
(original)
+++ branches/arwinss/reactos/lib/drivers/sound/mmebuddy/mixer/mxdMessage.c [iso-8859-1]
Fri Aug 14 21:36:55 2009
@@ -21,7 +21,8 @@
/*
Standard MME driver entry-point for messages relating to mixers.
*/
-APIENTRY DWORD
+DWORD
+APIENTRY
mxdMessage(
DWORD DeviceId,
DWORD Message,
Modified: branches/arwinss/reactos/lib/drivers/sound/mmebuddy/wave/header.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/lib/drivers/sou…
==============================================================================
--- branches/arwinss/reactos/lib/drivers/sound/mmebuddy/wave/header.c [iso-8859-1]
(original)
+++ branches/arwinss/reactos/lib/drivers/sound/mmebuddy/wave/header.c [iso-8859-1] Fri Aug
14 21:36:55 2009
@@ -224,10 +224,10 @@
PSOUND_DEVICE_INSTANCE SoundDeviceInstance,
IN PVOID Parameter)
{
+ PWAVEHDR WaveHeader = (PWAVEHDR) Parameter;
+
VALIDATE_MMSYS_PARAMETER( SoundDeviceInstance );
VALIDATE_MMSYS_PARAMETER( Parameter );
-
- PWAVEHDR WaveHeader = (PWAVEHDR) Parameter;
/* Initialise */
WaveHeader->lpNext = NULL;
Modified: branches/arwinss/reactos/lib/drivers/sound/mmebuddy/wave/widMessage.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/lib/drivers/sou…
==============================================================================
--- branches/arwinss/reactos/lib/drivers/sound/mmebuddy/wave/widMessage.c [iso-8859-1]
(original)
+++ branches/arwinss/reactos/lib/drivers/sound/mmebuddy/wave/widMessage.c [iso-8859-1] Fri
Aug 14 21:36:55 2009
@@ -22,7 +22,8 @@
Standard MME driver entry-point for messages relating to wave audio
input.
*/
-APIENTRY DWORD
+DWORD
+APIENTRY
widMessage(
DWORD DeviceId,
DWORD Message,
Modified: branches/arwinss/reactos/lib/drivers/sound/mmebuddy/wave/wodMessage.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/lib/drivers/sou…
==============================================================================
--- branches/arwinss/reactos/lib/drivers/sound/mmebuddy/wave/wodMessage.c [iso-8859-1]
(original)
+++ branches/arwinss/reactos/lib/drivers/sound/mmebuddy/wave/wodMessage.c [iso-8859-1] Fri
Aug 14 21:36:55 2009
@@ -31,7 +31,8 @@
Standard MME driver entry-point for messages relating to wave audio
output.
*/
-APIENTRY DWORD
+DWORD
+APIENTRY
wodMessage(
DWORD DeviceId,
DWORD Message,
Modified: branches/arwinss/reactos/lib/sdk/crt/mbstring/mbslwr.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/lib/sdk/crt/mbs…
==============================================================================
--- branches/arwinss/reactos/lib/sdk/crt/mbstring/mbslwr.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/lib/sdk/crt/mbstring/mbslwr.c [iso-8859-1] Fri Aug 14
21:36:55 2009
@@ -1,12 +1,10 @@
/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
- * FILE: lib/sdk/crt/mbstring/ismbpun.c
- * PURPOSE:
- * PROGRAMER:
- * UPDATE HISTORY:
- * 05/30/08: Samuel Serapion adapted from PROJECT C Library
- *
+ * FILE: lib/sdk/crt/mbstring/mbslwr.c
+ * PURPOSE: Multibyte lowercase functions
+ * PROGRAMER: Eric Kohl
+ * Samuel Serapion, adapted from PROJECT C Library
*/
#include <precomp.h>
@@ -33,14 +31,24 @@
*/
unsigned char * _mbslwr(unsigned char *x)
{
- unsigned char *y=x;
+ unsigned char *y=x;
- while (*y) {
- if (!_ismbblead(*y)) {
+ if (x == NULL)
+ {
+ return NULL;
+ }
+
+ while (*y)
+ {
+ if (!_ismbblead(*y))
+ {
*y = tolower(*y);
- } else {
- *y=_mbctolower(*(unsigned short *)y);
- y++;
+ y++;
+ }
+ else
+ {
+ *y = _mbctolower(*(unsigned short *)y);
+ y++;
}
}
return x;
Modified: branches/arwinss/reactos/lib/sdk/crt/stdio/stat64.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/lib/sdk/crt/std…
==============================================================================
--- branches/arwinss/reactos/lib/sdk/crt/stdio/stat64.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/lib/sdk/crt/stdio/stat64.c [iso-8859-1] Fri Aug 14 21:36:55
2009
@@ -128,9 +128,9 @@
_dosmaperr(ERROR_INVALID_PARAMETER);
return -1;
}
- buf->st_mode = _S_IFREG | _S_IREAD;
+ buf->st_mode = _S_IFREG | ALL_S_IREAD;
if (!(hfi.dwFileAttributes & FILE_ATTRIBUTE_READONLY))
- buf->st_mode |= _S_IWRITE;
+ buf->st_mode |= ALL_S_IWRITE;
buf->st_size = ((__int64)hfi.nFileSizeHigh << 32) + hfi.nFileSizeLow;
RtlTimeToSecondsSince1970((LARGE_INTEGER *)&hfi.ftLastAccessTime, &dw);
buf->st_atime = dw;
Modified: branches/arwinss/reactos/ntoskrnl/ke/freeldr.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/ntoskrnl/ke/fre…
==============================================================================
--- branches/arwinss/reactos/ntoskrnl/ke/freeldr.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/ntoskrnl/ke/freeldr.c [iso-8859-1] Fri Aug 14 21:36:55 2009
@@ -66,6 +66,9 @@
ULONG NumberDescriptors = 0;
MEMORY_DESCRIPTOR MDArray[60] = { { 0, 0, 0 }, };
+/* Old boot style IDT */
+KIDTENTRY KiHackIdt[256];
+
/* FUNCTIONS *****************************************************************/
PMEMORY_ALLOCATION_DESCRIPTOR
@@ -1266,10 +1269,16 @@
#if defined(_M_IX86)
PKTSS Tss;
PKGDTENTRY TssEntry;
+ KDESCRIPTOR IdtDescriptor = { 0, 0, 0 };
+
+ Ke386GetInterruptDescriptorTable(*(PKDESCRIPTOR)&IdtDescriptor.Limit);
+ RtlCopyMemory(KiHackIdt, (PVOID)IdtDescriptor.Base, IdtDescriptor.Limit + 1);
+ IdtDescriptor.Base = (ULONG)&KiHackIdt;
+ IdtDescriptor.Limit = sizeof(KiHackIdt) - 1;
/* Load the GDT and IDT */
Ke386SetGlobalDescriptorTable(*(PKDESCRIPTOR)&KiGdtDescriptor.Limit);
- Ke386SetInterruptDescriptorTable(*(PKDESCRIPTOR)&KiIdtDescriptor.Limit);
+ Ke386SetInterruptDescriptorTable(*(PKDESCRIPTOR)&IdtDescriptor.Limit);
/* Initialize the boot TSS */
Tss = &KiBootTss;
Modified: branches/arwinss/reactos/ntoskrnl/ke/i386/kiinit.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/ntoskrnl/ke/i38…
==============================================================================
--- branches/arwinss/reactos/ntoskrnl/ke/i386/kiinit.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/ntoskrnl/ke/i386/kiinit.c [iso-8859-1] Fri Aug 14 21:36:55
2009
@@ -712,34 +712,18 @@
Ke386SetDs(KGDT_R3_DATA | RPL_MASK);
Ke386SetEs(KGDT_R3_DATA | RPL_MASK);
- /* HACK compensates for KiRosPrepareForSystemStartup hack */
- if ((ULONG)Idt == KiIdtDescriptor.Base)
- {
- USHORT FlippedSelector;
-
- FlippedSelector = KiIdt[2].Selector;
- KiIdt[2].Selector = KiIdt[2].ExtendedOffset;
- KiIdt[2].ExtendedOffset = FlippedSelector;
-
- FlippedSelector = KiIdt[8].Selector;
- KiIdt[8].Selector = KiIdt[8].ExtendedOffset;
- KiIdt[8].ExtendedOffset = FlippedSelector;
- }
- else
- {
- /* Save NMI and double fault traps */
- RtlCopyMemory(&NmiEntry, &Idt[2], sizeof(KIDTENTRY));
- RtlCopyMemory(&DoubleFaultEntry, &Idt[8], sizeof(KIDTENTRY));
-
- /* Copy kernel's trap handlers */
- RtlCopyMemory(Idt,
- (PVOID)KiIdtDescriptor.Base,
- KiIdtDescriptor.Limit + 1);
-
- /* Restore NMI and double fault */
- RtlCopyMemory(&Idt[2], &NmiEntry, sizeof(KIDTENTRY));
- RtlCopyMemory(&Idt[8], &DoubleFaultEntry, sizeof(KIDTENTRY));
- }
+ /* Save NMI and double fault traps */
+ RtlCopyMemory(&NmiEntry, &Idt[2], sizeof(KIDTENTRY));
+ RtlCopyMemory(&DoubleFaultEntry, &Idt[8], sizeof(KIDTENTRY));
+
+ /* Copy kernel's trap handlers */
+ RtlCopyMemory(Idt,
+ (PVOID)KiIdtDescriptor.Base,
+ KiIdtDescriptor.Limit + 1);
+
+ /* Restore NMI and double fault */
+ RtlCopyMemory(&Idt[2], &NmiEntry, sizeof(KIDTENTRY));
+ RtlCopyMemory(&Idt[8], &DoubleFaultEntry, sizeof(KIDTENTRY));
AppCpuInit:
/* Loop until we can release the freeze lock */
Propchange: branches/arwinss/reactos/tools/rsym/rsym.c
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Aug 14 21:36:55 2009
@@ -1,2 +1,2 @@
/branches/ros-amd64-bringup/reactos/tools/rsym/rsym.c:37291,37302,37305,37320,37329,37462,37895,38129,38330-38331,38341,38947,38973,39072,39114,39121,40605
-/trunk/reactos/tools/rsym/rsym.c:42000-42350,42376,42419
+/trunk/reactos/tools/rsym/rsym.c:42000-42376,42419
Propchange: branches/arwinss/reactos/tools/rsym/rsym.h
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Aug 14 21:36:55 2009
@@ -1,2 +1,2 @@
/branches/ros-amd64-bringup/reactos/tools/rsym/rsym.h:37291,37302,37305,37320,37329,37462,37895,38129,38330-38331,38341,38947,38973,39072,39114,39121,40605
-/trunk/reactos/tools/rsym/rsym.h:42000-42350,42376,42419
+/trunk/reactos/tools/rsym/rsym.h:42000-42376,42419
Propchange: branches/arwinss/reactos/tools/rsym/rsym.mak
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Aug 14 21:36:55 2009
@@ -1,2 +1,2 @@
/branches/ros-amd64-bringup/reactos/tools/rsym/rsym.mak:37291,37302,37305,37320,37329,37462,37895,38129,38330-38331,38341,38947,38973,39072,39114,39121,40605
-/trunk/reactos/tools/rsym/rsym.mak:42000-42350,42376,42419
+/trunk/reactos/tools/rsym/rsym.mak:42000-42376,42419
Propchange: branches/arwinss/reactos/tools/rsym/rsym_common.c
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Aug 14 21:36:55 2009
@@ -1,2 +1,2 @@
/branches/ros-amd64-bringup/reactos/tools/rsym/rsym_common.c:37291,37302,37305,37320,37329,37462,37895,38129,38330-38331,38341,38947,38973,39072,39114,39121,40605
-/trunk/reactos/tools/rsym/rsym_common.c:42000-42350,42376,42419
+/trunk/reactos/tools/rsym/rsym_common.c:42000-42376,42419