diff options
author | Max Kellermann <max@duempel.org> | 2014-01-22 21:33:19 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-01-22 21:33:19 +0100 |
commit | 7573d4e1ba2de203021201818d25d003213cefa8 (patch) | |
tree | 6bce6c2ac81c9df4cfa754fea78a36ed80b0c169 /src | |
parent | bfb483898f53b2c505ba2e6a6885402a86bf131e (diff) | |
download | mpd-7573d4e1ba2de203021201818d25d003213cefa8.tar.gz mpd-7573d4e1ba2de203021201818d25d003213cefa8.tar.xz mpd-7573d4e1ba2de203021201818d25d003213cefa8.zip |
db/upnp: break when count==0
Make this non-fatal. Just stop reading more objects.
Diffstat (limited to 'src')
-rw-r--r-- | src/db/upnp/ContentDirectoryService.cxx | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/db/upnp/ContentDirectoryService.cxx b/src/db/upnp/ContentDirectoryService.cxx index 62f39c7d0..9068b2e30 100644 --- a/src/db/upnp/ContentDirectoryService.cxx +++ b/src/db/upnp/ContentDirectoryService.cxx @@ -191,12 +191,6 @@ ContentDirectoryService::search(UpnpClient_Handle hdl, ? ParseUnsigned(value) : 0; - if (count == 0) { - // TODO: what's this? - error.Set(upnp_domain, "got -1 or 0 entries"); - return false; - } - offset += count; value = ixmlwrap::getFirstElementValue(response, "TotalMatches"); @@ -205,6 +199,9 @@ ContentDirectoryService::search(UpnpClient_Handle hdl, if (!ReadResultTag(dirbuf, response, error)) return false; + + if (count == 0) + break; } return true; |