]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
Merge /fml/ag-raetsch/home/maan/scm/paraslash_meins/paraslash
authorAndre Noll <maan@systemlinux.org>
Mon, 26 Mar 2007 12:51:03 +0000 (14:51 +0200)
committerAndre Noll <maan@systemlinux.org>
Mon, 26 Mar 2007 12:51:03 +0000 (14:51 +0200)
Conflicts:

mp3_afh.c

Fix the conflict and add more detailed error message to para_mmap().

fd.c
mp3_afh.c
server.h

diff --git a/fd.c b/fd.c
index 1116f9e880b8013207fdd58e8d7a06808e0e48db..db1825cdbf991c3426270c5dc8a00ad0b9cd6499 100644 (file)
--- a/fd.c
+++ b/fd.c
@@ -163,7 +163,9 @@ void *para_mmap(size_t length, int prot, int flags, int fd, off_t offset)
        void *ret = mmap(NULL, length, prot, flags, fd, offset);
        if (ret != MAP_FAILED)
                return ret;
-       PARA_EMERG_LOG("mmap failed: %s", strerror(errno));
+       PARA_EMERG_LOG("mmap failed: %s\n", strerror(errno));
+       PARA_EMERG_LOG("length: %zu, flags: %d, fd: %d, offset: %zu\n",
+               length, flags, fd, offset);
        exit(EXIT_FAILURE);
 }
 
index 8ca319b4705c9c12492ef2f26a418affb4cd39c3..9ef5dffb76a6c46542d827d3674e202ee27204a9 100644 (file)
--- a/mp3_afh.c
+++ b/mp3_afh.c
@@ -122,7 +122,7 @@ static int header_channels(struct mp3header *h)
 
 static int header_bitrate(struct mp3header *h)
 {
-       if (h->layer > 3 || h->bitrate > 14)
+       if (!h->layer || h->layer > 3 || h->bitrate > 14 || !h->bitrate)
                return -E_HEADER_BITRATE;
        return mp3info_bitrate[h->version & 1][3 - h->layer][h->bitrate - 1];
 }
index b33ba1dd806f91c027027e01099fb6a12fad06c6..3f01e05e9eb70f3c73eb5e2f15dd7e08b0ca3770 100644 (file)
--- a/server.h
+++ b/server.h
@@ -20,7 +20,6 @@
 
 #include "para.h"
 #include "afh.h"
-#include <openssl/pem.h>
 
 /** size of the selector_info and audio_file info strings of struct misc_meta_data */
 #define MMD_INFO_SIZE 16384