Commit Graph

84 Commits

Author SHA1 Message Date
Max Kellermann 1df5c5a76e Listen: move class ClientListener to src/client/Listener.hxx 2018-01-29 23:48:16 +01:00
Max Kellermann befd669075 Instance: rename Shutdown() to Break() 2018-01-29 23:31:41 +01:00
Max Kellermann 2dac3ef58e client: eliminate client_printf() 2018-01-20 00:24:18 +01:00
Max Kellermann 86c7ab29f4 client/Idle: pass Response instead of Client to WriteIdleResponse() 2018-01-20 00:22:47 +01:00
Max Kellermann db89e5ec28 client/Idle: move code to WriteIdleResponse() 2018-01-20 00:22:30 +01:00
Max Kellermann d096f75fb8 client/Idle: apply idle_subscriptions mask once 2018-01-20 00:22:09 +01:00
Max Kellermann 854424a758 client/Idle: use std::exchange() 2018-01-20 00:21:26 +01:00
Max Kellermann a17a481e30 event/BufferedSocket: add "noexcept" 2017-12-20 10:42:17 +01:00
Max Kellermann 5f9d4a02a5 client/*: add "noexcept" 2017-12-20 10:38:29 +01:00
Max Kellermann 7094d88958 client/Message: make valid_channel_char() constexpr 2017-12-20 10:27:43 +01:00
Max Kellermann 6246d36fe6 Merge branch 'v0.20.x' 2017-12-16 20:56:06 +01:00
Max Kellermann dfaf08743c *: check defined(_WIN32) instead of defined(WIN32)
Only _WIN32 is defined by the compiler, and WIN32 is not standardized
and may be missing.

Closes #169
2017-12-12 10:22:20 +01:00
Max Kellermann 0ff4350352 event/ServerSocket: pass UniqueSocketDescriptor by value
Passing it by value is actually smaller (32 bit) than the rvalue
reference (64 bit pointer), and it ensures that the object is consumed
after the call returns, no matter how the methods are implemented.
2017-11-10 20:43:14 +01:00
Max Kellermann ab05b70423 ClientProcess: close connection when client sends HTTP request 2017-10-24 20:32:53 +02:00
Max Kellermann fd520eeed2 Client: migrate from TimeoutMonitor to TimerEvent 2017-08-29 16:28:27 +02:00
Max Kellermann bab5f1a93f client: make GREETING constexpr 2017-08-11 09:22:26 +02:00
Max Kellermann 6de8303df8 client: use C++11 initializers 2017-08-11 09:21:29 +02:00
Max Kellermann 33b4114534 system/fd_util: remove unused library 2017-08-11 09:20:15 +02:00
Max Kellermann 9a5bcc6db0 net/ServerSocket: pass UniqueSocketDescriptor&& to OnAccept() 2017-08-10 19:20:14 +02:00
Max Kellermann 492b20a89d event/SocketMonitor: use class SocketDescriptor 2017-08-10 19:19:58 +02:00
Max Kellermann 54de8b8e77 net/*, ...: use AF_LOCAL instead of AF_UNIX 2017-08-10 13:12:13 +02:00
Max Kellermann 501a4af914 util/StringUtil: move strip functions to StringStrip.cxx 2017-07-05 17:20:02 +02:00
Max Kellermann ae713cb099 *: add lots of "noexcept" specifications 2017-06-04 13:09:11 +02:00
Max Kellermann 979f1b6c39 Merge tag 'v0.20.9'
release v0.20.9
2017-06-04 12:57:05 +02:00
Max Kellermann a057b4f6d8 *: add lost of "noexcept" specifications 2017-06-04 12:46:48 +02:00
Max Kellermann c5996c0593 *: add "noexcept" to many, many function prototypes
See commit 71f0ed8b74
2017-05-15 23:05:45 +02:00
Max Kellermann 4faef28cc5 Merge tag 'v0.20.7'
release v0.20.7
2017-05-15 23:01:49 +02:00
Max Kellermann 788e3b31e1 *: remove "pure" and "const" attributes from throwing functions
The "pure" and "const" attributes are not so well-defined, and a
recent clang version implements an optimization which pushes the
definition's boundary beyond what I believed it was.  clang now
assumes that functions declared "pure" cannot throw exceptions, even
if they lack the "noexcept" specification.

When compiled with this new clang version, MPD will crash randomly if
an exception happens to get thrown by such as "pure" function
(https://github.com/MusicPlayerDaemon/MPD/issues/41).

This commit removes all such misplaced "pure" and "const" attributes,
closing #41.
2017-05-08 17:25:06 +02:00
Max Kellermann 71f0ed8b74 *: add "noexcept" to many, many function prototypes
This eliminates some overhead, because the compiler doesn't need to
consider these functions throwing.
2017-05-08 14:44:49 +02:00
Max Kellermann a99bab935a Client: add method SetPartition() 2017-02-25 10:25:16 +01:00
Max Kellermann 3eee35e1f7 Client: convert partition to pointer
Prepare to make it mutable.
2017-02-25 10:23:23 +01:00
Max Kellermann c7396b0675 Client: add method GetPartition(), make partition private 2017-02-25 10:20:09 +01:00
Max Kellermann 05b8ddac4c Client: add method GetInstance() 2017-02-25 10:20:05 +01:00
Max Kellermann 668724de4e Client: replace playlist and player_control with getter methods
Prepare to convert "partition" to a mutable pointer.
2017-02-25 09:24:19 +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 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 5900253b85 update copyright year 2017-01-03 20:48:59 +01:00
Max Kellermann b042095ac2 event/Loop: use std::chrono 2016-12-28 01:15:08 +01:00
Max Kellermann e2b7c30811 event/BufferedSocket: pass std::exception_ptr to OnSocketError() 2016-11-02 10:38:05 +01:00
Max Kellermann 31faafea9d Client: remove the AllowFile() overload with Error parameter
Unused.
2016-10-27 22:16:05 +02:00
Max Kellermann 726fc53e62 Client: add AllowFile() overload which throws exception 2016-10-27 22:04:38 +02:00
Max Kellermann 8d41e9658f Instance: remove Error parameter from GetDatabase() 2016-10-26 18:52:00 +02:00
Max Kellermann 086652dd50 Instance: add GetDatabaseOrThrow() 2016-10-26 18:47:19 +02:00
Max Kellermann b67e7df38e Merge tag 'v0.19.17'
release v0.19.17
2016-07-09 00:46:09 +02:00
Max Kellermann e6389ff5a1 client/ClientRead: call Break() before Close()
Referencing the attribute "partition" is illegal after Close(),
because Close() deletes "this".
2016-07-07 13:54:04 +02:00
Max Kellermann 6a1f5667f9 util/FormatString: return AllocatedString 2016-04-12 22:59:23 +02:00