server: Fix stop mode.
authorAndre Noll <maan@systemlinux.org>
Sat, 12 Apr 2008 11:02:47 +0000 (13:02 +0200)
committerAndre Noll <maan@systemlinux.org>
Sat, 12 Apr 2008 11:02:47 +0000 (13:02 +0200)
Do not try to unmap the audio file twice.

vss.c

diff --git a/vss.c b/vss.c
index e21a1ff..7b84dcf 100644 (file)
--- a/vss.c
+++ b/vss.c
@@ -230,11 +230,13 @@ static void vss_eof(void)
        struct timeval now;
        char *tmp;
 
+       if (!map)
+               return;
        if (mmd->new_vss_status_flags & VSS_NOMORE)
                mmd->new_vss_status_flags = VSS_NEXT;
        gettimeofday(&now, NULL);
        tv_add(&mmd->afd.afhi.eof_tv, &now, &eof_barrier);
-       munmap(map, mmd->size);
+       para_munmap(map, mmd->size);
        map = NULL;
        mmd->chunks_sent = 0;
        mmd->offset = 0;