summaryrefslogtreecommitdiff
path: root/src/libsystemd/sd-bus/sd-bus.c
AgeCommit message (Collapse)Author
2014-03-17core, libsystemd, systemd, timedate, udev: spelling fixesMiklos Vajna
2014-03-13sd-bus: don't look for a 64bit value when we only have 32bit value on reply ↵Lennart Poettering
cookie hash table access This broke hashtable lookups for the message cookies on s390x, which is a 64bit BE machine where accessing 32bit values as 64bit and vice versa will explode. Also, while we are at it, be a bit more careful when dealing with the 64bit cookies we expose and the 32bit serial numbers dbus uses in its payload. Problem identified by Fridrich Strba.
2014-03-13bus: fix memory leak when kdbus is not enabledLennart Poettering
2014-03-11bus: replace sd_bus_label_{escape,unescape}() by new ↵Lennart Poettering
sd_bus_path_{encode,decode}() The new calls work similarly, but enforce a that a common, fixed bus path prefix is used. This follows discussions with Simon McVittie on IRC that it should be a good idea to make sure that people don't use the escaping applied here too wildly as anything other than the last label of a bus path.
2014-03-03bus: add sd_bus_track object for tracking peers, and port core over to itLennart Poettering
This is primarily useful for services that need to track clients which reference certain objects they maintain, or which explicitly want to subscribe to certain events. Something like this is done in a large number of services, and not trivial to do. Hence, let's unify this at one place. This also ports over PID 1 to use this to ensure that subscriptions to job and manager events are correctly tracked. As a side-effect this makes sure we properly serialize and restore the track list across daemon reexec/reload, which didn't work correctly before. This also simplifies how we distribute messages to broadcast to the direct busses: we only track subscriptions for the API bus and implicitly assume that all direct busses are subscribed. This should be a pretty OK simplification since clients connected via direct bus connections are shortlived anyway.
2014-02-26Revert back to /var/run at a couple of problemsLennart Poettering
This partially reverts 41a55c46ab8fb4ef6727434227071321fc762cce Some specifications we want to stay compatibility actually document /var/run, not /run, and we should stay compatible with that. In order to make sure our D-Bus implementation works on any system, regardless if running systemd or not, we should always use /var/run which is the only path mandated by the D-Bus spec. Similar, glibc hardcodes the utmp location to /var/run, and this is exposed in _UTMP_PATH in limits.h, hence let's stay in sync with this public API, too. We simply do not support systems where /var/run is not a symlink → /run. Hence both are equivalent. Staying compatible with upstream specifications hence weighs more than cleaning up superficial appearance.
2014-02-25Replace /var/run with /run in remaining placesZbigniew Jędrzejewski-Szmek
/run was already used almost everywhere, fix the remaining places for consistency.
2014-02-23src/shared/ cannot reference symbols from librariesKay Sievers
../src/shared/unit-name.c:462: error: undefined reference to 'sd_bus_label_escape' ../src/shared/unit-name.c:477: error: undefined reference to 'sd_bus_label_unescape' collect2: error: ld returned 1 exit status
2014-02-20api: in constructor function calls, always put the returned object pointer ↵Lennart Poettering
first (or second) Previously the returned object of constructor functions where sometimes returned as last, sometimes as first and sometimes as second parameter. Let's clean this up a bit. Here are the new rules: 1. The object the new object is derived from is put first, if there is any 2. The object we are creating will be returned in the next arguments 3. This is followed by any additional arguments Rationale: For functions that operate on an object we always put that object first. Constructors should probably not be too different in this regard. Also, if the additional parameters might want to use varargs which suggests to put them last. Note that this new scheme only applies to constructor functions, not to all other functions. We do give a lot of freedom for those. Note that this commit only changes the order of the new functions we added, for old ones we accept the wrong order and leave it like that.
2014-02-20sd-bus: the bus returned should be the first argJason A. Donenfeld
This matches the API of previous headers, such as sd-journal.h.
2014-02-19bus: fix unreffing logicLennart Poettering
2014-02-05bus: properly unset default bus pointer when destroying last referenceLennart Poettering
2014-02-03bus: when closing the bus don't end up in a recursive destruction deadlockLennart Poettering
2014-01-27bus: add API calls for connecting to starter busLennart Poettering
Add new calls sd_bus_open() and sd_bus_default() for connecting to the starter bus a service was invoked for, or -- if the process is not a bus-activated service -- the appropriate bus for the scope the process has been started in.
2014-01-22bus: add sd_bus_process_priority() to support prioq mode of kdbusLennart Poettering
2014-01-22bus: add support for attaching name to bus connections for debugging purposesLennart Poettering
2014-01-22bus: simplify naming of feature negotation callsLennart Poettering
Two verbs in a function name suck, so let's simplify this a bit.
2014-01-21bus: implement synchronous message calls via kernel ioctlLennart Poettering
2014-01-21libsystemd: split up into subdirsTom Gundersen
We still only produce on .so, but let's keep the sources separate to make things a bit less messy.