chiark / gitweb /
libsystemd-bus: the same error codes for sd_bus_release_name() (for kdbus and dbus1)
[elogind.git] / src / libsystemd-bus / bus-control.c
index 5125fd9724b0fcb52cf70862eb625d1e0a06e2f7..0072c37a8cb65b0042ed110b95e52d03a409aa08 100644 (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;