libsystemd-bus: the same error codes for sd_bus_release_name() (for kdbus and dbus1)

Due to this patch, sd_bus_release_name() function
returns the same code errors for kdbus and dbus1
if we try release non-existing name or foreign
name.
This commit is contained in:
Lukasz Skalski 2013-12-13 12:12:24 +01:00 committed by Lennart Poettering
parent c97a6dbcf1
commit 043ccd8383
1 changed files with 2 additions and 2 deletions

View File

@ -184,9 +184,9 @@ static int bus_release_name_dbus1(sd_bus *bus, const char *name) {
if (r < 0)
return r;
if (ret == BUS_NAME_NON_EXISTENT)
return -ENOENT;
return -ESRCH;
if (ret == BUS_NAME_NOT_OWNER)
return -EADDRNOTAVAIL;
return -EADDRINUSE;
if (ret == BUS_NAME_RELEASED)
return 0;