[systemd-commits] TODO src/libsystemd src/systemd
Lennart Poettering
lennart at kemper.freedesktop.org
Wed Jan 22 11:46:12 PST 2014
TODO | 1 -
src/libsystemd/libsystemd.sym | 8 ++++----
src/libsystemd/sd-bus/bus-control.c | 2 +-
src/libsystemd/sd-bus/bus-message.c | 21 +++++++++++----------
src/systemd/sd-bus.h | 8 ++++----
5 files changed, 20 insertions(+), 20 deletions(-)
New commits:
commit eee9ec0e28922b6991a6eea64fd7ce54df1cd364
Author: Lennart Poettering <lennart at poettering.net>
Date: Wed Jan 22 20:45:05 2014 +0100
bus: change API to expose "inverted" no_reply and no_auto_start message flags non-inverted
diff --git a/TODO b/TODO
index 583b42d..2cd4410 100644
--- a/TODO
+++ b/TODO
@@ -166,7 +166,6 @@ Features:
- bus driver: GetNameOwner() for "org.freedesktop.DBus" should return "org.freedesktop.DBus"
- update systemd.special(7) to mention that dbus.socket is only about the compatibility socket now
- bus proxy should fake seclabel when connecting to kdbus
- - sd_bus_message_set_no_reply() â sd_bus_message_set_expect_reply() and similar for no_auto_start
- allow updating attach flags during runtime
- pid1: peek into activating message when activating a service
- when service activation failed, drop one message from the activator queue
diff --git a/src/libsystemd/libsystemd.sym b/src/libsystemd/libsystemd.sym
index 984bc15..e2e917e 100644
--- a/src/libsystemd/libsystemd.sym
+++ b/src/libsystemd/libsystemd.sym
@@ -85,8 +85,8 @@ global:
sd_bus_message_get_type;
sd_bus_message_get_cookie;
sd_bus_message_get_reply_cookie;
- sd_bus_message_get_no_reply;
- sd_bus_message_get_no_auto_start;
+ sd_bus_message_get_expect_reply;
+ sd_bus_message_get_auto_start;
sd_bus_message_get_priority;
sd_bus_message_get_signature;
sd_bus_message_get_path;
@@ -103,8 +103,8 @@ global:
sd_bus_message_is_signal;
sd_bus_message_is_method_call;
sd_bus_message_is_method_error;
- sd_bus_message_set_no_reply;
- sd_bus_message_set_no_auto_start;
+ sd_bus_message_set_expect_reply;
+ sd_bus_message_set_auto_start;
sd_bus_message_set_destination;
sd_bus_message_set_priority;
sd_bus_message_append;
diff --git a/src/libsystemd/sd-bus/bus-control.c b/src/libsystemd/sd-bus/bus-control.c
index 5548239..61cdf22 100644
--- a/src/libsystemd/sd-bus/bus-control.c
+++ b/src/libsystemd/sd-bus/bus-control.c
@@ -1214,7 +1214,7 @@ _public_ int sd_bus_get_owner_machine_id(sd_bus *bus, const char *name, sd_id128
if (r < 0)
return r;
- r = sd_bus_message_set_no_auto_start(m, true);
+ r = sd_bus_message_set_auto_start(m, false);
if (r < 0)
return r;
diff --git a/src/libsystemd/sd-bus/bus-message.c b/src/libsystemd/sd-bus/bus-message.c
index b42c491..4e95226 100644
--- a/src/libsystemd/sd-bus/bus-message.c
+++ b/src/libsystemd/sd-bus/bus-message.c
@@ -831,16 +831,17 @@ _public_ int sd_bus_message_get_reply_cookie(sd_bus_message *m, uint64_t *cookie
return 0;
}
-_public_ int sd_bus_message_get_no_reply(sd_bus_message *m) {
+_public_ int sd_bus_message_get_expect_reply(sd_bus_message *m) {
assert_return(m, -EINVAL);
- return m->header->type == SD_BUS_MESSAGE_METHOD_CALL ? !!(m->header->flags & BUS_MESSAGE_NO_REPLY_EXPECTED) : 0;
+ return m->header->type == SD_BUS_MESSAGE_METHOD_CALL &&
+ !(m->header->flags & BUS_MESSAGE_NO_REPLY_EXPECTED);
}
-_public_ int sd_bus_message_get_no_auto_start(sd_bus_message *m) {
+_public_ int sd_bus_message_get_auto_start(sd_bus_message *m) {
assert_return(m, -EINVAL);
- return !!(m->header->flags & BUS_MESSAGE_NO_AUTO_START);
+ return !(m->header->flags & BUS_MESSAGE_NO_AUTO_START);
}
_public_ const char *sd_bus_message_get_path(sd_bus_message *m) {
@@ -968,27 +969,27 @@ _public_ int sd_bus_message_is_method_error(sd_bus_message *m, const char *name)
return 1;
}
-_public_ int sd_bus_message_set_no_reply(sd_bus_message *m, int b) {
+_public_ int sd_bus_message_set_expect_reply(sd_bus_message *m, int b) {
assert_return(m, -EINVAL);
assert_return(!m->sealed, -EPERM);
assert_return(m->header->type == SD_BUS_MESSAGE_METHOD_CALL, -EPERM);
if (b)
- m->header->flags |= BUS_MESSAGE_NO_REPLY_EXPECTED;
- else
m->header->flags &= ~BUS_MESSAGE_NO_REPLY_EXPECTED;
+ else
+ m->header->flags |= BUS_MESSAGE_NO_REPLY_EXPECTED;
return 0;
}
-_public_ int sd_bus_message_set_no_auto_start(sd_bus_message *m, int b) {
+_public_ int sd_bus_message_set_auto_start(sd_bus_message *m, int b) {
assert_return(m, -EINVAL);
assert_return(!m->sealed, -EPERM);
if (b)
- m->header->flags |= BUS_MESSAGE_NO_AUTO_START;
- else
m->header->flags &= ~BUS_MESSAGE_NO_AUTO_START;
+ else
+ m->header->flags |= BUS_MESSAGE_NO_AUTO_START;
return 0;
}
diff --git a/src/systemd/sd-bus.h b/src/systemd/sd-bus.h
index 01f6275..52481c6 100644
--- a/src/systemd/sd-bus.h
+++ b/src/systemd/sd-bus.h
@@ -192,8 +192,8 @@ sd_bus* sd_bus_message_get_bus(sd_bus_message *m);
int sd_bus_message_get_type(sd_bus_message *m, uint8_t *type);
int sd_bus_message_get_cookie(sd_bus_message *m, uint64_t *cookie);
int sd_bus_message_get_reply_cookie(sd_bus_message *m, uint64_t *cookie);
-int sd_bus_message_get_no_reply(sd_bus_message *m);
-int sd_bus_message_get_no_auto_start(sd_bus_message *m);
+int sd_bus_message_get_expect_reply(sd_bus_message *m);
+int sd_bus_message_get_auto_start(sd_bus_message *m);
int sd_bus_message_get_priority(sd_bus_message *m, int64_t *priority);
const char *sd_bus_message_get_signature(sd_bus_message *m, int complete);
@@ -215,8 +215,8 @@ int sd_bus_message_is_signal(sd_bus_message *m, const char *interface, const cha
int sd_bus_message_is_method_call(sd_bus_message *m, const char *interface, const char *member);
int sd_bus_message_is_method_error(sd_bus_message *m, const char *name);
-int sd_bus_message_set_no_reply(sd_bus_message *m, int b);
-int sd_bus_message_set_no_auto_start(sd_bus_message *m, int b);
+int sd_bus_message_set_expect_reply(sd_bus_message *m, int b);
+int sd_bus_message_set_auto_start(sd_bus_message *m, int b);
int sd_bus_message_set_destination(sd_bus_message *m, const char *destination);
int sd_bus_message_set_priority(sd_bus_message *m, int64_t priority);
More information about the systemd-commits
mailing list