From 32a64481f22cb69c89ec0a34d5d556225ea61f4f Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 23 Jan 2017 19:16:14 +0100 Subject: [PATCH] lib/upnp: fix bad std::chrono cast libupnp provides seconds, not whatever time unit is used by std::chrono::steady_clock. --- NEWS | 2 ++ src/lib/upnp/Discovery.hxx | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index df9aecde6..7123502af 100644 --- a/NEWS +++ b/NEWS @@ -4,6 +4,8 @@ ver 0.20.3 (not yet released) * database - proxy: fix error "terminate called after throwing ..." - proxy: make connect errors during startup non-fatal +* neighbor + - upnp: fix premature expiry * replay gain: don't reset ReplayGain levels when unpausing playback * silence surround channels when converting from stereo * use shortcuts such as "dsd64" in log messages diff --git a/src/lib/upnp/Discovery.hxx b/src/lib/upnp/Discovery.hxx index d50ac4969..131ffb3c6 100644 --- a/src/lib/upnp/Discovery.hxx +++ b/src/lib/upnp/Discovery.hxx @@ -62,7 +62,7 @@ class UPnPDeviceDirectory final : UpnpCallback { DiscoveredTask(const Upnp_Discovery *disco) :url(disco->Location), device_id(disco->DeviceId), - expires(disco->Expires) {} + expires(std::chrono::seconds(disco->Expires)) {} }; /**