Max Kellermann
ed3d8222d6
net/SocketAddress: include cleanup
2020-10-15 15:01:19 +02:00
Max Kellermann
41c0bbab13
event/SocketMonitor: don't filter out ERROR/HANGUP
...
By bit-wise ANDing the reported flags with GetScheduledFlags(),
ERROR/HANGUP always get cleared. This means the MPD event loop could
never report those conditions.
2020-10-08 21:16:18 +02:00
Max Kellermann
eeb96eb367
event/TimerEvent: add type alias for std::chrono::steady_clock::duration
2020-10-08 20:48:50 +02:00
Max Kellermann
ce93e58944
event/TimerEvent: use using
instead of typedef
2020-10-08 20:46:18 +02:00
Max Kellermann
263b0ffdbb
event/TimerEvent: use auto_unlink hook
2020-10-08 20:46:15 +02:00
Max Kellermann
22bea5c97e
event/Loop: reorder includes
...
This just happened to break the Windows build because of the
`GetObject` macro in `windows.h`, so I added a kludge to
PollResultGeneric.hxx.
2020-10-08 20:43:21 +02:00
Max Kellermann
75802ebcc6
StateFileConfig, ...: drop obsolete out-of-class definition
2020-10-08 20:38:11 +02:00
Max Kellermann
27cc7b352d
config/Data: cast to std::chrono::steady_clock::duration properly
...
Oh no, 3413d1bf23
was broken! Instead of passing a number as
"seconds" to the duration constructor, it just abused the duration
constructor as cast operator, which caused custom state_file_interval
settings to be extremely short.
2020-10-08 20:30:33 +02:00
Max Kellermann
d64729065e
config/Parser: use std::size_t
2020-10-08 20:26:39 +02:00
Max Kellermann
ab318200db
config/{Data,Block}: use With() in GetUnsigned(), GetPositive()
2020-10-08 20:21:09 +02:00
Max Kellermann
947856ca8e
event/Loop: forward-declare class TimerEvent
2020-10-08 17:24:32 +02:00
Max Kellermann
cd9ff9d9b0
event/TimerEvent: use base_hook instead of member_hook
2020-10-08 17:00:09 +02:00
Max Kellermann
4cd0f661d6
event/Loop: use using
instead of typedef
2020-10-08 16:59:21 +02:00
Max Kellermann
bf270a5663
doc/user.rst: document io_uring
2020-10-06 19:14:44 +02:00
Max Kellermann
6e893f40e3
doc/user.rst: common startup problems
2020-10-06 19:14:18 +02:00
Max Kellermann
7690905503
doc/user.rst: remove "Question" prefix from "Common Problems"
2020-10-06 19:03:03 +02:00
Max Kellermann
6f822a6f19
doc/user.rst: remove numbers from section headers
2020-10-06 18:59:01 +02:00
Max Kellermann
ca0179b2a9
event/Loop: set the uring_initialized flag
...
Don't attempt to initialize the io_uring subsystem more than once.
2020-10-06 18:58:54 +02:00
Max Kellermann
6682cf749f
playlist/cue/parser: use lambda to fix ambiguous overload
...
On Windows, there is an IsWhitespaceOrNull() overload with TCHAR, and
the compiler doesn't know which one to pass to std::find_if().
2020-10-05 21:15:10 +02:00
Max Kellermann
492607ecbe
playlist/cue/parser: use StringView internally
...
Don't copy the input StringView.
2020-10-05 21:04:49 +02:00
Max Kellermann
e0c75da266
playlist/cue/parser: pass StringView to Feed()
2020-10-05 20:33:58 +02:00
Max Kellermann
34bb53a29f
playlist/cue/parser: add noexcept
2020-10-05 20:33:50 +02:00
Max Kellermann
cb4fdac469
playlist/cue/parser: fix nullptr dereference
...
Closes https://github.com/MusicPlayerDaemon/MPD/issues/974
2020-10-05 20:26:42 +02:00
Max Kellermann
ac46a84391
playlist/cue/parser: fix off-by-one buffer overflow
...
cue_next_word() can return a pointer one past the end of the string if
the word is followed by the terminating null byte.
2020-10-05 20:26:02 +02:00
Max Kellermann
dffd5831f8
test/fuzzer: a simple fuzzer using libFuzzer
...
This commit adds some basic infrastructure for fuzzers, and adds a
fuzzer for the CUE sheet parser.
2020-10-05 20:25:26 +02:00
Max Kellermann
8358b34efa
meson_options.txt: move "test" to a new section
2020-10-05 19:44:52 +02:00
Max Kellermann
4484d7a5c2
output/jack: implement Interrupt()
2020-10-02 11:00:04 +02:00
Max Kellermann
b80a135cf3
output/pulse: implement Interrupt()
2020-10-02 10:52:25 +02:00
Max Kellermann
4ad525d939
output/alsa: implement Interrupt()
...
This allows canceling the blocking method LockWaitWriteAvailable(),
and thus allows breaking free of misbehaving ALSA drivers, avoiding a
MPD lockup.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/966
2020-10-02 10:35:18 +02:00
Max Kellermann
4cb5e69811
output/Interface: add virtual method Interrupt()
...
This allows interrupting the output thread (for some plugins which
implement this method). This way, operations can be canceled
properly, instead of waiting for some external entity.
2020-10-02 10:20:39 +02:00
Max Kellermann
b0596291a8
output/Thread: simplify the main loop switch
...
Move the InternalPlay() call and the wake_cond.wait() call into the
`case Command::NONE` and revert all `continue` statements to a simple
`break`.
2020-10-02 10:10:53 +02:00
Max Kellermann
8f0a1a5d82
output/Interface: add noexcept
2020-10-01 20:44:14 +02:00
Max Kellermann
c0775d328c
output/Filtered: move try/catch from IteratePause() to caller
2020-10-01 20:44:11 +02:00
Max Kellermann
4ca2c33181
doc/meson.build: check both html_manual and manpages
...
Closes https://github.com/MusicPlayerDaemon/MPD/issues/960
2020-09-30 12:11:20 +02:00
Max Kellermann
362f391b76
Merge remote-tracking branches 'neheb/defa', 'neheb/auto' and 'neheb/clocale' into master
2020-09-30 11:48:05 +02:00
Rosen Penev
980e32f69c
remove clocale test
...
clocale is part of C++11.
In practical terms, gcc's libstdc++ comes with its own locale defines
when the libc does not have them.
Also reworked to be dependent on !ANDROID.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-09-29 14:51:17 -07:00
Rosen Penev
dd639e18b8
clang-tidy: remove pointless std::move
...
Found with performance-move-const-arg
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-09-26 21:34:25 -07:00
Rosen Penev
c883f178b8
clang-tidy: use auto
...
Found with modernize-use-auto
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-09-26 21:33:35 -07:00
Max Kellermann
65d257675f
increment version number to 0.22.1
2020-09-23 16:15:44 +02:00
Max Kellermann
56fa7368e8
release v0.22
2020-09-23 15:26:51 +02:00
Max Kellermann
e9df4116fd
db/upnp: store UPnPDirContent in local variable
...
Fixes use-after-free because the temporary goes out of scope.
2020-09-23 15:25:39 +02:00
Max Kellermann
5492304254
meson.build: drop obsolete warning flag -Wno-noexcept-type
...
We don't support GCC 7 anymore.
2020-09-23 15:13:19 +02:00
Max Kellermann
416d4e4433
NEWS: update recommended compilers
2020-09-23 15:12:17 +02:00
Max Kellermann
eae2863286
doc/user.rst: add GitHub link
2020-09-23 15:11:00 +02:00
Max Kellermann
39bc196f64
doc/user.rst: move download link to downloads page
2020-09-23 15:07:50 +02:00
Max Kellermann
157dfa320f
doc: improve manpage markup
2020-09-23 15:04:22 +02:00
Max Kellermann
9b4f2ac79b
doc/meson.build: kludge to fix manpage installation directory
...
Ugly workaround for https://github.com/mesonbuild/meson/issues/1550
2020-09-23 14:47:43 +02:00
Max Kellermann
c843bce9f5
LogLevel: rename DEFAULT to NOTICE
...
"DEFAULT" is a bad name - all it says is that it's the default value,
but it doesn't say what it means. The name NOTICE mimics the syslog
level.
2020-09-23 14:22:33 +02:00
Max Kellermann
e3106a019d
LogInit: provide mappings for LogLevel::{ERROR,WARNING}
2020-09-23 14:17:11 +02:00
Max Kellermann
3e0ceb12d5
LogInit: rename "secure" to "info"
...
Calling this "secure" never made sense. Messages about client
connects are just a small part of what gets logged as "secure",
a.k.a. "info".
2020-09-23 14:15:58 +02:00