diff options
Diffstat (limited to 'src/db/upnp/Discovery.cxx')
-rw-r--r-- | src/db/upnp/Discovery.cxx | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/db/upnp/Discovery.cxx b/src/db/upnp/Discovery.cxx index b5c6b5f92..5e6479b3d 100644 --- a/src/db/upnp/Discovery.cxx +++ b/src/db/upnp/Discovery.cxx @@ -22,6 +22,7 @@ #include "Domain.hxx" #include "ContentDirectoryService.hxx" #include "upnpplib.hxx" +#include "Log.hxx" #include <upnp/upnptools.h> @@ -73,12 +74,17 @@ UPnPDeviceDirectory::discoExplorer() } // Update or insert the device - ContentDirectoryDescriptor d(tsk->url, buf, - time(0), tsk->expires); - free(buf); - if (!d.device.ok) { - delete tsk; - continue; + ContentDirectoryDescriptor d(time(0), tsk->expires); + + { + Error error2; + bool success = d.Parse(tsk->url, buf, error2); + free(buf); + if (!success) { + delete tsk; + LogError(error2); + continue; + } } const ScopeLock protect(mutex); |