Commit Graph

11904 Commits

Author SHA1 Message Date
Max Kellermann
29e1b6e465 mixer/alsa: reset the MultiSocketMonitor in the destructor
Fixes potential crash bug.
2017-02-09 21:13:19 +01:00
Max Kellermann
eda06993f8 event/MultiSocketMonitor: add method Reset() 2017-02-09 21:12:23 +01:00
Max Kellermann
4b30ef1cf2 event/MultiSocketMonitor: use C++11 initializer 2017-02-09 21:12:23 +01:00
Max Kellermann
e92e5e8eb8 event/MultiSocketMonitor: more API documentation
Now ClearSocketList() may only be called from PrepareSockets().
Calling it before destroying the object doesn't work properly, because
it doesn't unregister the TimeoutMonitor and the IdleMonitor.  Some of
its callers need to be fixed.
2017-02-09 21:12:23 +01:00
Max Kellermann
4e5271fcdf event/Call: allow usage during shutdown
Change EventLoop::IsInside() call to EventLoop::IsInsideOrNull().
This means that BlockingCall() may be used during shutdown, after the
main EventLoop::Run() has finished.  This is important because mixers
are currently registered in the main EventLoop.
2017-02-09 21:12:23 +01:00
Max Kellermann
3c55487a16 configure.ac: don't require libsidutils when building with libsidplayfp
The libsidplayfp fork has merged libsidutils into the main library.
The libsidutils we used to link with was part of the original
libsidplay project.
2017-02-09 13:09:03 +01:00
Max Kellermann
76a1cae5d8 {input,mixer}/alsa: fix off-by-one bug in count check
Doesn't make a practical difference - but it's more correct this way.
2017-02-09 12:46:49 +01:00
Max Kellermann
3850716522 command/Database: add "sort" parameter to "find" and "search"
Implement the second part of https://bugs.musicpd.org/view.php?id=3990
2017-02-08 11:22:08 +01:00
Max Kellermann
1e0a60e73d doc/protocol: remove UTF-8 explanation
These days, this is common knowledge, and doesn't need a lengthy
explanation.
2017-02-08 11:22:08 +01:00
Max Kellermann
e9c99e0518 DetachedSong: add LightSong cast operator 2017-02-08 10:38:25 +01:00
Max Kellermann
332baa4f67 DetachedSong: don't declare empty destructor
An explicit destructor prevents usage of implicit move operators, even
if it's empty.  Therefore, declaring a defaulted destructor with GCC
attribute "noinline" does what we want without preventing those
implicit operators.
2017-02-08 10:24:45 +01:00
Max Kellermann
08879d2a20 DetachedSong: add move operator 2017-02-08 10:24:40 +01:00
Max Kellermann
1292af4768 Revert "DetachedSong: remove explicitly-defaulted copy/move constructors"
This reverts commit 67b7d46432.

Turns out I was wrong, and mentioning these does make a difference:
the implicit move constructor is not defined in the presence of a
user-declared destructor.
2017-02-08 10:21:35 +01:00
Max Kellermann
4d88a099f9 Compiler.h: add gcc_noinline 2017-02-08 10:17:21 +01:00
Max Kellermann
777e15bd78 db/DatabaseSong: make the Storage optional
Some database plugins don't use a Storage (e.g. UPnP), and with this
plugin, DatabaseDetachSong() can crash.
2017-02-08 10:05:55 +01:00
Max Kellermann
f689e28958 SongLoader: return instance, not pointer 2017-02-08 10:02:08 +01:00
Max Kellermann
d184231169 db/DatabaseSong: DatabaseDetachSong(uri) returns instance, not pointer 2017-02-08 09:59:12 +01:00
Max Kellermann
7225e919fc db/DatabaseSong: use AtScopeExit() 2017-02-08 09:58:40 +01:00
Max Kellermann
7a185f1ead queue/PlaylistUpdate: assert Database::GetSong()!=nullptr 2017-02-08 09:53:14 +01:00
Max Kellermann
c1fa5279f4 db/Interface: clarify GetSong() error handling 2017-02-08 09:50:30 +01:00
Max Kellermann
4f0fe66f69 DetachedSong: make the LightSong constructor public
Sometimes, it's useful to construct a DetachedSong from a LightSong
even without having real_uri initialized.
2017-02-08 09:45:37 +01:00
Max Kellermann
76380b2b45 DetachedSong: pass std::string&& to uri initializer
Eliminate one temporary allocation.
2017-02-08 09:42:09 +01:00
Max Kellermann
67b7d46432 DetachedSong: remove explicitly-defaulted copy/move constructors
Mentioning these doesn't make a difference.
2017-02-08 09:40:29 +01:00
Max Kellermann
29453ba196 client: add tag_mask attribute
The "tagtypes" command now has several sub commands which can be used
to edit that mask.
2017-02-08 09:06:11 +01:00
Max Kellermann
599d77643b client/Response: add method GetClient() 2017-02-08 09:06:11 +01:00
Max Kellermann
09d87d5ef1 command/Other: move some functions to ClientCommands.cxx
handle_tagtypes() is also being moved to ClientCommands.cxx, because
that command will be extended to access client-specific settings.
2017-02-08 09:06:11 +01:00
Max Kellermann
2f3f075e4f tag/Mask: wrap in class 2017-02-08 09:04:45 +01:00
Max Kellermann
17097d96b7 db/{Count,Print}: use tag_print(), eliminate duplicate code 2017-02-08 09:04:41 +01:00
Max Kellermann
a3e28c2d1a tag/Tag: move tag_name_parse() to ParseName.cxx 2017-02-08 08:57:22 +01:00
Max Kellermann
03a97d87ea tag/Tag*: rename several source files 2017-02-08 08:49:42 +01:00
Max Kellermann
8cbf099054 tag/Id3Load: update API documentation 2017-02-08 08:48:44 +01:00
Max Kellermann
c287452255 configure.ac: increment protocol version 2017-02-08 08:45:40 +01:00
Max Kellermann
07ce915c66 Merge branch 'v0.20.x' 2017-02-08 08:45:24 +01:00
Max Kellermann
81a97315e3 NEWS: mention ID3 memory leak fix 2017-02-08 08:44:47 +01:00
Max Kellermann
53c14d97a6 lib/nfs/FileReader: remove debug line 2017-02-08 08:43:56 +01:00
Max Kellermann
69a82eec17 tag/TagId3: use AtScopeExit() for exception-safety 2017-02-06 23:32:07 +01:00
Max Kellermann
45cadef22f configure.ac: prepare for 0.20.5 2017-02-06 23:28:36 +01:00
Max Kellermann
73f58c57e8 storage/curl: use CURLOPT_POSTFIELDS instead of CURLOPT_READFUNCTION 2017-02-06 23:25:03 +01:00
Max Kellermann
43348a3e13 decoder/Control: improve locking in Start() and Seek()
Previously, both methods accessed a lot of attributes which require
mutex protection.
2017-02-05 13:37:20 +01:00
Max Kellermann
e716b1f4d7 Client: remove redundant "virtual" keywords 2017-02-03 22:27:11 +01:00
Max Kellermann
82e74a4ebd Client: make client_vprintf() static 2017-02-03 20:47:41 +01:00
Max Kellermann
16b260e371 Client: eliminate client_puts(), use Client::Write() instead 2017-02-03 20:46:53 +01:00
Max Kellermann
3102e05da4 Client: make attributes "uid" and "num" const 2017-02-03 20:41:31 +01:00
Max Kellermann
df4af2b550 release v0.20.4
-----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCAAuFiEEA5IzWngIOJSkMBxDI26KWMbbRRIFAliSTDkQHG1heEBtdXNp
 Y3BkLm9yZwAKCRAjbopYxttFEsIQD/4iNkylzLp8mID2aFT690MFzv4TRXi2XS7v
 r3Rlx3hpGyDdzeXZeFc5zxsc9Ei8OfLcdFC/Umj9LjQanXakOxwsdhagrW9cadNX
 YLxkyVcREXalmzUvoWeRnya1LjoTdYA8llvG2tAJosXVr0o/GHZi56aHcrYnW2a6
 XD8kEk5k9beuEcBLk1rdZCTGPbVLwCFvMcpZ7j5Hd4kDGQjjw2aoEaPWchJdhLQh
 p+GRSU+A8hyTo9zy+aNO3cKvq6zqVxDLlHnIqh8XPWQoLPyWuD7ETvwERKmdmiPZ
 bSo0MR7azTlhkWbNZxjPHgZuacJDlwKvXPg1ofjn8VVcaVe5ONeX+1WP0ozUYqyU
 fmhLxMHKuwZcKo6do/jNhAVp//VBWhSwJHPA8kjBTuZHHc0HvgyTxlAgvzlrSswe
 dxc8vnvzgJfUKz5k7mf3amVg6Cu1CmNi59CkyL0NL+8N0inyMfdeQuQEYgbPoI6X
 jIRwACfXpMX75VtiDaNpnFLBjL5emE6u2bDoU2c5ezgpthaWjb0PqSmoLBBF8TNm
 k0ecXlIwCjT3pDcqmFdqgG3AJiYLTgX0rETC8PInl6toLzr2oVMVlijU3YK5PjMl
 nTvgs8TwprTWImgcBnidqRMb39p3AKs12pHfZ4Y5Iu82Bm60acZQMkv6sQh43Wyc
 +W2+T3D2IA==
 =b2Fz
 -----END PGP SIGNATURE-----

Merge tag 'v0.20.4'

release v0.20.4
2017-02-01 22:05:33 +01:00
Max Kellermann
0a033fb10a release v0.20.4 2017-02-01 21:59:36 +01:00
Max Kellermann
591afa0647 lib/nfs/Connection: detect socket hangup and unregister from epoll
Fixes race condition when epoll_ctl() gets called after the socket has
been closed, which may affect a different socket created by another
thread meanwhile.
2017-02-01 21:44:20 +01:00
Max Kellermann
05eac20ffe lib/nfs/Connection: detect libnfs reconnect
When rpc_reconnect_requeue() gets called from inside nfs_service(),
the NfsInputStream can stall completely because the old socket has
been unregistered from epoll automatically, but the new one has never
been registered.  Therefore, nfs_service() will never be called again.

This kludge attempts to detect this condition by checking
nfs_which_events()==POLLOUT.

https://bugs.musicpd.org/view.php?id=4081
2017-02-01 21:36:58 +01:00
Max Kellermann
38d263ac19 output/sndio: work around a libroar C++ incompatibility
Same as in commit e02d8ad8d2, but this time for the sndio plugin
which can be emulated by libroar.
2017-02-01 19:53:23 +01:00
Thomas Zander
f71c204eef Correct method types to match Interface.hxx 2017-01-31 21:22:02 +01:00
Thomas Zander
51147203be free() require cstdlib to be included 2017-01-31 21:21:37 +01:00