From be0759d4651126c0695c7ff83e1f2a9feca7ec4e Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sat, 18 Jan 2014 14:24:38 +0100 Subject: db/upnp/Discovery: don't copy XML to std::string Pass "const char *" to Expat. --- src/db/upnp/Device.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/db/upnp/Device.cxx') diff --git a/src/db/upnp/Device.cxx b/src/db/upnp/Device.cxx index 609f2cbfc..b5174236b 100644 --- a/src/db/upnp/Device.cxx +++ b/src/db/upnp/Device.cxx @@ -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); -- cgit v1.2.3