Commit 9941735a authored by Max Kellermann's avatar Max Kellermann

db/upnp: pass std::string to titleToPathElt()

parent 29e5dc44
...@@ -569,7 +569,7 @@ UpnpDatabase::Namei(ContentDirectoryService* server, ...@@ -569,7 +569,7 @@ UpnpDatabase::Namei(ContentDirectoryService* server,
// Look for the name in the sub-container list // Look for the name in the sub-container list
for (auto& dirent : dirbuf.m_containers) { for (auto& dirent : dirbuf.m_containers) {
if (!vpath[i].compare(titleToPathElt(dirent.m_title.c_str()))) { if (!vpath[i].compare(titleToPathElt(dirent.m_title))) {
objid = dirent.m_id; // Next readdir target objid = dirent.m_id; // Next readdir target
found = true; found = true;
if (i == vpath.size() - 1) { if (i == vpath.size() - 1) {
...@@ -587,7 +587,7 @@ UpnpDatabase::Namei(ContentDirectoryService* server, ...@@ -587,7 +587,7 @@ UpnpDatabase::Namei(ContentDirectoryService* server,
// Path elt was not a container, look at the items list // Path elt was not a container, look at the items list
for (auto& dirent : dirbuf.m_items) { for (auto& dirent : dirbuf.m_items) {
if (!vpath[i].compare(titleToPathElt(dirent.m_title.c_str()))) { if (!vpath[i].compare(titleToPathElt(dirent.m_title))) {
// If this is the last path elt, we found the target, // If this is the last path elt, we found the target,
// else it does not exist // else it does not exist
if (i == vpath.size() - 1) { if (i == vpath.size() - 1) {
......
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