Rebase against 26094c5634b1f12d3f156a90a3e228513675cd63.

This commit is contained in:
Sebastian Lackner 2015-10-19 21:55:20 +02:00
parent 67dffe4dc6
commit 63426eaa59
13 changed files with 194 additions and 673 deletions

View File

@ -188,7 +188,7 @@ for more details.*
* Implement enumeration of sound devices and basic properties to dxdiagn ([Wine Bug #32613](https://bugs.winehq.org/show_bug.cgi?id=32613))
* Implement exclusive mode in PulseAudio backend ([Wine Bug #37042](https://bugs.winehq.org/show_bug.cgi?id=37042))
* Implement general tab for file property dialog
* Implement kernel32.GetPhysicallyInstalledSystemMemory ([Wine Bug #39395](https://bugs.winehq.org/show_bug.cgi?id=39395))
* ~~Implement kernel32.GetPhysicallyInstalledSystemMemory~~ ([Wine Bug #39395](https://bugs.winehq.org/show_bug.cgi?id=39395))
* Implement locking and synchronization of key states ([Wine Bug #31899](https://bugs.winehq.org/show_bug.cgi?id=31899))
* Implement mscoree._CorValidateImage for mono runtime ([Wine Bug #38662](https://bugs.winehq.org/show_bug.cgi?id=38662))
* Implement ntoskrnl driver testing framework.

6
debian/changelog vendored
View File

@ -1,3 +1,9 @@
wine-staging (1.7.54) UNRELEASED; urgency=low
* Removed patch to implement kernel32.GetPhysicallyInstalledSystemMemory
(accepted upstream).
* Partially removed patches for ws2_32 TransmitFile (accepted upstream).
-- Sebastian Lackner <sebastian@fds-team.de> Mon, 19 Oct 2015 21:56:22 +0200
wine-staging (1.7.53) unstable; urgency=low
* Added patch to implement support for msiexec /passive command line option.
* Added patch to implement stub for DSPROPSETID_EAX20_ListenerProperties.

View File

@ -1,121 +0,0 @@
From 89d013aba4d57949ab116b892467503d9f2b9be2 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sun, 18 Oct 2015 18:27:59 +0200
Subject: kernel32: Add stub implementation for
GetPhysicallyInstalledSystemMemory.
---
dlls/kernel32/heap.c | 21 +++++++++++++++++++++
dlls/kernel32/kernel32.spec | 2 +-
dlls/kernel32/tests/heap.c | 35 +++++++++++++++++++++++++++++++++++
3 files changed, 57 insertions(+), 1 deletion(-)
diff --git a/dlls/kernel32/heap.c b/dlls/kernel32/heap.c
index cac73ec..f4be666 100644
--- a/dlls/kernel32/heap.c
+++ b/dlls/kernel32/heap.c
@@ -1449,6 +1449,27 @@ VOID WINAPI GlobalMemoryStatus( LPMEMORYSTATUS lpBuffer )
lpBuffer->dwTotalVirtual, lpBuffer->dwAvailVirtual );
}
+/***********************************************************************
+ * GetPhysicallyInstalledSystemMemory (KERNEL32.@)
+ */
+BOOL WINAPI GetPhysicallyInstalledSystemMemory( ULONGLONG *total_memory )
+{
+ MEMORYSTATUSEX memstatus;
+
+ FIXME("stub: %p\n", total_memory);
+
+ if (!total_memory)
+ {
+ SetLastError(ERROR_INVALID_PARAMETER);
+ return FALSE;
+ }
+
+ memstatus.dwLength = sizeof(memstatus);
+ GlobalMemoryStatusEx(&memstatus);
+ *total_memory = memstatus.ullTotalPhys / 1024;
+ return TRUE;
+}
+
BOOL WINAPI GetSystemFileCacheSize(PSIZE_T mincache, PSIZE_T maxcache, PDWORD flags)
{
FIXME("stub: %p %p %p\n", mincache, maxcache, flags);
diff --git a/dlls/kernel32/kernel32.spec b/dlls/kernel32/kernel32.spec
index dfc305b..d7eab83 100644
--- a/dlls/kernel32/kernel32.spec
+++ b/dlls/kernel32/kernel32.spec
@@ -759,7 +759,7 @@
@ stdcall GetOEMCP()
@ stdcall GetOverlappedResult(long ptr ptr long)
@ stdcall GetUserPreferredUILanguages(long ptr ptr ptr)
-# @ stub GetPhysicallyInstalledSystemMemory
+@ stdcall GetPhysicallyInstalledSystemMemory(ptr)
@ stdcall GetPriorityClass(long)
@ stdcall GetPrivateProfileIntA(str str long str)
@ stdcall GetPrivateProfileIntW(wstr wstr long wstr)
diff --git a/dlls/kernel32/tests/heap.c b/dlls/kernel32/tests/heap.c
index d8768da..b656dc2 100644
--- a/dlls/kernel32/tests/heap.c
+++ b/dlls/kernel32/tests/heap.c
@@ -39,6 +39,7 @@
#define HEAP_VALIDATE_PARAMS 0x40000000
static BOOL (WINAPI *pHeapQueryInformation)(HANDLE, HEAP_INFORMATION_CLASS, PVOID, SIZE_T, PSIZE_T);
+static BOOL (WINAPI *pGetPhysicallyInstalledSystemMemory)(ULONGLONG *);
static ULONG (WINAPI *pRtlGetNtGlobalFlags)(void);
struct heap_layout
@@ -1145,6 +1146,38 @@ static void test_child_heap( const char *arg )
test_heap_checks( expect_heap );
}
+static void test_GetPhysicallyInstalledSystemMemory(void)
+{
+ HMODULE kernel32 = GetModuleHandleA("kernel32.dll");
+ MEMORYSTATUSEX memstatus;
+ ULONGLONG total_memory;
+ BOOL ret;
+
+ pGetPhysicallyInstalledSystemMemory = (void *)GetProcAddress(kernel32, "GetPhysicallyInstalledSystemMemory");
+ if (!pGetPhysicallyInstalledSystemMemory)
+ {
+ win_skip("GetPhysicallyInstalledSystemMemory is not available\n");
+ return;
+ }
+
+ SetLastError(0xdeadbeef);
+ ret = pGetPhysicallyInstalledSystemMemory(NULL);
+ ok(!ret, "GetPhysicallyInstalledSystemMemory should fail\n");
+ ok(GetLastError() == ERROR_INVALID_PARAMETER,
+ "expected ERROR_INVALID_PARAMETER, got %u\n", GetLastError());
+
+ total_memory = 0;
+ ret = pGetPhysicallyInstalledSystemMemory(&total_memory);
+ ok(ret, "GetPhysicallyInstalledSystemMemory unexpectedly failed\n");
+ ok(total_memory != 0, "expected total_memory != 0\n");
+
+ memstatus.dwLength = sizeof(memstatus);
+ ret = GlobalMemoryStatusEx(&memstatus);
+ ok(ret, "GlobalMemoryStatusEx unexpectedly failed\n");
+ ok(total_memory >= memstatus.ullTotalPhys / 1024,
+ "expected total_memory >= memstatus.ullTotalPhys / 1024\n");
+}
+
START_TEST(heap)
{
int argc;
@@ -1172,7 +1205,9 @@ START_TEST(heap)
test_sized_HeapReAlloc(1, (1 << 20));
test_sized_HeapReAlloc((1 << 20), (2 << 20));
test_sized_HeapReAlloc((1 << 20), 1);
+
test_HeapQueryInformation();
+ test_GetPhysicallyInstalledSystemMemory();
if (pRtlGetNtGlobalFlags)
{
--
2.6.1

View File

@ -1 +0,0 @@
Fixes: [39395] Implement kernel32.GetPhysicallyInstalledSystemMemory

View File

@ -1,4 +1,4 @@
From 0e2ab70965e4b50319e7e0a50ce9ee88c1425ecc Mon Sep 17 00:00:00 2001
From 3590f4e4114a4c4244e8b0e0b4e96337544a5b86 Mon Sep 17 00:00:00 2001
From: Bruno Jesus <00cpxxx@gmail.com>
Date: Wed, 7 Jan 2015 10:50:03 +0100
Subject: msvfw32: Derive image size from input image to avoid NULL
@ -9,18 +9,18 @@ Subject: msvfw32: Derive image size from input image to avoid NULL
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/msvfw32/msvideo_main.c b/dlls/msvfw32/msvideo_main.c
index b6b7507..82b732b 100644
index 5aff706..07274c4 100644
--- a/dlls/msvfw32/msvideo_main.c
+++ b/dlls/msvfw32/msvideo_main.c
@@ -1447,7 +1447,7 @@ BOOL VFWAPI ICSeqCompressFrameStart(PCOMPVARS pc, LPBITMAPINFO lpbiIn)
}
@@ -1441,7 +1441,7 @@ BOOL VFWAPI ICSeqCompressFrameStart(PCOMPVARS pc, LPBITMAPINFO lpbiIn)
pc->cbState = sizeof(ICCOMPRESS);
- pc->lpBitsOut = HeapAlloc(GetProcessHeap(), 0, pc->lpbiOut->bmiHeader.biSizeImage);
+ pc->lpBitsOut = HeapAlloc(GetProcessHeap(), 0, pc->lpbiIn->bmiHeader.biSizeImage);
if (!pc->lpBitsOut)
{
HeapFree(GetProcessHeap(), 0, pc->lpbiIn);
goto error;
--
2.2.1
2.6.1

View File

@ -52,13 +52,13 @@ usage()
# Get the upstream commit sha
upstream_commit()
{
echo "65d699eb5f7fc151197f3dc9f36499ee3e43f8e7"
echo "26094c5634b1f12d3f156a90a3e228513675cd63"
}
# Show version information
version()
{
echo "Wine Staging 1.7.53"
echo "Wine Staging 1.7.54 (unreleased)"
echo "Copyright (C) 2014-2015 the Wine Staging project authors."
echo ""
echo "Patchset to be applied on upstream Wine:"
@ -155,7 +155,6 @@ patch_enable_all ()
enable_kernel32_Cwd_Startup_Info="$1"
enable_kernel32_GetFinalPathNameByHandle="$1"
enable_kernel32_GetLogicalProcessorInformationEx="$1"
enable_kernel32_GetPhysicallyInstalledSystemMemory="$1"
enable_kernel32_LocaleNameToLCID="$1"
enable_kernel32_Named_Pipe="$1"
enable_kernel32_NeedCurrentDirectoryForExePath="$1"
@ -562,9 +561,6 @@ patch_enable ()
kernel32-GetLogicalProcessorInformationEx)
enable_kernel32_GetLogicalProcessorInformationEx="$2"
;;
kernel32-GetPhysicallyInstalledSystemMemory)
enable_kernel32_GetPhysicallyInstalledSystemMemory="$2"
;;
kernel32-LocaleNameToLCID)
enable_kernel32_LocaleNameToLCID="$2"
;;
@ -3455,21 +3451,6 @@ if test "$enable_kernel32_GetLogicalProcessorInformationEx" -eq 1; then
) >> "$patchlist"
fi
# Patchset kernel32-GetPhysicallyInstalledSystemMemory
# |
# | This patchset fixes the following Wine bugs:
# | * [#39395] Implement kernel32.GetPhysicallyInstalledSystemMemory
# |
# | Modified files:
# | * dlls/kernel32/heap.c, dlls/kernel32/kernel32.spec, dlls/kernel32/tests/heap.c
# |
if test "$enable_kernel32_GetPhysicallyInstalledSystemMemory" -eq 1; then
patch_apply kernel32-GetPhysicallyInstalledSystemMemory/0001-kernel32-Add-stub-implementation-for-GetPhysicallyIn.patch
(
echo '+ { "Sebastian Lackner", "kernel32: Add stub implementation for GetPhysicallyInstalledSystemMemory.", 1 },';
) >> "$patchlist"
fi
# Patchset kernel32-LocaleNameToLCID
# |
# | This patchset fixes the following Wine bugs:
@ -6525,15 +6506,11 @@ fi
# | * dlls/ws2_32/socket.c, dlls/ws2_32/tests/sock.c, include/winsock.h, server/protocol.def, server/sock.c
# |
if test "$enable_ws2_32_TransmitFile" -eq 1; then
patch_apply ws2_32-TransmitFile/0001-ws2_32-Implement-a-basic-synchronous-TransmitFile.-r.patch
patch_apply ws2_32-TransmitFile/0002-ws2_32-Add-support-for-TransmitFile-headers-and-foot.patch
patch_apply ws2_32-TransmitFile/0003-ws2_32-Add-asynchronous-support-for-TransmitFile.-re.patch
patch_apply ws2_32-TransmitFile/0004-ws2_32-Add-support-for-TF_DISCONNECT-to-TransmitFile.patch
patch_apply ws2_32-TransmitFile/0005-ws2_32-Add-support-for-TF_REUSE_SOCKET-to-TransmitFi.patch
patch_apply ws2_32-TransmitFile/0001-ws2_32-Add-asynchronous-support-for-TransmitFile.-re.patch
patch_apply ws2_32-TransmitFile/0002-ws2_32-Add-support-for-TF_DISCONNECT-to-TransmitFile.patch
patch_apply ws2_32-TransmitFile/0003-ws2_32-Add-support-for-TF_REUSE_SOCKET-to-TransmitFi.patch
(
echo '+ { "Erich E. Hoover", "ws2_32: Implement a basic synchronous TransmitFile.", 2 },';
echo '+ { "Erich E. Hoover", "ws2_32: Add support for TransmitFile headers and footers.", 1 },';
echo '+ { "Erich E. Hoover", "ws2_32: Add asynchronous support for TransmitFile.", 2 },';
echo '+ { "Erich E. Hoover", "ws2_32: Add asynchronous support for TransmitFile.", 1 },';
echo '+ { "Erich E. Hoover", "ws2_32: Add support for TF_DISCONNECT to TransmitFile.", 1 },';
echo '+ { "Erich E. Hoover", "ws2_32: Add support for TF_REUSE_SOCKET to TransmitFile.", 1 },';
) >> "$patchlist"

View File

@ -1,4 +1,4 @@
From 2e5a98194b938b677a8049cfd59cee18c31417ed Mon Sep 17 00:00:00 2001
From b306273dc9e8ef9cdc53affc64098399bad4e65c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Thu, 3 Oct 2013 19:23:24 +0200
Subject: wined3d: Remove software cursor support.
@ -14,7 +14,7 @@ FIXME: Make sure wined3d_device_show_cursor returns the correct value if a softw
3 files changed, 86 deletions(-)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 3e3d4a7..6b87c20 100644
index b44d304..e8871b2 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -1039,8 +1039,6 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
@ -26,7 +26,7 @@ index 3e3d4a7..6b87c20 100644
/* Release the buffers (with sanity checks).
* FIXME: Move this move into a separate patch. I think the idea
@@ -4157,48 +4155,6 @@ void CDECL wined3d_device_set_depth_stencil_view(struct wined3d_device *device,
@@ -4144,48 +4142,6 @@ void CDECL wined3d_device_set_depth_stencil_view(struct wined3d_device *device,
wined3d_rendertarget_view_decref(prev);
}
@ -73,11 +73,11 @@ index 3e3d4a7..6b87c20 100644
-}
-
HRESULT CDECL wined3d_device_set_cursor_properties(struct wined3d_device *device,
UINT x_hotspot, UINT y_hotspot, struct wined3d_surface *cursor_image)
UINT x_hotspot, UINT y_hotspot, struct wined3d_texture *texture, unsigned int sub_resource_idx)
{
@@ -4209,12 +4165,6 @@ HRESULT CDECL wined3d_device_set_cursor_properties(struct wined3d_device *device
TRACE("device %p, x_hotspot %u, y_hotspot %u, cursor_image %p.\n",
device, x_hotspot, y_hotspot, cursor_image);
@@ -4204,12 +4160,6 @@ HRESULT CDECL wined3d_device_set_cursor_properties(struct wined3d_device *device
cursor_image = surface_from_resource(sub_resource);
- if (device->cursor_texture)
- {
@ -88,7 +88,7 @@ index 3e3d4a7..6b87c20 100644
if (cursor_image->resource.format->id != WINED3DFMT_B8G8R8A8_UNORM)
{
WARN("Surface %p has an invalid format %s.\n",
@@ -4242,11 +4192,6 @@ HRESULT CDECL wined3d_device_set_cursor_properties(struct wined3d_device *device
@@ -4237,11 +4187,6 @@ HRESULT CDECL wined3d_device_set_cursor_properties(struct wined3d_device *device
* release it after setting the cursor image. Windows doesn't
* addref the set surface, so we can't do this either without
* creating circular refcount dependencies. */
@ -100,7 +100,7 @@ index 3e3d4a7..6b87c20 100644
if (cursor_image->resource.width == 32 && cursor_image->resource.height == 32)
{
@@ -4351,10 +4296,6 @@ BOOL CDECL wined3d_device_show_cursor(struct wined3d_device *device, BOOL show)
@@ -4346,10 +4291,6 @@ BOOL CDECL wined3d_device_show_cursor(struct wined3d_device *device, BOOL show)
else
SetCursor(NULL);
}
@ -111,7 +111,7 @@ index 3e3d4a7..6b87c20 100644
return oldVisible;
}
@@ -4509,11 +4450,6 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
@@ -4504,11 +4445,6 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
wined3d_texture_decref(device->logo_texture);
device->logo_texture = NULL;
}
@ -124,10 +124,10 @@ index 3e3d4a7..6b87c20 100644
if (device->state.fb.render_targets)
diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
index 560d1b9..a248292 100644
index 5ded5d0..94ca18f 100644
--- a/dlls/wined3d/swapchain.c
+++ b/dlls/wined3d/swapchain.c
@@ -449,27 +449,6 @@ static void swapchain_gl_present(struct wined3d_swapchain *swapchain, const RECT
@@ -455,27 +455,6 @@ static void swapchain_gl_present(struct wined3d_swapchain *swapchain, const RECT
NULL, WINED3D_TEXF_POINT);
}
@ -156,7 +156,7 @@ index 560d1b9..a248292 100644
render_to_fbo = swapchain->render_to_fbo;
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 4171809..8ea2946 100644
index 5f29243..f51a6d4 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2137,7 +2137,6 @@ struct wined3d_device

View File

@ -4,7 +4,7 @@ Subject: Autogenerated #ifdef patch for wined3d-CSMT_Main.
diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
--- a/dlls/wined3d/swapchain.c
+++ b/dlls/wined3d/swapchain.c
@@ -314,7 +314,11 @@
@@ -320,7 +320,11 @@
if (backbuffer->resource.multisample_type)
{
location = WINED3D_LOCATION_RB_RESOLVED;
@ -16,7 +16,7 @@ diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
}
context_apply_fbo_state_blit(context, GL_READ_FRAMEBUFFER, backbuffer, NULL, location);
@@ -422,11 +426,19 @@
@@ -428,11 +432,19 @@
}
static void swapchain_gl_present(struct wined3d_swapchain *swapchain, const RECT *src_rect_in,
@ -36,7 +36,7 @@ diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
const struct wined3d_gl_info *gl_info;
struct wined3d_context *context;
struct wined3d_surface *front;
@@ -454,6 +466,29 @@
@@ -460,6 +472,29 @@
NULL, WINED3D_TEXF_POINT);
}
@ -66,7 +66,7 @@ diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
TRACE("Presenting HDC %p.\n", context->hdc);
render_to_fbo = swapchain->render_to_fbo;
@@ -495,6 +530,7 @@
@@ -501,6 +536,7 @@
*/
if (!swapchain->render_to_fbo && render_to_fbo && wined3d_settings.offscreen_rendering_mode == ORM_FBO)
{
@ -74,7 +74,7 @@ diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
wined3d_resource_load_location(&back_buffer->resource, context, WINED3D_LOCATION_TEXTURE_RGB);
wined3d_resource_invalidate_location(&back_buffer->resource, WINED3D_LOCATION_DRAWABLE);
swapchain->render_to_fbo = TRUE;
@@ -503,6 +539,16 @@
@@ -509,6 +545,16 @@
else
{
wined3d_resource_load_location(&back_buffer->resource, context, back_buffer->container->resource.draw_binding);
@ -91,7 +91,7 @@ diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
}
if (swapchain->render_to_fbo)
@@ -515,8 +561,13 @@
@@ -521,8 +567,13 @@
swapchain_blit(swapchain, context, &src_rect, &dst_rect);
}
@ -105,7 +105,7 @@ diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
/* call wglSwapBuffers through the gl table to avoid confusing the Steam overlay */
gl_info->gl_ops.wgl.p_wglSwapBuffers(context->hdc); /* TODO: cycle through the swapchain buffers */
@@ -540,6 +591,7 @@
@@ -546,6 +597,7 @@
front = surface_from_resource(wined3d_texture_get_sub_resource(swapchain->front_buffer, 0));
@ -113,7 +113,7 @@ diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
wined3d_resource_validate_location(&front->resource, WINED3D_LOCATION_DRAWABLE);
wined3d_resource_invalidate_location(&front->resource, ~WINED3D_LOCATION_DRAWABLE);
switch (swapchain->desc.swap_effect)
@@ -568,6 +620,31 @@
@@ -574,6 +626,31 @@
{
wined3d_surface_decref(swapchain->device->cs->onscreen_depth_stencil);
swapchain->device->cs->onscreen_depth_stencil = NULL;
@ -145,7 +145,7 @@ diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
}
}
}
@@ -600,7 +677,11 @@
@@ -606,7 +683,11 @@
TRACE("Copying surface %p to screen.\n", front);
@ -157,7 +157,7 @@ diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
src_dc = front->hDC;
window = swapchain->win_handle;
@@ -628,8 +709,12 @@
@@ -634,8 +715,12 @@
}
static void swapchain_gdi_present(struct wined3d_swapchain *swapchain, const RECT *src_rect_in,
@ -170,7 +170,7 @@ diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
{
struct wined3d_surface *front, *back;
@@ -656,9 +741,15 @@
@@ -662,9 +747,15 @@
{
void *tmp;
@ -186,7 +186,7 @@ diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
if (front->resource.heap_memory)
ERR("GDI Surface %p has heap memory allocated.\n", front);
@@ -729,6 +820,7 @@
@@ -735,6 +826,7 @@
swapchain->render_to_fbo = TRUE;
}
@ -194,7 +194,7 @@ diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
HRESULT swapchain_create_context_cs(struct wined3d_device *device, struct wined3d_swapchain *swapchain)
{
const struct wined3d_adapter *adapter = device->adapter;
@@ -792,6 +884,7 @@
@@ -798,6 +890,7 @@
return WINED3D_OK;
}
@ -202,7 +202,7 @@ diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
static HRESULT swapchain_init(struct wined3d_swapchain *swapchain, struct wined3d_device *device,
struct wined3d_swapchain_desc *desc, void *parent, const struct wined3d_parent_ops *parent_ops)
{
@@ -882,8 +975,13 @@
@@ -888,8 +981,13 @@
front_buffer = surface_from_resource(wined3d_texture_get_sub_resource(swapchain->front_buffer, 0));
if (!(device->wined3d->flags & WINED3D_NO3D))
{
@ -216,7 +216,7 @@ diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
}
/* MSDN says we're only allowed a single fullscreen swapchain per device,
@@ -909,9 +1007,66 @@
@@ -915,9 +1013,66 @@
if (!(device->wined3d->flags & WINED3D_NO3D))
{
@ -3927,7 +3927,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
return WINED3D_OK;
}
@@ -3605,8 +4023,13 @@
@@ -3592,8 +4010,13 @@
if (state->render_states[WINED3D_RS_ZENABLE] || state->render_states[WINED3D_RS_ZWRITEENABLE]
|| state->render_states[WINED3D_RS_STENCILENABLE])
{
@ -3941,7 +3941,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
if (ds && rt && (ds->width < rt->width || ds->height < rt->height))
{
@@ -3705,6 +4128,7 @@
@@ -3692,6 +4115,7 @@
struct wined3d_surface *src_surface, const RECT *src_rect,
struct wined3d_surface *dst_surface, const POINT *dst_point)
{
@ -3949,7 +3949,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
const struct wined3d_format *src_format = src_surface->resource.format;
const struct wined3d_format *dst_format = dst_surface->resource.format;
UINT update_w, update_h;
@@ -3712,6 +4136,7 @@
@@ -3699,6 +4123,7 @@
RECT r, dst_rect;
POINT p;
@ -3957,7 +3957,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
TRACE("device %p, src_surface %p, src_rect %s, dst_surface %p, dst_point %s.\n",
device, src_surface, wine_dbgstr_rect(src_rect),
dst_surface, wine_dbgstr_point(dst_point));
@@ -3723,6 +4148,7 @@
@@ -3710,6 +4135,7 @@
return WINED3DERR_INVALIDCALL;
}
@ -3965,7 +3965,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
if (src_format->id != dst_format->id)
{
WARN("Source and destination surfaces should have the same format.\n");
@@ -3787,6 +4213,9 @@
@@ -3774,6 +4200,9 @@
wined3d_cs_emit_update_surface(device->cs, src_surface, src_rect, dst_surface, dst_point);
return WINED3D_OK;
@ -3975,7 +3975,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
}
void CDECL wined3d_device_copy_resource(struct wined3d_device *device,
@@ -3939,7 +4368,17 @@
@@ -3926,7 +4355,17 @@
unsigned int depth_pitch)
{
struct wined3d_resource *sub_resource;
@ -3993,7 +3993,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
TRACE("device %p, resource %p, sub_resource_idx %u, box %p, data %p, row_pitch %u, depth_pitch %u.\n",
device, resource, sub_resource_idx, box, data, row_pitch, depth_pitch);
@@ -3956,7 +4395,14 @@
@@ -3943,7 +4382,14 @@
WARN("Invalid sub_resource_idx %u.\n", sub_resource_idx);
return;
}
@ -4008,7 +4008,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
if (box)
{
if (box->left >= box->right || box->right > sub_resource->width
@@ -3966,9 +4412,47 @@
@@ -3953,9 +4399,47 @@
box->left, box->top, box->front, box->right, box->bottom, box->back);
return;
}
@ -4056,7 +4056,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
}
HRESULT CDECL wined3d_device_clear_rendertarget_view(struct wined3d_device *device,
@@ -3999,8 +4483,14 @@
@@ -3986,8 +4470,14 @@
rect = &r;
}
@ -4071,7 +4071,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
}
struct wined3d_rendertarget_view * CDECL wined3d_device_get_rendertarget_view(const struct wined3d_device *device,
@@ -4014,6 +4504,7 @@
@@ -4001,6 +4491,7 @@
return NULL;
}
@ -4079,7 +4079,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
return device->state.fb.render_targets[view_idx];
}
@@ -4029,6 +4520,22 @@
@@ -4016,6 +4507,22 @@
{
struct wined3d_rendertarget_view *prev;
struct wined3d_fb_state *fb = &device->state.fb;
@ -4102,7 +4102,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
TRACE("device %p, view_idx %u, view %p, set_viewport %#x.\n",
device, view_idx, view, set_viewport);
@@ -4068,6 +4575,7 @@
@@ -4055,6 +4562,7 @@
}
@ -4110,7 +4110,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
prev = fb->render_targets[view_idx];
if (view == prev)
return WINED3D_OK;
@@ -4075,6 +4583,15 @@
@@ -4062,6 +4570,15 @@
if (view)
wined3d_rendertarget_view_incref(view);
fb->render_targets[view_idx] = view;
@ -4126,7 +4126,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
wined3d_cs_emit_set_rendertarget_view(device->cs, view_idx, view);
/* Release after the assignment, to prevent device_resource_released()
* from seeing the surface as still in use. */
@@ -4086,6 +4603,7 @@
@@ -4073,6 +4590,7 @@
void CDECL wined3d_device_set_depth_stencil_view(struct wined3d_device *device, struct wined3d_rendertarget_view *view)
{
@ -4134,7 +4134,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
struct wined3d_fb_state *fb = &device->state.fb;
struct wined3d_rendertarget_view *prev;
@@ -4103,6 +4621,66 @@
@@ -4090,6 +4608,66 @@
wined3d_cs_emit_set_depth_stencil_view(device->cs, view);
if (prev)
wined3d_rendertarget_view_decref(prev);
@ -4201,9 +4201,9 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
}
HRESULT CDECL wined3d_device_set_cursor_properties(struct wined3d_device *device,
@@ -4115,6 +4693,14 @@
TRACE("device %p, x_hotspot %u, y_hotspot %u, cursor_image %p.\n",
device, x_hotspot, y_hotspot, cursor_image);
@@ -4110,6 +4688,14 @@
cursor_image = surface_from_resource(sub_resource);
+#if !defined(STAGING_CSMT)
+ if (device->cursor_texture)
@ -4216,7 +4216,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
if (cursor_image->resource.format->id != WINED3DFMT_B8G8R8A8_UNORM)
{
WARN("Surface %p has an invalid format %s.\n",
@@ -4142,6 +4728,13 @@
@@ -4137,6 +4723,13 @@
* release it after setting the cursor image. Windows doesn't
* addref the set surface, so we can't do this either without
* creating circular refcount dependencies. */
@ -4230,7 +4230,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
if (cursor_image->resource.width == 32 && cursor_image->resource.height == 32)
{
@@ -4246,6 +4839,12 @@
@@ -4241,6 +4834,12 @@
else
SetCursor(NULL);
}
@ -4243,7 +4243,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
return oldVisible;
}
@@ -4256,8 +4855,10 @@
@@ -4251,8 +4850,10 @@
TRACE("device %p.\n", device);
@ -4254,7 +4254,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
LIST_FOR_EACH_ENTRY_SAFE(resource, cursor, &device->resources, struct wined3d_resource, resource_list_entry)
{
TRACE("Checking resource %p for eviction.\n", resource);
@@ -4265,6 +4866,7 @@
@@ -4260,6 +4861,7 @@
if (resource->pool == WINED3D_POOL_MANAGED && !resource->map_count)
{
TRACE("Evicting %p.\n", resource);
@ -4262,7 +4262,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
wined3d_cs_emit_evict_resource(device->cs, resource);
}
}
@@ -4283,6 +4885,37 @@
@@ -4278,6 +4880,37 @@
context = context_acquire(device, NULL);
gl_info = context->gl_info;
@ -4300,7 +4300,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
if (device->depth_blt_texture)
{
@@ -4303,6 +4936,7 @@
@@ -4298,6 +4931,7 @@
HeapFree(GetProcessHeap(), 0, swapchain->context);
swapchain->context = NULL;
@ -4308,7 +4308,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
swapchain->num_contexts = 0;
}
@@ -4322,6 +4956,14 @@
@@ -4317,6 +4951,14 @@
static HRESULT create_primary_opengl_context(struct wined3d_device *device, struct wined3d_swapchain *swapchain)
{
@ -4323,7 +4323,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
HRESULT hr;
if (FAILED(hr = device->shader_backend->shader_alloc_private(device,
@@ -4338,6 +4980,7 @@
@@ -4333,6 +4975,7 @@
return hr;
}
@ -4331,7 +4331,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
hr = wined3d_cs_emit_create_swapchain_context(device->cs, swapchain);
if (FAILED(hr))
{
@@ -4348,6 +4991,34 @@
@@ -4343,6 +4986,34 @@
}
wined3d_cs_emit_create_dummy_textures(device->cs);
@ -4366,7 +4366,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
return WINED3D_OK;
}
@@ -4366,9 +5037,11 @@
@@ -4361,9 +5032,11 @@
TRACE("device %p, swapchain_desc %p, mode %p, callback %p, reset_state %#x.\n",
device, swapchain_desc, mode, callback, reset_state);
@ -4378,7 +4378,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
if (!(swapchain = wined3d_device_get_swapchain(device, 0)))
{
ERR("Failed to get the first implicit swapchain.\n");
@@ -4383,9 +5056,21 @@
@@ -4378,9 +5051,21 @@
wined3d_texture_decref(device->logo_texture);
device->logo_texture = NULL;
}
@ -4400,7 +4400,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
{
for (i = 0; i < device->adapter->gl_info.limits.buffers; ++i)
{
@@ -4394,6 +5079,7 @@
@@ -4389,6 +5074,7 @@
}
wined3d_device_set_depth_stencil_view(device, NULL);
@ -4408,7 +4408,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
if (reset_state)
{
state_unbind_resources(&device->state);
@@ -4403,6 +5089,12 @@
@@ -4398,6 +5084,12 @@
{
wined3d_surface_decref(device->cs->onscreen_depth_stencil);
device->cs->onscreen_depth_stencil = NULL;
@ -4421,7 +4421,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
}
if (reset_state)
@@ -4415,6 +5107,7 @@
@@ -4410,6 +5102,7 @@
}
}
@ -4429,7 +4429,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
/* Free implicit resources and wait for the command stream before modifying
* swapchain parameters. After modifying the swapchain parameters a new GL
* context may be acquired by the worker thread. This causes problems in the
@@ -4436,6 +5129,7 @@
@@ -4431,6 +5124,7 @@
}
device->cs->ops->finish(device->cs);
@ -4437,7 +4437,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
TRACE("New params:\n");
TRACE("backbuffer_width %u\n", swapchain_desc->backbuffer_width);
TRACE("backbuffer_height %u\n", swapchain_desc->backbuffer_height);
@@ -4562,6 +5256,13 @@
@@ -4557,6 +5251,13 @@
swapchain_desc->multisample_type, swapchain_desc->multisample_quality)))
return hr;
@ -4451,7 +4451,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
if (swapchain->desc.enable_auto_depth_stencil)
{
struct wined3d_resource_desc texture_desc;
@@ -4604,6 +5305,13 @@
@@ -4599,6 +5300,13 @@
wined3d_device_set_depth_stencil_view(device, device->auto_depth_stencil_view);
}
@ -4465,7 +4465,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
if (swapchain->desc.backbuffer_count && FAILED(hr = wined3d_rendertarget_view_create_from_surface(
surface_from_resource(wined3d_texture_get_sub_resource(swapchain->back_buffers[0], 0)),
NULL, &wined3d_null_parent_ops, &device->back_buffer_view)))
@@ -4624,12 +5332,20 @@
@@ -4619,12 +5327,20 @@
}
wined3d_cs_emit_reset_state(device->cs);
state_cleanup(&device->state);
@ -4486,7 +4486,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
&device->adapter->d3d_info, WINED3D_STATE_INIT_DEFAULT)))
ERR("Failed to initialize device state, hr %#x.\n", hr);
device->update_state = &device->state;
@@ -4638,6 +5354,7 @@
@@ -4633,6 +5349,7 @@
}
else if (device->back_buffer_view)
{
@ -4494,7 +4494,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
struct wined3d_state *state = &device->state;
wined3d_device_set_rendertarget_view(device, 0, device->back_buffer_view, FALSE);
@@ -4653,6 +5370,24 @@
@@ -4648,6 +5365,24 @@
state->scissor_rect.left = 0;
state->scissor_rect.right = swapchain->desc.backbuffer_width;
state->scissor_rect.bottom = swapchain->desc.backbuffer_height;
@ -4519,7 +4519,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
wined3d_cs_emit_set_scissor_rect(device->cs, &state->scissor_rect);
}
@@ -4728,6 +5463,10 @@
@@ -4723,6 +5458,10 @@
TRACE("device %p, resource %p, type %s.\n", device, resource, debug_d3dresourcetype(type));
@ -4530,7 +4530,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
switch (type)
{
case WINED3D_RTYPE_SURFACE:
@@ -4738,6 +5477,7 @@
@@ -4733,6 +5472,7 @@
for (i = 0; i < device->adapter->gl_info.limits.buffers; ++i)
{
@ -4538,7 +4538,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
if (wined3d_rendertarget_view_get_surface(device->state.fb.render_targets[i]) == surface)
{
ERR("Surface %p is still in use as render target %u.\n", surface, i);
@@ -4749,6 +5489,19 @@
@@ -4744,6 +5484,19 @@
{
ERR("Surface %p is still in use as depth/stencil buffer.\n", surface);
device->state.fb.depth_stencil = NULL;
@ -4558,7 +4558,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
}
}
break;
@@ -4911,7 +5664,11 @@
@@ -4906,7 +5659,11 @@
device->blitter = adapter->blitter;
@ -4570,7 +4570,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
&adapter->d3d_info, WINED3D_STATE_INIT_DEFAULT)))
{
ERR("Failed to initialize device state, hr %#x.\n", hr);
@@ -5010,6 +5767,7 @@
@@ -5005,6 +5762,7 @@
else
return CallWindowProcA(proc, window, message, wparam, lparam);
}
@ -4578,7 +4578,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
/* Context activation is done by the caller */
struct wined3d_gl_bo *wined3d_device_get_bo(struct wined3d_device *device, UINT size, GLenum gl_usage,
@@ -5063,3 +5821,4 @@
@@ -5058,3 +5816,4 @@
wined3d_device_destroy_bo(device, context, bo);
}
@ -6423,7 +6423,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
return hr;
}
@@ -1516,6 +1667,9 @@
@@ -1540,6 +1691,9 @@
if (FAILED(hr))
{
WARN("Failed to initialize texture, returning %#x.\n", hr);

View File

@ -1,18 +1,81 @@
From 1677afa592e1bc7e81301592027dc641172a5bc4 Mon Sep 17 00:00:00 2001
From 38e2c0d234e1d3615ac26eeb4808a0446a6c72de Mon Sep 17 00:00:00 2001
From: "Erich E. Hoover" <erich.e.hoover@wine-staging.com>
Date: Tue, 3 Mar 2015 23:19:40 -0700
Subject: ws2_32: Add asynchronous support for TransmitFile. (rev 2)
Date: Wed, 7 Oct 2015 12:19:42 -0600
Subject: ws2_32: Add asynchronous support for TransmitFile.
Signed-off-by: Erich E. Hoover <erich.e.hoover@wine-staging.com>
---
dlls/ws2_32/socket.c | 75 +++++++++++++++++++++++++++++++++------
dlls/ws2_32/socket.c | 89 ++++++++++++++++++++++++++++++++++++++--------
dlls/ws2_32/tests/sock.c | 91 ++++++++++++++++++++++++++++++++++++++++++++----
2 files changed, 150 insertions(+), 16 deletions(-)
2 files changed, 160 insertions(+), 20 deletions(-)
diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c
index 7d4f112..ed3f806 100644
index bc29f6d..4531b81 100644
--- a/dlls/ws2_32/socket.c
+++ b/dlls/ws2_32/socket.c
@@ -2669,10 +2669,15 @@ static NTSTATUS WS2_transmitfile_base( int fd, struct ws2_transmitfile_async *ws
@@ -177,6 +177,8 @@
#define TCP_KEEPIDLE TCP_KEEPALIVE
#endif
+#define FILE_USE_FILE_POINTER_POSITION ((LONGLONG)-2)
+
WINE_DEFAULT_DEBUG_CHANNEL(winsock);
WINE_DECLARE_DEBUG_CHANNEL(winediag);
@@ -524,6 +526,7 @@ struct ws2_transmitfile_async
DWORD bytes_per_send;
TRANSMIT_FILE_BUFFERS buffers;
DWORD flags;
+ LARGE_INTEGER offset;
struct ws2_async write;
};
@@ -2742,9 +2745,10 @@ static BOOL WINAPI WS2_AcceptEx(SOCKET listener, SOCKET acceptor, PVOID dest, DW
*
* Perform an APC-safe ReadFile operation
*/
-static NTSTATUS WS2_ReadFile(HANDLE hFile, PIO_STATUS_BLOCK io_status, char* buffer, ULONG length)
+static NTSTATUS WS2_ReadFile(HANDLE hFile, PIO_STATUS_BLOCK io_status, char* buffer, ULONG length,
+ PLARGE_INTEGER offset)
{
- int result, unix_handle;
+ int result = -1, unix_handle;
unsigned int options;
NTSTATUS status;
@@ -2753,8 +2757,12 @@ static NTSTATUS WS2_ReadFile(HANDLE hFile, PIO_STATUS_BLOCK io_status, char* buf
status = wine_server_handle_to_fd( hFile, FILE_READ_DATA, &unix_handle, &options );
if (status) return status;
- while ((result = read( unix_handle, buffer, length )) == -1)
+ while (result == -1)
{
+ if (offset && offset->QuadPart != FILE_USE_FILE_POINTER_POSITION)
+ result = pread( unix_handle, buffer, length, offset->QuadPart );
+ else
+ result = read( unix_handle, buffer, length );
if (errno != EINTR)
break;
}
@@ -2772,6 +2780,8 @@ static NTSTATUS WS2_ReadFile(HANDLE hFile, PIO_STATUS_BLOCK io_status, char* buf
TRACE("= 0x%08x (%d)\n", status, result);
if (status == STATUS_SUCCESS || status == STATUS_END_OF_FILE)
{
+ if (offset && offset->QuadPart != FILE_USE_FILE_POINTER_POSITION)
+ offset->QuadPart += result;
io_status->u.Status = status;
io_status->Information = result;
}
@@ -2811,7 +2821,7 @@ static NTSTATUS WS2_transmitfile_getbuffer( int fd, struct ws2_transmitfile_asyn
/* when the size of the transfer is limited ensure that we don't go past that limit */
if (wsa->file_bytes != 0)
bytes_per_send = min(bytes_per_send, wsa->file_bytes - wsa->file_read);
- status = WS2_ReadFile( wsa->file, &iosb, wsa->buffer, bytes_per_send );
+ status = WS2_ReadFile( wsa->file, &iosb, wsa->buffer, bytes_per_send, &wsa->offset );
if (status == STATUS_END_OF_FILE)
wsa->file = NULL; /* continue on to the footer */
else if (status != STATUS_SUCCESS)
@@ -2860,10 +2870,15 @@ static NTSTATUS WS2_transmitfile_base( int fd, struct ws2_transmitfile_async *ws
status = WS2_transmitfile_getbuffer( fd, wsa );
if (status == STATUS_PENDING)
{
@ -29,7 +92,7 @@ index 7d4f112..ed3f806 100644
return wsaErrStatus();
}
@@ -2680,26 +2685,46 @@ static NTSTATUS WS2_transmitfile_base( int fd, struct ws2_transmitfile_async *ws
@@ -2871,26 +2886,46 @@ static NTSTATUS WS2_transmitfile_base( int fd, struct ws2_transmitfile_async *ws
}
/***********************************************************************
@ -84,23 +147,26 @@ index 7d4f112..ed3f806 100644
TRACE("(%lx, %p, %d, %d, %p, %p, %d)\n", s, h, file_bytes, bytes_per_send, overlapped,
buffers, flags );
@@ -2746,7 +2771,37 @@ static BOOL WINAPI WS2_TransmitFile( SOCKET s, HANDLE h, DWORD file_bytes, DWORD
@@ -2937,6 +2972,7 @@ static BOOL WINAPI WS2_TransmitFile( SOCKET s, HANDLE h, DWORD file_bytes, DWORD
wsa->file_bytes = file_bytes;
wsa->bytes_per_send = bytes_per_send;
wsa->flags = flags;
+ wsa->offset.QuadPart = FILE_USE_FILE_POINTER_POSITION;
wsa->write.hSocket = SOCKET2HANDLE(s);
wsa->write.addr = NULL;
wsa->write.addrlen.val = 0;
@@ -2945,7 +2981,32 @@ static BOOL WINAPI WS2_TransmitFile( SOCKET s, HANDLE h, DWORD file_bytes, DWORD
wsa->write.control = NULL;
wsa->write.n_iovecs = 0;
wsa->write.first_iovec = 0;
- wsa->write.user_overlapped = NULL;
+ wsa->write.user_overlapped = overlapped;
+
+ if (overlapped)
+ {
+ LARGE_INTEGER offset;
+ int status;
+
+ /* set the file offset to the desired point */
+ offset.u.LowPart = overlapped->u.s.Offset;
+ offset.u.HighPart = overlapped->u.s.OffsetHigh;
+ SetFilePointerEx( wsa->file, offset, NULL, FILE_BEGIN );
+
+ wsa->offset.u.LowPart = overlapped->u.s.Offset;
+ wsa->offset.u.HighPart = overlapped->u.s.OffsetHigh;
+ iosb->u.Status = STATUS_PENDING;
+ iosb->Information = 0;
+ SERVER_START_REQ( register_async )
@ -124,10 +190,10 @@ index 7d4f112..ed3f806 100644
do
{
diff --git a/dlls/ws2_32/tests/sock.c b/dlls/ws2_32/tests/sock.c
index f4a0d55..a22ca94 100644
index 3d20c89..29e20c3 100644
--- a/dlls/ws2_32/tests/sock.c
+++ b/dlls/ws2_32/tests/sock.c
@@ -7115,15 +7115,15 @@ end:
@@ -7429,15 +7429,15 @@ end:
closesocket(connector2);
}
@ -146,7 +212,7 @@ index f4a0d55..a22ca94 100644
while (1)
{
DWORD n1 = 0, n2 = 0;
@@ -7143,6 +7143,7 @@ static void compare_file2(HANDLE handle, SOCKET sock, const char *file, int line
@@ -7457,6 +7457,7 @@ static void compare_file2(HANDLE handle, SOCKET sock, const char *file, int line
static void test_TransmitFile(void)
{
@ -154,7 +220,7 @@ index f4a0d55..a22ca94 100644
GUID transmitFileGuid = WSAID_TRANSMITFILE;
LPFN_TRANSMITFILE pTransmitFile = NULL;
HANDLE file = INVALID_HANDLE_VALUE;
@@ -7152,11 +7153,13 @@ static void test_TransmitFile(void)
@@ -7466,11 +7467,13 @@ static void test_TransmitFile(void)
struct sockaddr_in bindAddress;
TRANSMIT_FILE_BUFFERS buffers;
SOCKET client, server, dest;
@ -169,7 +235,7 @@ index f4a0d55..a22ca94 100644
/* Setup sockets for testing TransmitFile */
client = socket(AF_INET, SOCK_STREAM, 0);
server = socket(AF_INET, SOCK_STREAM, 0);
@@ -7180,6 +7183,7 @@ static void test_TransmitFile(void)
@@ -7494,6 +7497,7 @@ static void test_TransmitFile(void)
skip("Unable to open a file to transmit.\n");
goto cleanup;
}
@ -177,7 +243,7 @@ index f4a0d55..a22ca94 100644
/* Test TransmitFile with an invalid socket */
bret = pTransmitFile(INVALID_SOCKET, file, 0, 0, NULL, NULL, 0);
@@ -7254,7 +7258,7 @@ static void test_TransmitFile(void)
@@ -7567,7 +7571,7 @@ static void test_TransmitFile(void)
/* Test TransmitFile with only file data */
bret = pTransmitFile(client, file, 0, 0, NULL, NULL, 0);
ok(bret, "TransmitFile failed unexpectedly.\n");
@ -186,7 +252,7 @@ index f4a0d55..a22ca94 100644
/* Test TransmitFile with both file and buffer data */
buffers.Head = &header_msg[0];
@@ -7267,7 +7271,81 @@ static void test_TransmitFile(void)
@@ -7580,7 +7584,81 @@ static void test_TransmitFile(void)
iret = recv(dest, buf, sizeof(header_msg)+1, 0);
ok(memcmp(buf, &header_msg[0], sizeof(header_msg)+1) == 0,
"TransmitFile header buffer did not match!\n");
@ -269,7 +335,7 @@ index f4a0d55..a22ca94 100644
iret = recv(dest, buf, sizeof(footer_msg)+1, 0);
ok(memcmp(buf, &footer_msg[0], sizeof(footer_msg)+1) == 0,
"TransmitFile footer buffer did not match!\n");
@@ -7282,6 +7360,7 @@ static void test_TransmitFile(void)
@@ -7595,6 +7673,7 @@ static void test_TransmitFile(void)
cleanup:
CloseHandle(file);
@ -278,5 +344,5 @@ index f4a0d55..a22ca94 100644
closesocket(server);
}
--
2.3.3
2.6.1

View File

@ -1,256 +0,0 @@
From 146d61e6b045ffe102d05910fef73003f47e3a67 Mon Sep 17 00:00:00 2001
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
Date: Thu, 16 Jan 2014 18:24:27 -0700
Subject: ws2_32: Implement a basic synchronous TransmitFile. (rev 2)
---
dlls/ws2_32/socket.c | 144 +++++++++++++++++++++++++++++++++++++++++++++--
dlls/ws2_32/tests/sock.c | 36 +++++++++++-
2 files changed, 173 insertions(+), 7 deletions(-)
diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c
index 049b9dc..5267e59 100644
--- a/dlls/ws2_32/socket.c
+++ b/dlls/ws2_32/socket.c
@@ -378,6 +378,18 @@ struct ws2_accept_async
struct ws2_async *read;
};
+struct ws2_transmitfile_async
+{
+ struct ws2_async_io io;
+ char *buffer;
+ HANDLE file;
+ DWORD file_read;
+ DWORD file_bytes;
+ DWORD bytes_per_send;
+ DWORD flags;
+ struct ws2_async write;
+};
+
static struct ws2_async_io *async_io_freelist;
static void release_async_io( struct ws2_async_io *io )
@@ -2575,6 +2587,76 @@ static BOOL WINAPI WS2_AcceptEx(SOCKET listener, SOCKET acceptor, PVOID dest, DW
}
/***********************************************************************
+ * WS2_transmitfile_getbuffer (INTERNAL)
+ *
+ * Pick the appropriate buffer for a TransmitFile send operation.
+ */
+static NTSTATUS WS2_transmitfile_getbuffer( int fd, struct ws2_transmitfile_async *wsa )
+{
+ /* send any incomplete writes from a previous iteration */
+ if (wsa->write.first_iovec < wsa->write.n_iovecs)
+ return STATUS_PENDING;
+
+ /* process the main file */
+ if (wsa->file)
+ {
+ DWORD bytes_per_send = wsa->bytes_per_send;
+ IO_STATUS_BLOCK iosb;
+ NTSTATUS status;
+
+ /* when the size of the transfer is limited ensure that we don't go past that limit */
+ if (wsa->file_bytes != 0)
+ bytes_per_send = min(bytes_per_send, wsa->file_bytes - wsa->file_read);
+ status = NtReadFile( wsa->file, 0, NULL, NULL, &iosb, wsa->buffer, bytes_per_send,
+ NULL, NULL );
+ if (status == STATUS_END_OF_FILE)
+ return STATUS_SUCCESS;
+ else if (status != STATUS_SUCCESS)
+ return status;
+ else
+ {
+ if (iosb.Information)
+ {
+ wsa->write.first_iovec = 0;
+ wsa->write.n_iovecs = 1;
+ wsa->write.iovec[0].iov_base = wsa->buffer;
+ wsa->write.iovec[0].iov_len = iosb.Information;
+ wsa->file_read += iosb.Information;
+ }
+
+ if (wsa->file_bytes != 0 && wsa->file_read >= wsa->file_bytes)
+ wsa->file = NULL;
+
+ return STATUS_PENDING;
+ }
+ }
+
+ return STATUS_SUCCESS;
+}
+
+/***********************************************************************
+ * WS2_transmitfile_base (INTERNAL)
+ *
+ * Shared implementation for both synchronous and asynchronous TransmitFile.
+ */
+static NTSTATUS WS2_transmitfile_base( int fd, struct ws2_transmitfile_async *wsa )
+{
+ NTSTATUS status;
+
+ status = WS2_transmitfile_getbuffer( fd, wsa );
+ if (status == STATUS_PENDING)
+ {
+ int n;
+
+ n = WS2_send( fd, &wsa->write, convert_flags(wsa->write.flags) );
+ if (n == -1 && errno != EAGAIN)
+ return wsaErrStatus();
+ }
+
+ return status;
+}
+
+/***********************************************************************
* TransmitFile
*/
static BOOL WINAPI WS2_TransmitFile( SOCKET s, HANDLE h, DWORD file_bytes, DWORD bytes_per_send,
@@ -2583,12 +2665,22 @@ static BOOL WINAPI WS2_TransmitFile( SOCKET s, HANDLE h, DWORD file_bytes, DWORD
{
union generic_unix_sockaddr uaddr;
unsigned int uaddrlen = sizeof(uaddr);
+ struct ws2_transmitfile_async *wsa;
+ NTSTATUS status;
int fd;
- FIXME("(%lx, %p, %d, %d, %p, %p, %d): stub !\n", s, h, file_bytes, bytes_per_send, overlapped,
- buffers, flags );
+ if (overlapped || buffers)
+ {
+ FIXME("(%lx, %p, %d, %d, %p, %p, %d): stub !\n", s, h, file_bytes, bytes_per_send,
+ overlapped, buffers, flags);
+ WSASetLastError( WSAEOPNOTSUPP );
+ return FALSE;
+ }
- fd = get_sock_fd( s, 0, NULL );
+ TRACE("(%lx, %p, %d, %d, %p, %p, %d)\n", s, h, file_bytes, bytes_per_send, overlapped,
+ buffers, flags );
+
+ fd = get_sock_fd( s, FILE_WRITE_DATA, NULL );
if (fd == -1)
{
WSASetLastError( WSAENOTSOCK );
@@ -2600,12 +2692,52 @@ static BOOL WINAPI WS2_TransmitFile( SOCKET s, HANDLE h, DWORD file_bytes, DWORD
WSASetLastError( WSAENOTCONN );
return FALSE;
}
- release_sock_fd( s, fd );
if (flags)
FIXME("Flags are not currently supported (0x%x).\n", flags);
- WSASetLastError( WSAEOPNOTSUPP );
- return FALSE;
+ /* set reasonable defaults when requested */
+ if (!bytes_per_send)
+ bytes_per_send = 1024;
+
+ if (!(wsa = (struct ws2_transmitfile_async *)alloc_async_io( sizeof(*wsa) + bytes_per_send )))
+ {
+ release_sock_fd( s, fd );
+ WSASetLastError( WSAEFAULT );
+ return FALSE;
+ }
+ wsa->buffer = (char *)(wsa + 1);
+ wsa->file = h;
+ wsa->file_read = 0;
+ wsa->file_bytes = file_bytes;
+ wsa->bytes_per_send = bytes_per_send;
+ wsa->flags = flags;
+ wsa->write.hSocket = SOCKET2HANDLE(s);
+ wsa->write.addr = NULL;
+ wsa->write.addrlen.val = 0;
+ wsa->write.flags = 0;
+ wsa->write.lpFlags = &wsa->flags;
+ wsa->write.control = NULL;
+ wsa->write.n_iovecs = 0;
+ wsa->write.first_iovec = 0;
+ wsa->write.user_overlapped = NULL;
+
+ do
+ {
+ status = WS2_transmitfile_base( fd, wsa );
+ if (status == STATUS_PENDING)
+ {
+ /* block here */
+ do_block(fd, POLLOUT, -1);
+ _sync_sock_state(s); /* let wineserver notice connection */
+ }
+ }
+ while (status == STATUS_PENDING);
+ release_sock_fd( s, fd );
+
+ if (status != STATUS_SUCCESS)
+ WSASetLastError( NtStatusToWSAError(status) );
+ HeapFree( GetProcessHeap(), 0, wsa );
+ return (status == STATUS_SUCCESS);
}
/***********************************************************************
diff --git a/dlls/ws2_32/tests/sock.c b/dlls/ws2_32/tests/sock.c
index 4180fb1..fb0b325 100644
--- a/dlls/ws2_32/tests/sock.c
+++ b/dlls/ws2_32/tests/sock.c
@@ -7115,6 +7115,32 @@ end:
closesocket(connector2);
}
+#define compare_file(h,s) compare_file2(h,s,__FILE__,__LINE__)
+
+static void compare_file2(HANDLE handle, SOCKET sock, const char *file, int line)
+{
+ char buf1[256], buf2[256];
+ BOOL success;
+ int i = 0;
+
+ SetFilePointer(handle, 0, NULL, FILE_BEGIN);
+ while (1)
+ {
+ DWORD n1 = 0, n2 = 0;
+
+ success = ReadFile(handle, buf1, sizeof(buf1), &n1, NULL);
+ ok_(file,line)(success, "Failed to read from file.\n");
+ if (success && n1 == 0)
+ break;
+ else if(!success)
+ return;
+ n2 = recv(sock, buf2, n1, 0);
+ ok_(file,line)(n1 == n2, "Block %d size mismatch (%d != %d)\n", i, n1, n2);
+ ok_(file,line)(memcmp(buf1, buf2, n2) == 0, "Block %d failed\n", i);
+ i++;
+ }
+}
+
static void test_TransmitFile(void)
{
GUID transmitFileGuid = WSAID_TRANSMITFILE;
@@ -7124,6 +7150,7 @@ static void test_TransmitFile(void)
struct sockaddr_in bindAddress;
SOCKET client, server, dest;
DWORD num_bytes, err;
+ char buf[256];
int iret, len;
BOOL bret;
@@ -7201,7 +7228,14 @@ static void test_TransmitFile(void)
/* Test TransmitFile with no possible buffer */
bret = pTransmitFile(client, NULL, 0, 0, NULL, NULL, 0);
- todo_wine ok(bret, "TransmitFile failed unexpectedly.\n");
+ ok(bret, "TransmitFile failed unexpectedly.\n");
+ iret = recv(dest, buf, sizeof(buf), 0);
+ ok(iret == -1, "Returned an unexpected buffer from TransmitFile (%d != -1).\n", iret);
+
+ /* Test TransmitFile with only file data */
+ bret = pTransmitFile(client, file, 0, 0, NULL, NULL, 0);
+ ok(bret, "TransmitFile failed unexpectedly.\n");
+ compare_file(file, dest);
/* Test TransmitFile with a UDP datagram socket */
closesocket(client);
--
2.3.3

View File

@ -1,4 +1,4 @@
From fc0e93449a708ce3f89ae87f107f07fbed452936 Mon Sep 17 00:00:00 2001
From 0a0a7b4793378c54346cd0e9e7feae6eb2a89dc3 Mon Sep 17 00:00:00 2001
From: "Erich E. Hoover" <erich.e.hoover@wine-staging.com>
Date: Wed, 4 Mar 2015 13:16:20 -0700
Subject: ws2_32: Add support for TF_DISCONNECT to TransmitFile.
@ -9,10 +9,10 @@ Subject: ws2_32: Add support for TF_DISCONNECT to TransmitFile.
2 files changed, 24 insertions(+), 3 deletions(-)
diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c
index 244f723..10d30bd 100644
index 4531b81..0f94a57 100644
--- a/dlls/ws2_32/socket.c
+++ b/dlls/ws2_32/socket.c
@@ -2644,7 +2644,16 @@ static NTSTATUS WS2_transmitfile_base( int fd, struct ws2_transmitfile_async *ws
@@ -2882,7 +2882,16 @@ static NTSTATUS WS2_transmitfile_base( int fd, struct ws2_transmitfile_async *ws
return wsaErrStatus();
}
@ -30,7 +30,7 @@ index 244f723..10d30bd 100644
}
/***********************************************************************
@@ -2683,6 +2692,7 @@ static BOOL WINAPI WS2_TransmitFile( SOCKET s, HANDLE h, DWORD file_bytes, DWORD
@@ -2919,6 +2928,7 @@ static BOOL WINAPI WS2_TransmitFile( SOCKET s, HANDLE h, DWORD file_bytes, DWORD
LPOVERLAPPED overlapped, LPTRANSMIT_FILE_BUFFERS buffers,
DWORD flags )
{
@ -38,7 +38,7 @@ index 244f723..10d30bd 100644
IO_STATUS_BLOCK *iosb = (IO_STATUS_BLOCK *)overlapped;
union generic_unix_sockaddr uaddr;
unsigned int uaddrlen = sizeof(uaddr);
@@ -2705,8 +2715,8 @@ static BOOL WINAPI WS2_TransmitFile( SOCKET s, HANDLE h, DWORD file_bytes, DWORD
@@ -2941,8 +2951,8 @@ static BOOL WINAPI WS2_TransmitFile( SOCKET s, HANDLE h, DWORD file_bytes, DWORD
WSASetLastError( WSAENOTCONN );
return FALSE;
}
@ -47,13 +47,13 @@ index 244f723..10d30bd 100644
+ if (unsupported_flags)
+ FIXME("Flags are not currently supported (0x%x).\n", unsupported_flags);
/* set reasonable defaults when requested */
if (!bytes_per_send)
if (h && GetFileType( h ) != FILE_TYPE_DISK)
{
diff --git a/dlls/ws2_32/tests/sock.c b/dlls/ws2_32/tests/sock.c
index 4716b61..36920a7 100644
index 29e20c3..d5c206c 100644
--- a/dlls/ws2_32/tests/sock.c
+++ b/dlls/ws2_32/tests/sock.c
@@ -7141,6 +7141,17 @@ static void test_TransmitFile(void)
@@ -7663,6 +7663,17 @@ static void test_TransmitFile(void)
ok(memcmp(buf, &footer_msg[0], sizeof(footer_msg)+1) == 0,
"TransmitFile footer buffer did not match!\n");
@ -72,5 +72,5 @@ index 4716b61..36920a7 100644
closesocket(client);
client = socket(AF_INET, SOCK_DGRAM, 0);
--
2.3.0
2.6.1

View File

@ -1,150 +0,0 @@
From 408befce279d57fe2f5e3e5ba12bae4a09456fda Mon Sep 17 00:00:00 2001
From: "Erich E. Hoover" <erich.e.hoover@wine-staging.com>
Date: Wed, 4 Mar 2015 15:10:43 -0700
Subject: ws2_32: Add support for TransmitFile headers and footers.
---
dlls/ws2_32/socket.c | 31 +++++++++++++++++++++++++++++--
dlls/ws2_32/tests/sock.c | 35 +++++++++++++++++++++++++++++++++++
2 files changed, 64 insertions(+), 2 deletions(-)
diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c
index 36ce0dd..e45c838 100644
--- a/dlls/ws2_32/socket.c
+++ b/dlls/ws2_32/socket.c
@@ -386,6 +386,7 @@ struct ws2_transmitfile_async
DWORD file_read;
DWORD file_bytes;
DWORD bytes_per_send;
+ TRANSMIT_FILE_BUFFERS buffers;
DWORD flags;
struct ws2_async write;
};
@@ -2560,6 +2561,17 @@ static NTSTATUS WS2_transmitfile_getbuffer( int fd, struct ws2_transmitfile_asyn
if (wsa->write.first_iovec < wsa->write.n_iovecs)
return STATUS_PENDING;
+ /* process the header (if applicable) */
+ if (wsa->buffers.Head)
+ {
+ wsa->write.first_iovec = 0;
+ wsa->write.n_iovecs = 1;
+ wsa->write.iovec[0].iov_base = wsa->buffers.Head;
+ wsa->write.iovec[0].iov_len = wsa->buffers.HeadLength;
+ wsa->buffers.Head = NULL;
+ return STATUS_PENDING;
+ }
+
/* process the main file */
if (wsa->file)
{
@@ -2573,7 +2585,7 @@ static NTSTATUS WS2_transmitfile_getbuffer( int fd, struct ws2_transmitfile_asyn
status = NtReadFile( wsa->file, 0, NULL, NULL, &iosb, wsa->buffer, bytes_per_send,
NULL, NULL );
if (status == STATUS_END_OF_FILE)
- return STATUS_SUCCESS;
+ wsa->file = NULL; /* continue on to the footer */
else if (status != STATUS_SUCCESS)
return status;
else
@@ -2594,6 +2606,17 @@ static NTSTATUS WS2_transmitfile_getbuffer( int fd, struct ws2_transmitfile_asyn
}
}
+ /* send the footer (if applicable) */
+ if (wsa->buffers.Tail)
+ {
+ wsa->write.first_iovec = 0;
+ wsa->write.n_iovecs = 1;
+ wsa->write.iovec[0].iov_base = wsa->buffers.Tail;
+ wsa->write.iovec[0].iov_len = wsa->buffers.TailLength;
+ wsa->buffers.Tail = NULL;
+ return STATUS_PENDING;
+ }
+
return STATUS_SUCCESS;
}
@@ -2632,7 +2655,7 @@ static BOOL WINAPI WS2_TransmitFile( SOCKET s, HANDLE h, DWORD file_bytes, DWORD
NTSTATUS status;
int fd;
- if (overlapped || buffers)
+ if (overlapped)
{
FIXME("(%lx, %p, %d, %d, %p, %p, %d): stub !\n", s, h, file_bytes, bytes_per_send,
overlapped, buffers, flags);
@@ -2668,6 +2691,10 @@ static BOOL WINAPI WS2_TransmitFile( SOCKET s, HANDLE h, DWORD file_bytes, DWORD
WSASetLastError( WSAEFAULT );
return FALSE;
}
+ if (buffers)
+ memcpy(&wsa->buffers, buffers, sizeof(wsa->buffers));
+ else
+ memset(&wsa->buffers, 0x0, sizeof(wsa->buffers));
wsa->buffer = (char *)(wsa + 1);
wsa->file = h;
wsa->file_read = 0;
diff --git a/dlls/ws2_32/tests/sock.c b/dlls/ws2_32/tests/sock.c
index 1288694..a93dbe3 100644
--- a/dlls/ws2_32/tests/sock.c
+++ b/dlls/ws2_32/tests/sock.c
@@ -6937,8 +6937,11 @@ static void test_TransmitFile(void)
GUID transmitFileGuid = WSAID_TRANSMITFILE;
LPFN_TRANSMITFILE pTransmitFile = NULL;
HANDLE file = INVALID_HANDLE_VALUE;
+ char header_msg[] = "hello world";
+ char footer_msg[] = "goodbye!!!";
char system_ini_path[MAX_PATH];
struct sockaddr_in bindAddress;
+ TRANSMIT_FILE_BUFFERS buffers;
SOCKET client, server, dest;
DWORD num_bytes, err;
char buf[256];
@@ -7023,11 +7026,43 @@ static void test_TransmitFile(void)
iret = recv(dest, buf, sizeof(buf), 0);
ok(iret == -1, "Returned an unexpected buffer from TransmitFile (%d != -1).\n", iret);
+ /* Test TransmitFile with only buffer data */
+ buffers.Head = &header_msg[0];
+ buffers.HeadLength = sizeof(header_msg)+1;
+ buffers.Tail = &footer_msg[0];
+ buffers.TailLength = sizeof(footer_msg)+1;
+ bret = pTransmitFile(client, NULL, 0, 0, NULL, &buffers, 0);
+ ok(bret, "TransmitFile failed unexpectedly.\n");
+ iret = recv(dest, buf, sizeof(buf), 0);
+ ok(iret == sizeof(header_msg)+sizeof(footer_msg)+2,
+ "Returned an unexpected buffer from TransmitFile (%d != %d).\n", iret,
+ sizeof(header_msg)+sizeof(footer_msg)+2);
+ ok(memcmp(&buf[0], &header_msg[0], sizeof(header_msg)+1) == 0,
+ "TransmitFile header buffer did not match!\n");
+ ok(memcmp(&buf[sizeof(header_msg)+1], &footer_msg[0], sizeof(footer_msg)+1) == 0,
+ "TransmitFile footer buffer did not match!\n");
+
/* Test TransmitFile with only file data */
bret = pTransmitFile(client, file, 0, 0, NULL, NULL, 0);
ok(bret, "TransmitFile failed unexpectedly.\n");
compare_file(file, dest);
+ /* Test TransmitFile with both file and buffer data */
+ buffers.Head = &header_msg[0];
+ buffers.HeadLength = sizeof(header_msg)+1;
+ buffers.Tail = &footer_msg[0];
+ buffers.TailLength = sizeof(footer_msg)+1;
+ SetFilePointer(file, 0, NULL, FILE_BEGIN);
+ bret = pTransmitFile(client, file, 0, 0, NULL, &buffers, 0);
+ ok(bret, "TransmitFile failed unexpectedly.\n");
+ iret = recv(dest, buf, sizeof(header_msg)+1, 0);
+ ok(memcmp(buf, &header_msg[0], sizeof(header_msg)+1) == 0,
+ "TransmitFile header buffer did not match!\n");
+ compare_file(file, dest);
+ iret = recv(dest, buf, sizeof(footer_msg)+1, 0);
+ ok(memcmp(buf, &footer_msg[0], sizeof(footer_msg)+1) == 0,
+ "TransmitFile footer buffer did not match!\n");
+
/* Test TransmitFile with a UDP datagram socket */
closesocket(client);
client = socket(AF_INET, SOCK_DGRAM, 0);
--
2.3.0