From e7788710ef8d47751f7f23ee1d9697d44d2968df Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Thu, 22 Mar 2007 16:15:42 +0100 Subject: [PATCH] vss.c: Don't try to mmap empty files as this causes mmap() to return MAP_FAILED, i.e. para_mmap() calls exit() so para_server dies, which clearly is inapproriate. Instead, skip the audio file and try the next one if size == 0. --- vss.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vss.c b/vss.c index 8e9c17bf..cb2d16c8 100644 --- a/vss.c +++ b/vss.c @@ -268,7 +268,8 @@ static void vss_get_audio_file(void) audio_file = open(sl[i], O_RDONLY); if (audio_file < 0) continue; - if (fstat(audio_file, &file_status) == -1) { + if (fstat(audio_file, &file_status) == -1 || + !file_status.st_size) { close(audio_file); continue; } -- 2.39.2