Commit be0759d4 authored by Max Kellermann's avatar Max Kellermann

db/upnp/Discovery: don't copy XML to std::string

Pass "const char *" to Expat.
parent 339d9398
......@@ -99,12 +99,12 @@ protected:
}
};
UPnPDevice::UPnPDevice(const std::string &url, const std::string &description)
UPnPDevice::UPnPDevice(const std::string &url, const char *description)
:ok(false)
{
UPnPDeviceParser mparser(*this);
Error error;
if (!mparser.Parse(description.data(), description.length(), true,
if (!mparser.Parse(description, strlen(description), true,
error)) {
// TODO: pass Error to caller
LogError(error);
......
......@@ -82,7 +82,7 @@ public:
* @param url where the description came from
* @param description the xml device description
*/
UPnPDevice(const std::string &url, const std::string &description);
UPnPDevice(const std::string &url, const char *description);
UPnPDevice() : ok(false) {}
};
......
......@@ -66,7 +66,7 @@ class UPnPDeviceDirectory {
class ContentDirectoryDescriptor {
public:
ContentDirectoryDescriptor(const std::string &url,
const std::string &description,
const char *description,
time_t last, int exp)
:device(url, description), last_seen(last), expires(exp+20) {}
UPnPDevice device;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment