summaryrefslogtreecommitdiff
path: root/src/libsystemd-bus/bus-kernel.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2013-12-25 17:46:45 +0100
committerLennart Poettering <lennart@poettering.net>2013-12-25 18:04:04 +0100
commit693eb9a2d42d71445dad273a76e2470199d1dc5a (patch)
tree9d43271a1cc9c91ff8660eda7720ab755a427a84 /src/libsystemd-bus/bus-kernel.c
parent80a33f113bbdadf4fc7ffec7fed026fde59d232b (diff)
bus: rename message "serial" to "cookie"
Even if the lower-leveld dbus1 protocol calls it "serial", let's expose the word "cookie" for this instead, as this is what kdbus uses and since it doesn't imply monotonicity the same way "serial" does.
Diffstat (limited to 'src/libsystemd-bus/bus-kernel.c')
-rw-r--r--src/libsystemd-bus/bus-kernel.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/libsystemd-bus/bus-kernel.c b/src/libsystemd-bus/bus-kernel.c
index 7944f51383..fadb683094 100644
--- a/src/libsystemd-bus/bus-kernel.c
+++ b/src/libsystemd-bus/bus-kernel.c
@@ -175,10 +175,10 @@ static int bus_message_setup_bloom(sd_bus_message *m, void *bloom) {
e = stpcpy(buf, "arg");
if (i < 10)
- *(e++) = '0' + i;
+ *(e++) = '0' + (char) i;
else {
- *(e++) = '0' + (i / 10);
- *(e++) = '0' + (i % 10);
+ *(e++) = '0' + (char) (i / 10);
+ *(e++) = '0' + (char) (i % 10);
}
*e = 0;
@@ -259,7 +259,7 @@ static int bus_message_setup_kmsg(sd_bus *b, sd_bus_message *m) {
m->kdbus->cookie = m->header->serial;
if (m->header->flags & BUS_MESSAGE_NO_REPLY_EXPECTED)
- m->kdbus->cookie_reply = m->reply_serial;
+ m->kdbus->cookie_reply = m->reply_cookie;
else
m->kdbus->timeout_ns = m->timeout * NSEC_PER_USEC;
@@ -470,7 +470,7 @@ int bus_kernel_write_message(sd_bus *bus, sd_bus_message *m) {
r = bus_message_new_synthetic_error(
bus,
- BUS_MESSAGE_SERIAL(m),
+ BUS_MESSAGE_COOKIE(m),
&error,
&reply);
@@ -798,9 +798,9 @@ static int bus_kernel_make_message(sd_bus *bus, struct kdbus_msg *k) {
case KDBUS_ITEM_CREDS:
/* UID/GID/PID are always valid */
- m->creds.uid = d->creds.uid;
- m->creds.gid = d->creds.gid;
- m->creds.pid = d->creds.pid;
+ m->creds.uid = (uid_t) d->creds.uid;
+ m->creds.gid = (gid_t) d->creds.gid;
+ m->creds.pid = (pid_t) d->creds.pid;
m->creds.mask |= (SD_BUS_CREDS_UID|SD_BUS_CREDS_GID|SD_BUS_CREDS_PID) & bus->creds_mask;
/* The PID starttime/TID might be missing
@@ -815,7 +815,7 @@ static int bus_kernel_make_message(sd_bus *bus, struct kdbus_msg *k) {
}
if (d->creds.tid > 0) {
- m->creds.tid = d->creds.tid;
+ m->creds.tid = (pid_t) d->creds.tid;
m->creds.mask |= SD_BUS_CREDS_TID & bus->creds_mask;
}
break;
@@ -861,8 +861,8 @@ static int bus_kernel_make_message(sd_bus *bus, struct kdbus_msg *k) {
break;
case KDBUS_ITEM_AUDIT:
- m->creds.audit_session_id = d->audit.sessionid;
- m->creds.audit_login_uid = d->audit.loginuid;
+ m->creds.audit_session_id = (uint32_t) d->audit.sessionid;
+ m->creds.audit_login_uid = (uid_t) d->audit.loginuid;
m->creds.mask |= (SD_BUS_CREDS_AUDIT_SESSION_ID|SD_BUS_CREDS_AUDIT_LOGIN_UID) & bus->creds_mask;
break;