[Wine-devel] Eter's patch is applied to winehq repo 10/13/11

builder на builder.office.etersoft.ru builder на builder.office.etersoft.ru
Чт Окт 13 07:20:31 MSD 2011


New Etersoft's patches since last build time:
commit d0451f6b3f1c6ad9501fcf11ac1d8e6bd202a121
Author: Alexander Morozov <amorozov на etersoft.ru>

    server: Fix overlapping shared and exclusive locks support.

---

commit d0451f6b3f1c6ad9501fcf11ac1d8e6bd202a121
Author: Alexander Morozov <amorozov на etersoft.ru>
Date:   Wed Oct 12 14:58:57 2011 +0400

    server: Fix overlapping shared and exclusive locks support.

diff --git a/dlls/kernel32/tests/file.c b/dlls/kernel32/tests/file.c
index f607cfd..a720d52 100644
--- a/dlls/kernel32/tests/file.c
+++ b/dlls/kernel32/tests/file.c
@@ -1671,7 +1671,6 @@ static void test_LockFile(void)
     ok( !LockFileEx( handle2, LOCKFILE_FAIL_IMMEDIATELY, 0, 100, 0, &overlapped ),
         "LockFileEx handle2 300,100 succeeded\n" );
     ret = LockFileEx( handle, LOCKFILE_FAIL_IMMEDIATELY, 0, 100, 0, &overlapped );
-    todo_wine
     ok( ret, "LockFileEx 300,100 failed\n" );
     ok( UnlockFileEx( handle, 0, 100, 0, &overlapped ), "UnlockFileEx 300,100 failed\n" );
     /* exclusive lock is removed first */
diff --git a/server/fd.c b/server/fd.c
index 798f99e..a8b3a5f 100644
--- a/server/fd.c
+++ b/server/fd.c
@@ -1321,9 +1321,9 @@ static struct file_lock *add_lock( struct fd *fd, int shared, file_pos_t start,
         release_object( lock );
         return NULL;
     }
-    list_add_head( &fd->locks, &lock->fd_entry );
-    list_add_head( &fd->inode->locks, &lock->inode_entry );
-    list_add_head( &lock->process->locks, &lock->proc_entry );
+    list_add_tail( &fd->locks, &lock->fd_entry );
+    list_add_tail( &fd->inode->locks, &lock->inode_entry );
+    list_add_tail( &lock->process->locks, &lock->proc_entry );
     return lock;
 }
 
@@ -1395,7 +1395,7 @@ obj_handle_t lock_fd( struct fd *fd, file_pos_t start, file_pos_t count, int sha
     {
         struct file_lock *lock = LIST_ENTRY( ptr, struct file_lock, inode_entry );
         if (!lock_overlaps( lock, start, end )) continue;
-        if (lock->shared && shared) continue;
+        if (shared && (lock->shared || lock->fd == fd)) continue;
         /* found one */
         if (!wait)
         {


Подробная информация о списке рассылки Wine-devel