Module: wine
Branch: master
Commit: 443ae2290a0d3e5e2e763c1a17baf7f1d281f30e
URL: http://source.winehq.org/git/wine.git/?a=commit;h=443ae2290a0d3e5e2e763c1a1…
Author: Paul Vriens <paul.vriens.wine(a)gmail.com>
Date: Mon Feb 26 19:47:24 2007 +0100
wininet/tests: Add another test.
---
dlls/wininet/tests/ftp.c | 25 ++++++++++++++++++++++++-
1 files changed, 24 insertions(+), 1 deletions(-)
diff --git a/dlls/wininet/tests/ftp.c b/dlls/wininet/tests/ftp.c
index fc86bb1..b10e8d1 100644
--- a/dlls/wininet/tests/ftp.c
+++ b/dlls/wininet/tests/ftp.c
@@ -236,6 +236,7 @@ static void test_getfile(void)
{
BOOL bRet;
HINTERNET hInternet, hFtp, hConnect;
+ HANDLE hFile;
/* The order of checking is:
*
@@ -317,7 +318,29 @@ static void test_getfile(void)
"Local file should not have been created\n");
DeleteFileA("should_be_non_existing_deadbeef");
- /* Remote file doesn't exist */
+ /* Remote file doesn't exist (and local doesn't exist as well) */
+ SetLastError(0xdeadbeef);
+ bRet = FtpGetFileA(hFtp, "should_be_non_existing_deadbeef", "should_also_be_non_existing_deadbeef", FALSE, FILE_ATTRIBUTE_NORMAL, FTP_TRANSFER_TYPE_UNKNOWN, 0);
+ ok ( bRet == FALSE, "Expected FtpGetFileA to fail\n");
+ todo_wine
+ {
+ ok ( GetLastError() == ERROR_INTERNET_EXTENDED_ERROR,
+ "Expected ERROR_INTERNET_EXTENDED_ERROR, got %d\n", GetLastError());
+ /* Currently Wine always creates the local file (even on failure) which is not correct, hence the test */
+ ok (GetFileAttributesA("should_also_be_non_existing_deadbeef") == INVALID_FILE_ATTRIBUTES,
+ "Local file should not have been created\n");
+ }
+ DeleteFileA("should_also_be_non_existing_deadbeef");
+
+ /* Same call as the previous but now the local file does exists. Windows just removes the file if the call fails
+ * even if the local existed before!
+ */
+
+ /* Create a temporary local file */
+ SetLastError(0xdeadbeef);
+ hFile = CreateFileA("should_also_be_non_existing_deadbeef", GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, NULL);
+ ok ( hFile != NULL, "Error creating a local file : %d\n", GetLastError());
+ CloseHandle(hFile);
SetLastError(0xdeadbeef);
bRet = FtpGetFileA(hFtp, "should_be_non_existing_deadbeef", "should_also_be_non_existing_deadbeef", FALSE, FILE_ATTRIBUTE_NORMAL, FTP_TRANSFER_TYPE_UNKNOWN, 0);
ok ( bRet == FALSE, "Expected FtpGetFileA to fail\n");
Module: wine
Branch: master
Commit: 74d2632756e83b581ea38525735fb7475aab57a4
URL: http://source.winehq.org/git/wine.git/?a=commit;h=74d2632756e83b581ea385257…
Author: Stefan Dösinger <stefan(a)codeweavers.com>
Date: Mon Feb 26 13:38:17 2007 +0100
wined3d: Index buffer creation adjustments.
Index buffer creation changes the bound gl buffer, thus the state has to
be dirtified, similar to locking.
In an error case the function returned without calling LEAVE_GL().
---
dlls/wined3d/device.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index b1e9c2d..500a857 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -447,6 +447,11 @@ static void CreateIndexBufferVBO(IWineD3DDeviceImpl *This, IWineD3DIndexBufferIm
GLenum error, glUsage;
TRACE("Creating VBO for Index Buffer %p\n", object);
+ /* The following code will modify the ELEMENT_ARRAY_BUFFER binding, make sure it is
+ * restored on the next draw
+ */
+ IWineD3DDeviceImpl_MarkStateDirty(This, STATE_INDEXBUFFER);
+
ENTER_GL();
while(glGetError());
@@ -454,8 +459,7 @@ static void CreateIndexBufferVBO(IWineD3DDeviceImpl *This, IWineD3DIndexBufferIm
error = glGetError();
if(error != GL_NO_ERROR || object->vbo == 0) {
ERR("Creating a vbo failed, continueing without vbo for this buffer\n");
- object->vbo = 0;
- return;
+ goto out;
}
GL_EXTCALL(glBindBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB, object->vbo));