Signed-off-by: Brendan Shanks bshanks@codeweavers.com --- dlls/kernel32/tests/thread.c | 2 -- server/thread.c | 4 +++- 2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/kernel32/tests/thread.c b/dlls/kernel32/tests/thread.c index 9c58095fe01..dde0c6cec04 100644 --- a/dlls/kernel32/tests/thread.c +++ b/dlls/kernel32/tests/thread.c @@ -2519,13 +2519,11 @@ static void test_thread_description(void) thread = OpenThread(THREAD_SET_LIMITED_INFORMATION, FALSE, GetCurrentThreadId());
hr = pSetThreadDescription(thread, desc); - todo_wine ok(hr == HRESULT_FROM_NT(STATUS_SUCCESS), "Failed to set thread description, hr %#x.\n", hr);
ptr = NULL; hr = pGetThreadDescription(GetCurrentThread(), &ptr); ok(hr == HRESULT_FROM_NT(STATUS_SUCCESS), "Failed to get thread description, hr %#x.\n", hr); - todo_wine ok(!lstrcmpW(ptr, desc), "Unexpected description %s.\n", wine_dbgstr_w(ptr)); LocalFree(ptr);
diff --git a/server/thread.c b/server/thread.c index 467ccd1f0db..ede64087e91 100644 --- a/server/thread.c +++ b/server/thread.c @@ -1533,8 +1533,10 @@ DECL_HANDLER(get_thread_times) DECL_HANDLER(set_thread_info) { struct thread *thread; + unsigned int access = (req->mask == SET_THREAD_INFO_DESCRIPTION) ? THREAD_SET_LIMITED_INFORMATION + : THREAD_SET_INFORMATION;
- if ((thread = get_thread_from_handle( req->handle, THREAD_SET_INFORMATION ))) + if ((thread = get_thread_from_handle( req->handle, access ))) { set_thread_info( thread, req ); release_object( thread );