From cc160367c82b42e1d8463b4b465b40ef74295d0d Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Mon, 4 May 2015 13:50:23 -0400 Subject: [PATCH] update RespondToSearch --- MediaBrowser.Dlna/Ssdp/SsdpHandler.cs | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/MediaBrowser.Dlna/Ssdp/SsdpHandler.cs b/MediaBrowser.Dlna/Ssdp/SsdpHandler.cs index d60d575a6..d4cfd284a 100644 --- a/MediaBrowser.Dlna/Ssdp/SsdpHandler.cs +++ b/MediaBrowser.Dlna/Ssdp/SsdpHandler.cs @@ -216,10 +216,7 @@ namespace MediaBrowser.Dlna.Ssdp { var enableDebugLogging = _config.GetDlnaConfiguration().EnableDebugLogging; - if (enableDebugLogging) - { - _logger.Debug("RespondToSearch"); - } + var isLogged = false; const string header = "HTTP/1.1 200 OK"; @@ -228,6 +225,15 @@ namespace MediaBrowser.Dlna.Ssdp if (string.Equals(deviceType, "ssdp:all", StringComparison.OrdinalIgnoreCase) || string.Equals(deviceType, d.Type, StringComparison.OrdinalIgnoreCase)) { + if (!isLogged) + { + if (enableDebugLogging) + { + _logger.Debug("Responding to search from {0} for {1}", endpoint, deviceType); + } + isLogged = true; + } + var values = new Dictionary(StringComparer.OrdinalIgnoreCase); values["CACHE-CONTROL"] = "max-age = 600";