diff options
author | Lennart Poettering <lennart@poettering.net> | 2013-10-16 06:10:04 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2013-10-16 06:15:02 +0200 |
commit | 40ca29a1370379d43e44c0ed425eecc7218dcbca (patch) | |
tree | 39cde46c8166bd79471b0111251693edddfae3c4 /src/libsystemd-bus/bus-internal.c | |
parent | 7a37d62501c97eb3b48a418ef764d0308e0c3fb9 (diff) |
timedated: use libsystemd-bus instead of libdbus for bus communication
Among other things this also adds a few things necessary for the change:
- Considerably more powerful error returning APIs in libsystemd-bus
- Adapter for connecting an sd_bus to an sd_event
- As I reworked the PolicyKit logic to the new library I also made it
asynchronous, so that PolicyKit requests of one user cannot block out
another user anymore.
- We always use the macro names for common bus error. That way it is
harder to mistype them since the compiler will notice
Diffstat (limited to 'src/libsystemd-bus/bus-internal.c')
-rw-r--r-- | src/libsystemd-bus/bus-internal.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/libsystemd-bus/bus-internal.c b/src/libsystemd-bus/bus-internal.c index afff7bd7c1..942ac2b953 100644 --- a/src/libsystemd-bus/bus-internal.c +++ b/src/libsystemd-bus/bus-internal.c @@ -252,13 +252,13 @@ bool path_simple_pattern(const char *pattern, const char *value) { int bus_message_type_from_string(const char *s, uint8_t *u) { if (streq(s, "signal")) - *u = SD_BUS_MESSAGE_TYPE_SIGNAL; + *u = SD_BUS_MESSAGE_SIGNAL; else if (streq(s, "method_call")) - *u = SD_BUS_MESSAGE_TYPE_METHOD_CALL; + *u = SD_BUS_MESSAGE_METHOD_CALL; else if (streq(s, "error")) - *u = SD_BUS_MESSAGE_TYPE_METHOD_ERROR; + *u = SD_BUS_MESSAGE_METHOD_ERROR; else if (streq(s, "method_return")) - *u = SD_BUS_MESSAGE_TYPE_METHOD_RETURN; + *u = SD_BUS_MESSAGE_METHOD_RETURN; else return -EINVAL; @@ -266,13 +266,13 @@ int bus_message_type_from_string(const char *s, uint8_t *u) { } const char *bus_message_type_to_string(uint8_t u) { - if (u == SD_BUS_MESSAGE_TYPE_SIGNAL) + if (u == SD_BUS_MESSAGE_SIGNAL) return "signal"; - else if (u == SD_BUS_MESSAGE_TYPE_METHOD_CALL) + else if (u == SD_BUS_MESSAGE_METHOD_CALL) return "method_call"; - else if (u == SD_BUS_MESSAGE_TYPE_METHOD_ERROR) + else if (u == SD_BUS_MESSAGE_METHOD_ERROR) return "error"; - else if (u == SD_BUS_MESSAGE_TYPE_METHOD_RETURN) + else if (u == SD_BUS_MESSAGE_METHOD_RETURN) return "method_return"; else return NULL; |