From a1c2a47f2b5bdcae8de9941ea7c90921fb583c84 Mon Sep 17 00:00:00 2001 From: Ron Pedde Date: Thu, 8 Jun 2006 10:10:23 +0000 Subject: [PATCH] Make event logs register correctly, turn down the select error on windows rendezvous, and fix crash on short mp3 files. --- src/os-win32.c | 1 + src/rend-win32.c | 2 +- src/scan-mp3.c | 3 +-- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/os-win32.c b/src/os-win32.c index 9412c4b9..00386f0e 100644 --- a/src/os-win32.c +++ b/src/os-win32.c @@ -110,6 +110,7 @@ void os_deinit(void) { * open the syslog (eventlog) */ int os_opensyslog(void) { + elog_register(); return elog_init(); } diff --git a/src/rend-win32.c b/src/rend-win32.c index 0b38334e..c90a2b6f 100644 --- a/src/rend-win32.c +++ b/src/rend-win32.c @@ -93,7 +93,7 @@ void *rend_mainthread(void *arg) { // myTimerCallBack(); } else { - DPRINTF(E_LOG,L_REND,"select() returned %d errno %d %s\n", result, errno, strerror(errno)); + DPRINTF(E_INF,L_REND,"select() returned %d errno %d %s\n", result, errno, strerror(errno)); if (errno != EINTR) rend_stop_flag = 1; } } diff --git a/src/scan-mp3.c b/src/scan-mp3.c index 1de189b6..5a7b3859 100644 --- a/src/scan-mp3.c +++ b/src/scan-mp3.c @@ -978,8 +978,7 @@ int scan_mp3_get_mp3fileinfo(char *file, MP3FILE *pmp3) { /* back-calculate bitrate from duration */ if(pmp3->song_length) { /* could still be unknown */ - pmp3->bitrate = ((file_size / 1000) * 8) / - (pmp3->song_length / 1000); + pmp3->bitrate = (file_size / pmp3->song_length) * 8; } }