advapi32/tests: Cope with empty servername.
This commit is contained in:
parent
84d689bd58
commit
6bdbf6ee4c
dlls/advapi32
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue