diff --git a/changes.txt b/changes.txt index fcc98f9..bcfcf0c 100644 --- a/changes.txt +++ b/changes.txt @@ -17,6 +17,10 @@ Version 0.3.2: initialisation. Cleanup: Cleaned up error handling in SPInit. + + Cleanup: Updated logging API. + + Bugfix: Log stub DLL name rather than target DLL when logging calls. Version 0.3.1: Bugfix: Fixed deadlock in DirectPlay service provider. diff --git a/mkstubs.pl b/mkstubs.pl index 9be892a..0115b55 100644 --- a/mkstubs.pl +++ b/mkstubs.pl @@ -71,7 +71,7 @@ foreach my $func(@stubs) { if($do_logging) { print CODE "\tpush\t$f_name\_sym\n"; - print CODE "\tpush\tdword ".$func->{"dllnum"}."\n"; + print CODE "\tpush\tdword $dllnum\n"; print CODE "\tcall\t_log_call\n"; } diff --git a/src/log.c b/src/log.c index 523bcb2..60d9ea2 100644 --- a/src/log.c +++ b/src/log.c @@ -59,6 +59,10 @@ void log_close() { void log_printf(enum ipx_log_level level, const char *fmt, ...) { DWORD called = GetTickCount(); + if(level < min_log_level) { + return; + } + WaitForSingleObject(log_mutex, INFINITE); if(!log_fh) {