summaryrefslogtreecommitdiff
path: root/src/libsystemd-bus/sd-bus.c
AgeCommit message (Collapse)Author
2013-11-06bus: export libsystemd-bus as a public libraryZbigniew Jędrzejewski-Szmek
Old static libsystemd-bus.la becomes libsystemd-bus-internal.la. memfd functions are also exported in the same library. (Best viewed with --color-words -U0).
2013-11-05bus: add sd_bus_get_current() bus call to determine message that is ↵Lennart Poettering
currently being dispatched
2013-11-05bus: make use of assert_return() in all API calls that don't use it yetLennart Poettering
2013-10-30bus: add API call to create bus connection to the system bus of local containersLennart Poettering
Also, add support for this to machinectl, so that we can enumerate the machines that run inside a container. We must go deeper!
2013-10-30bus: move ssh support into public API of libsystem-busLennart Poettering
2013-10-18bus: automatically flush bus queue when we exit the event loopLennart Poettering
This way, we do not have to call it manually
2013-10-16timedated: use libsystemd-bus instead of libdbus for bus communicationLennart Poettering
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
2013-10-16bus: return 1 on all calls that send messagesLennart Poettering
This way they are nicer to use from method dispatch callbacks as last call, since method dispatch callbacks expect > 0 return if the message got handled.
2013-10-16bus: make sure sd_bus_get_timeout() returns a 0 timeout of there are already ↵Lennart Poettering
read but not dispatched messages
2013-10-14bus: make sure that we always keep a ref to the bus when we dispatch callbacksLennart Poettering
Otherwise the callback might unref the bus we are processing and destroy the object while we are processing it.
2013-10-14bus: use assert_return() for more API callsLennart Poettering
2013-10-14list: make our list macros a bit easier to use by not requring type spec on ↵Lennart Poettering
each invocation We can determine the list entry type via the typeof() gcc construct, and so we should to make the macros much shorter to use.
2013-10-11bus: split up overly long sd-bus.c into three filesLennart Poettering
2013-10-11bus: if a a Set() vtable callback of a writable is left NULL, try to do the ↵Lennart Poettering
right thing automatically
2013-10-11bus: automatically do a NOP reply when a NULL callback is specified for a ↵Lennart Poettering
method in a vtable Also, allow specifiying NULL as signature in vtables equivalent to "" for empty parameter lists.
2013-10-11bus: when NULL is specified as property callback, automatically handle ↵Lennart Poettering
serialization on Get()
2013-10-11bus: make PropertiesChanged emission workLennart Poettering
2013-10-11bus: allow specifying NULL as type string when we want to construct messages ↵Lennart Poettering
with no payload
2013-10-11bus: make GetManagedObjects() workLennart Poettering
2013-10-09bus: fix missing initializationLennart Poettering
2013-10-09bus: fix GetAll() userdata passingLennart Poettering
2013-10-09bus: don't require that if a child object node exists its parent node must tooLennart Poettering
2013-10-09libsystemd-bus: add lightweight object vtable implementation for exposing ↵Lennart Poettering
objects on the bus This adds a lightweight scheme how to define interfaces in static fixed arrays which then can be easily registered on a bus connection. This makes it much easier to write bus services. This automatically handles implementation of the Properties, ObjectManager, and Introspection bus interfaces.
2013-10-02dbus: fix return value of dispatch_rqueue()Lennart Poettering
2013-05-22bus: add benchmark tool to determine the right threshold for copying vs. memfdLennart Poettering
2013-05-20bus: calculate bloom filter for matchLennart Poettering
Yay! Filtering using kernel bloom filter matches works now! Yippieh!
2013-05-17bus: add APIs for negotiating what is attached to messagesLennart Poettering
2013-05-17bus: add minimal locking around the memfd cacheLennart Poettering
We want to allow clients to process an sd_bus_message on a different thread than it was received on. Since unreffing a bus message might readd some of its memfds to the memfd cache add some minimal locking around the cache.
2013-05-17bus: return ECHILD as soon as people try to reuse a bus connection across a ↵Lennart Poettering
fork()
2013-05-17bus: actually unmap kdbus pool after useLennart Poettering
2013-05-17bus: keep kernel bus fd around during entire life-time of busLennart Poettering
We need this since we might need to invoke the release ioctl for messages. Since we don't want to add any locking for that we simply keep a reference to the bus and then rely that the fd stays valid all the time.
2013-05-16bus: make bus ref counting atomicLennart Poettering
This is preparation to allow sd_bus_message obejcts to be processed in a different thread from their originating sd_bus object.
2013-05-16bus: synthesize timeout message errors instead of returning error codesLennart Poettering
2013-05-14bus: properly handle message bodies that are a chain of memory areas rather ↵Lennart Poettering
than a single one
2013-04-24Add set_consume which always takes ownershipZbigniew Jędrzejewski-Szmek
Freeing in error path is the common pattern with set_put().
2013-04-15bus: handle env vars safelyLennart Poettering
Make sure that our library is safe for usage in SUID programs when it comes to env var handling
2013-04-14bus: always explicitly rewind read index before passing message to caller or ↵Lennart Poettering
callback
2013-04-12bus: implement basic name registration with kdbusLennart Poettering
2013-04-12bus: make kdbus work so that we can exchange real messagesLennart Poettering
We have ignition, we have tremendous fire!
2013-04-11bus: basic implementation of kdbus client sideLennart Poettering
2013-04-11bus: calculate iovec for messages only when we need itLennart Poettering
2013-04-05Use initalization instead of explicit zeroingZbigniew Jędrzejewski-Szmek
Before, we would initialize many fields twice: first by filling the structure with zeros, and then a second time with the real values. We can let the compiler do the job for us, avoiding one copy. A downside of this patch is that text gets slightly bigger. This is because all zero() calls are effectively inlined: $ size build/.libs/systemd text data bss dec hex filename before 897737 107300 2560 1007597 f5fed build/.libs/systemd after 897873 107300 2560 1007733 f6075 build/.libs/systemd … actually less than 1‰. A few asserts that the parameter is not null had to be removed. I don't think this changes much, because first, it is quite unlikely for the assert to fail, and second, an immediate SEGV is almost as good as an assert.
2013-04-05bus: various improvements for test-bus-chatLennart Poettering
2013-04-05bus: add convenience calls for method replies, tooLennart Poettering
2013-04-05bus: make sure callback structs are always properly initializedLennart Poettering
2013-04-05bus: use C99 struct construction for error initializersLennart Poettering
That way we can allocate an error struct on-the-fly while calling a function. Nice!
2013-04-05bus: add convenience functions for constructing and sending method ↵Lennart Poettering
calls/signals in one call
2013-04-05bus: properly detect and handle if a callback is installed/removed from ↵Lennart Poettering
within a callback
2013-04-05bus: don't allow recursive invocation of sd_bus_process()Lennart Poettering
2013-04-01bus: always return something in sd_bus_get_timeout()Lennart Poettering