summaryrefslogtreecommitdiff
path: root/src/libsystemd/sd-bus/bus-message.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-01-22 10:57:12 +0100
committerLennart Poettering <lennart@poettering.net>2014-01-22 11:19:26 +0100
commit6a0e376c1cd303ff09777e5d18f070fe43e6b915 (patch)
tree04001242fbab20b73eb24971b93111c3065cc077 /src/libsystemd/sd-bus/bus-message.c
parentd6f116a7b18f8bd3c6507c803217991235c7f1bb (diff)
bus: add API for querying the kdbus message sequence number
Diffstat (limited to 'src/libsystemd/sd-bus/bus-message.c')
-rw-r--r--src/libsystemd/sd-bus/bus-message.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/libsystemd/sd-bus/bus-message.c b/src/libsystemd/sd-bus/bus-message.c
index 1a2039b8cd..0c3913e2b0 100644
--- a/src/libsystemd/sd-bus/bus-message.c
+++ b/src/libsystemd/sd-bus/bus-message.c
@@ -898,6 +898,15 @@ _public_ int sd_bus_message_get_realtime_timestamp(sd_bus_message *m, uint64_t *
return 0;
}
+_public_ int sd_bus_message_get_seqnum(sd_bus_message *m, uint64_t *seqnum) {
+ assert_return(m, -EINVAL);
+ assert_return(seqnum, -EINVAL);
+ assert_return(m->seqnum > 0, -ENODATA);
+
+ *seqnum = m->seqnum;
+ return 0;
+}
+
_public_ sd_bus_creds *sd_bus_message_get_creds(sd_bus_message *m) {
assert_return(m, NULL);