Max Kellermann
42f6a0441c
use [[gnu::...]] attributes
2023-03-06 16:14:15 +01:00
Max Kellermann
148aca23be
use SPDX IDs, replacing the long copyright headers
2023-03-06 14:59:48 +01:00
Max Kellermann
fa58db798b
lib/fmt/RuntimeError: new library
...
Replacing FormatRuntimeError().
2022-11-29 14:10:34 +01:00
Max Kellermann
cc0def15c4
Copyright year 2022
2022-07-14 17:59:35 +02:00
Max Kellermann
4564d251a8
zeroconf/avahi: move generic sources to lib/avahi
2022-06-30 09:37:30 +02:00
Max Kellermann
ee270f9b00
meson.build: log_dep is only needed internally
2021-10-23 12:08:43 +02:00
Max Kellermann
771c46032f
meson.build: add missing libfmt dependencies
...
Fixes https://github.com/MusicPlayerDaemon/MPD/discussions/1281
The problem occurred when there was libfmt-dev installed, but it was
too old (e.g. on Debian Buster), and Meson used the wrap fallback.
Those internal MPD libraries where the libfmt dependency was not
declared were still using the old system libfmt headers, which are not
ABI-compatible with MPD's own libfmt build.
2021-10-15 14:26:59 +02:00
Max Kellermann
1c4b484a56
avahi/Poll: use FineTimerEvent in AvahiTimeout
...
libavahi-client uses this one to schedule events immediately.
However, CoarseTimerEvent may be called too late, and cause timeouts.
2021-10-13 11:13:54 +02:00
Max Kellermann
b29a43b4d7
decoder/mad, ...: more libfmt logging
2021-06-25 20:52:08 +02:00
Max Kellermann
d2bd12822f
Merge branch 'v0.22.x'
2021-05-26 11:57:41 +02:00
Max Kellermann
7a6823dcdf
zeroconf/AvahiPoll: the struct timeval is an absolute time point
...
Fixes broken libavahi-client timeouts.
2021-05-25 22:25:45 +02:00
Max Kellermann
bce144a232
zeroconf/AvahiPoll: move code to Schedule()
2021-05-25 22:23:55 +02:00
Max Kellermann
0cef84cac6
zeroconf/AvahiPoll: rename "timer" to "event"
2021-05-25 22:23:55 +02:00
Max Kellermann
dad1c21b59
zeroconf/avahi: move variable declaration into "case"
2021-05-25 21:34:09 +02:00
Max Kellermann
29b49dd630
zeroconf/{bonjour,avahi}: pass service_type as parameter
2021-02-24 15:11:11 +01:00
Max Kellermann
5f34508aae
zeroconf/Glue: move code to the ZeroconfHelper constructor
2021-02-24 15:09:10 +01:00
Max Kellermann
2d8ecd561b
zeroconf: return a publisher object
2021-02-24 15:09:10 +01:00
Max Kellermann
2059195ae9
zeroconf: add dependency on event_dep
2021-02-24 15:09:10 +01:00
Max Kellermann
d89856f77b
zeroconf/avahi/Helper: make class SharedAvahiClient final
2021-02-24 15:09:10 +01:00
Max Kellermann
975d5be046
zeroconf/avahi/Init: return a std::unique_ptr<AvahiHelper>
2021-02-24 14:41:37 +01:00
Max Kellermann
b01ef1b9a6
zeroconf/Bonjour: return a std::unique_ptr<BonjourHelper>
2021-02-24 14:25:06 +01:00
Max Kellermann
ceb76b6a82
zeroconf/Bonjour: pass a context pointer to the callback
2021-02-24 14:18:35 +01:00
Max Kellermann
a7e697b588
zeroconf/Bonjour: add const
2021-02-24 14:18:17 +01:00
Max Kellermann
3ecd918442
zeroconf/Bonjour: move the DNSServiceRegister() call to the constructor
2021-02-24 14:17:59 +01:00
Max Kellermann
4fbdb3a2d5
zeroconf/Bonjour: convert the callback function to a method
2021-02-24 14:15:26 +01:00
Max Kellermann
0157643667
zeroconf/Glue: add noexcept
2021-02-24 14:15:26 +01:00
Max Kellermann
fe741bd767
zeroconf/Glue: allow ZeroconfInit() to throw
2021-02-24 14:15:04 +01:00
Max Kellermann
06b9bdba2c
zeroconf/Bonjour: disallow copying
2021-02-24 13:53:36 +01:00
Max Kellermann
bd0aa74bdd
zeroconf/Bonjour: rename class BonjourMonitor to BonjourHelper
2021-02-24 13:53:35 +01:00
Max Kellermann
47461df59c
zeroconf/Bonjour: don't call DNSServiceRefDeallocate() if DNSServiceRegister() fails
...
According to
https://developer.apple.com/documentation/dnssd/1804733-dnsserviceregister
the DNSServiceRef is initialized only if DNSServiceRegister() returns
kDNSServiceErr_NoError. The faulty error handling code could
therefore crash.
2021-02-24 13:49:03 +01:00
Max Kellermann
04d5588fe5
zeroconf/Zeroconf*: drop prefix from file names
2021-02-24 13:33:59 +01:00
Max Kellermann
40d061621b
zeroconf/Avahi: remove useless log messages
2021-02-24 13:33:58 +01:00
Max Kellermann
a312629aad
zeroconf: pass global port to init function
2021-02-24 06:40:26 +01:00
Max Kellermann
d527d4b530
zeroconf/avahi/Publisher: new class, replacing lots of code from ZeroconfAvahi.cxx
2021-02-23 22:07:57 +01:00
Max Kellermann
978d2638d8
zeroconf/avahi/Client: new class, replacing lots of code from ZeroconfAvahi.cxx
2021-02-23 21:53:07 +01:00
Max Kellermann
cfcafdf822
zeroconf/avahi: add class AvahiGlue
2021-02-23 21:53:00 +01:00
Max Kellermann
07865d0707
zeroconf/avahi/Poll: move to namespace Avahi
2021-02-23 21:41:16 +01:00
Max Kellermann
9b9522e3f5
zeroconf/avahi/Poll: rename internal variables
2021-02-22 15:01:01 +01:00
Max Kellermann
87963685fb
zeroconf/avahi/Poll: use C++11 initializer
2021-02-22 15:00:20 +01:00
Max Kellermann
0405a57f26
zeroconf/avahi/Poll: make EventLoop the first parameter
2021-02-22 14:52:21 +01:00
Max Kellermann
f29c69d6a9
zeroconf/avahi/Poll: rename timer
to event
2021-02-22 14:39:28 +01:00
Max Kellermann
7ec4de841e
zeroconf/avahi/Poll: add constexpr
2021-02-22 14:34:32 +01:00
Max Kellermann
1f08d2d03c
zeroconf/avahi/Poll: add noexcept
2021-02-22 14:31:37 +01:00
Max Kellermann
c1a695d1ac
zeroconf/avahi/Poll: add method GetEventLoop()
2021-02-22 14:31:10 +01:00
Max Kellermann
ec05056e38
zeroconf/avahi/Poll: forbid copying
2021-02-22 14:26:08 +01:00
Max Kellermann
c0b9339d31
zeroconf/AvahiPoll: move to lib/avahi/
2021-02-22 14:24:00 +01:00
Max Kellermann
def962b6cb
event/{Coarse,Fine,Far}TimerEvent: aliases for TimerEvent
...
Preparing for a variant of TimerEvent with coarse 1-second
granularity, but cheaper (with a timer wheel).
2021-02-05 18:16:05 +01:00
Richard Backhouse
c72006dbcc
zeroconf/ZeroconfBonjour: Cleanup formatting from previous commit
2021-01-23 06:13:05 -05:00
Richard Backhouse
06fe30e2bd
zeroconf/ZeroconfBonjour: Fix compile errors resulting from "refactor to SocketEvent" and reenable bonjour for darwin build
2021-01-23 06:06:49 -05:00
Max Kellermann
abbd980671
Merge branch 'v0.22.x'
2021-01-01 19:59:15 +01:00