vss: Improve error diagnostics. master
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 73c7231..023b2c1 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;
-       PARA_DEBUG_LOG("fd: %d, code: %u, shmid: %u\n", passed_fd, afs_code,
-               afs_data);
        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;
+       }
        if (passed_fd < 0)
                goto err;
        shmid = afs_data;