From: Andre Noll Date: Sun, 18 Sep 2022 14:28:33 +0000 (+0200) Subject: Merge branch 'refs/heads/t/ll' X-Git-Tag: v0.7.1~5 X-Git-Url: http://git.tue.mpg.de/?a=commitdiff_plain;h=5967ac5353739c3ff571dd12d4c6814fa8493ad8;p=paraslash.git Merge branch 'refs/heads/t/ll' Two little cleanups related to the logging facility and two commits which add the ll command to para_server and para_audiod. The merge resulted in a conflict in afs.c due to the earlier merge of the poll topic branch which replaced all calls to select() by calls to poll(). The implementation of the ll server command introduced a new caller of select(), afs_select(), which needs to be replaced by afs_poll() to resolve the conflict. * refs/heads/t/ll: New server command: ll to change the log level at runtime. New audiod command: ll to change the log level at runtime. daemon: Kill get_loglevel_by_name(). server/audiod: Don't parse loglevel argument unnecessarily. --- 5967ac5353739c3ff571dd12d4c6814fa8493ad8 diff --cc NEWS.md index 0f2eec0d,e9713d98..e5b99010 --- a/NEWS.md +++ b/NEWS.md @@@ -5,17 -5,6 +5,17 @@@ NEW 0.7.1 (to be announced) "digital spindrift" ------------------------------------------- +- The autogen.sh script now only creates the autoconf specific files + but no longer runs configure, make and the test suite. - +- A stripped down copy of the discontinued libmp4ff library has become + part of the paraslash code base. As a result it is no longer necessary + to install faad from source to get support for aac/m4a files. The + faad decoder package must still be installed. - ++- The log level of the running daemon can now be changed with the ++ new ll command. It is available for para_server and para_audiod. +- All calls to select(2) have been replaced by calls to poll(2) + to avoid known shortcomings of the select API. + [tarball](./releases/paraslash-git.tar.xz) ---------------------------------- diff --cc afs.c index febe13b3,21ab9ae8..f2908029 --- a/afs.c +++ b/afs.c @@@ -979,6 -980,15 +980,14 @@@ static void register_command_task(struc }, s); } -static int afs_select(int max_fileno, fd_set *readfds, fd_set *writefds, - struct timeval *timeout_tv) ++static int afs_poll(struct pollfd *fds, nfds_t nfds, int timeout) + { + mutex_lock(mmd_mutex); + daemon_set_loglevel(mmd->loglevel); + mutex_unlock(mmd_mutex); - return para_select(max_fileno + 1, readfds, writefds, timeout_tv); ++ return xpoll(fds, nfds, timeout); + } + /** * Initialize the audio file selector process. * @@@ -1003,7 -1013,9 +1012,8 @@@ __noreturn void afs_init(int socket_fd PARA_INFO_LOG("server_socket: %d\n", server_socket); init_admissible_files(OPT_STRING_VAL(AFS_INITIAL_MODE)); register_command_task(&s); - s.select_function = afs_select; - s.default_timeout.tv_sec = 0; - s.default_timeout.tv_usec = 999 * 1000; + s.default_timeout = 1000; ++ s.poll_function = afs_poll; ret = write(socket_fd, "\0", 1); if (ret != 1) { if (ret == 0) diff --cc server.c index 2c66cc27,b9026ad6..2852ee1f --- a/server.c +++ b/server.c @@@ -621,9 -626,10 +625,10 @@@ static int server_poll(struct pollfd *f { int ret; + daemon_set_loglevel(mmd->loglevel); status_refresh(); mutex_unlock(mmd_mutex); - ret = para_select(max_fileno + 1, readfds, writefds, timeout_tv); + ret = xpoll(fds, nfds, timeout); mutex_lock(mmd_mutex); return ret; }