aboutsummaryrefslogtreecommitdiffstats
path: root/src/db
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-01-14 12:34:49 +0100
committerMax Kellermann <max@duempel.org>2014-01-14 12:34:49 +0100
commit2cb912e4f4622e87f9ab319e2f2fd7bfb1e71499 (patch)
treebc0e911950680712ac7431737cb1b1fba1f0bb55 /src/db
parent91a513e87d832a535e21595eb30463166bcd276e (diff)
downloadmpd-2cb912e4f4622e87f9ab319e2f2fd7bfb1e71499.tar.gz
mpd-2cb912e4f4622e87f9ab319e2f2fd7bfb1e71499.tar.xz
mpd-2cb912e4f4622e87f9ab319e2f2fd7bfb1e71499.zip
db/upnp: Namei() returns error when no object was found
Don't fail silently.
Diffstat (limited to 'src/db')
-rw-r--r--src/db/UpnpDatabasePlugin.cxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/db/UpnpDatabasePlugin.cxx b/src/db/UpnpDatabasePlugin.cxx
index 258122200..8a99e9cd6 100644
--- a/src/db/UpnpDatabasePlugin.cxx
+++ b/src/db/UpnpDatabasePlugin.cxx
@@ -575,7 +575,9 @@ UpnpDatabase::Namei(ContentDirectoryService* server,
odirent = dirent;
return true;
} else {
- return true;
+ error.Format(db_domain, DB_NOT_FOUND,
+ "No such object");
+ return false;
}
}
}
@@ -585,7 +587,8 @@ UpnpDatabase::Namei(ContentDirectoryService* server,
break;
}
- return true;
+ error.Format(db_domain, DB_NOT_FOUND, "No such object");
+ return false;
}
// vpath is a parsed and writeable version of selection.uri. There is