Currently, the server prints something like the following with
loglevel error:
Sep 05 21:19:42 (4) (31845) open_next_audio_file: key not found in rbtree
Sep 05 21:19:42 (4) (31844) recv_afs_result: afs code: 1, expected: 0
Sep 05 21:19:42 (4) (31844) recv_afs_result: did not receive open fd from afs
This is both cryptic and scary, given that this error is handled by
simply clearing the play bit from the vss status flags.
This commit changes the code to only print one clear log message with
loglevel notice:
Sep 05 21:34:45 (3) (5233) log_statistics: no admissible files
ret = open_and_update_audio_file(&afd);
if (ret < 0) {
- PARA_ERROR_LOG("%s\n", para_strerror(-ret));
+ if (ret != -OSL_ERRNO_TO_PARA_ERROR(E_OSL_RB_KEY_NOT_FOUND))
+ PARA_ERROR_LOG("%s\n", para_strerror(-ret));
goto no_admissible_files;
}
shmid = ret;
if (ret < 0)
goto err;
vsst->afsss = AFS_SOCKET_READY;
+ if (afs_code == NO_ADMISSIBLE_FILES) {
+ PARA_NOTICE_LOG("no admissible files\n");
+ ret = 0;
+ goto err;
+ }
ret = -E_NOFD;
if (afs_code != NEXT_AUDIO_FILE) {
PARA_ERROR_LOG("afs code: %u, expected: %d\n", afs_code,
mmd->afd.afhi.chunk_table = NULL;
if (passed_fd >= 0)
close(passed_fd);
- PARA_ERROR_LOG("%s\n", para_strerror(-ret));
+ if (ret < 0)
+ PARA_ERROR_LOG("%s\n", para_strerror(-ret));
mmd->new_vss_status_flags = VSS_NEXT;
}