1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-07 09:56:51 +03:00

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

View File

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