Paul Vriens : advapi32/tests: Cope with empty servername.
Module: wine Branch: master Commit: 6bdbf6ee4cdd0292aefed9e874e0ce45a16b365a URL: http://source.winehq.org/git/wine.git/?a=commit;h=6bdbf6ee4cdd0292aefed9e874... Author: Paul Vriens <Paul.Vriens.Wine(a)gmail.com> Date: Tue Oct 27 10:27:28 2009 +0100 advapi32/tests: Cope with empty servername. --- dlls/advapi32/eventlog.c | 2 +- dlls/advapi32/tests/eventlog.c | 5 +++++ 2 files changed, 6 insertions(+), 1 deletions(-) diff --git a/dlls/advapi32/eventlog.c b/dlls/advapi32/eventlog.c index 82bff01..495623c 100644 --- a/dlls/advapi32/eventlog.c +++ b/dlls/advapi32/eventlog.c @@ -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); diff --git a/dlls/advapi32/tests/eventlog.c b/dlls/advapi32/tests/eventlog.c index 3567a8c..9fdf745 100644 --- a/dlls/advapi32/tests/eventlog.c +++ b/dlls/advapi32/tests/eventlog.c @@ -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);
participants (1)
-
Alexandre Julliard