vss: Improve error diagnostics.
authorAndre Noll <maan@tuebingen.mpg.de>
Sat, 2 Nov 2019 13:47:15 +0000 (14:47 +0100)
committerAndre Noll <maan@tuebingen.mpg.de>
Sun, 8 Dec 2019 08:51:01 +0000 (09:51 +0100)
Unless in debug loglevel, para_server prints

Nov 01 17:06:03 (4) (18596) open_next_audio_file: key not found in rbtree
Nov 01 17:06:03 (4) (18595) recv_afs_result: did not receive open fd from afs

which does not include information about what was actually received.

vss.c

diff --git a/vss.c b/vss.c
index 73c7231128b94152268b1bc8ea02d1f524b25b6a..023b2c1d3cc8fcc0dcf23f0b5d2fc5c43487012f 100644 (file)
--- a/vss.c
+++ b/vss.c
@@ -959,11 +959,12 @@ static void recv_afs_result(struct vss_task *vsst, fd_set *rfds)
        if (ret < 0)
                goto err;
        vsst->afsss = AFS_SOCKET_READY;
        if (ret < 0)
                goto err;
        vsst->afsss = AFS_SOCKET_READY;
-       PARA_DEBUG_LOG("fd: %d, code: %u, shmid: %u\n", passed_fd, afs_code,
-               afs_data);
        ret = -E_NOFD;
        ret = -E_NOFD;
-       if (afs_code != NEXT_AUDIO_FILE)
+       if (afs_code != NEXT_AUDIO_FILE) {
+               PARA_ERROR_LOG("afs code: %u, expected: %d\n", afs_code,
+                       NEXT_AUDIO_FILE);
                goto err;
                goto err;
+       }
        if (passed_fd < 0)
                goto err;
        shmid = afs_data;
        if (passed_fd < 0)
                goto err;
        shmid = afs_data;