Jacek Caban : server: Reset event in set_registry_notification.
Alexandre Julliard
julliard at wine.codeweavers.com
Mon Nov 9 08:34:18 CST 2015
Module: wine
Branch: master
Commit: deba2faf607f989f1277eacd08952082fc344fe5
URL: http://source.winehq.org/git/wine.git/?a=commit;h=deba2faf607f989f1277eacd08952082fc344fe5
Author: Jacek Caban <jacek at codeweavers.com>
Date: Mon Nov 9 12:42:28 2015 +0100
server: Reset event in set_registry_notification.
Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/ntdll/tests/reg.c | 2 +-
server/registry.c | 3 +++
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/dlls/ntdll/tests/reg.c b/dlls/ntdll/tests/reg.c
index 7b4ae25..3dfca57 100644
--- a/dlls/ntdll/tests/reg.c
+++ b/dlls/ntdll/tests/reg.c
@@ -1520,7 +1520,7 @@ static void test_notify(void)
status = pNtOpenKey(&key, KEY_ALL_ACCESS, &attr);
ok(status == STATUS_SUCCESS, "NtOpenKey Failed: 0x%08x\n", status);
- event = CreateEventW(NULL, FALSE, FALSE, NULL);
+ event = CreateEventW(NULL, FALSE, TRUE, NULL);
ok(event != NULL, "CreateEvent failed: %u\n", GetLastError());
status = pNtNotifyChangeKey(key, event, NULL, NULL, &iosb, REG_NOTIFY_CHANGE_NAME, FALSE, NULL, 0, TRUE);
diff --git a/server/registry.c b/server/registry.c
index 5b4250b..f9b1cd5 100644
--- a/server/registry.c
+++ b/server/registry.c
@@ -2290,7 +2290,10 @@ DECL_HANDLER(set_registry_notification)
}
}
if (notify)
+ {
+ reset_event( event );
set_error( STATUS_PENDING );
+ }
release_object( event );
}
release_object( key );
More information about the wine-cvs
mailing list