Commit 6bdbf6ee authored by Paul Vriens's avatar Paul Vriens Committed by Alexandre Julliard

advapi32/tests: Cope with empty servername.

parent 84d689bd
......@@ -324,7 +324,7 @@ HANDLE WINAPI OpenEventLogW( LPCWSTR uncname, LPCWSTR source )
return NULL;
}
if (uncname)
if (uncname && uncname[0])
{
FIXME("Remote server not supported\n");
SetLastError(RPC_S_SERVER_UNAVAILABLE);
......
......@@ -73,6 +73,11 @@ static void test_open_close(void)
ok(GetLastError() == ERROR_INVALID_HANDLE, "Expected ERROR_INVALID_HANDLE, got %d\n", GetLastError());
}
/* Empty servername should be read as local server */
handle = OpenEventLogA("", "Application");
ok(handle != NULL, "Expected a handle\n");
CloseEventLog(handle);
handle = OpenEventLogA(NULL, "Application");
ok(handle != NULL, "Expected a handle\n");
CloseEventLog(handle);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment