Include $(top_builddir) when building so that we can find the newly
generated D-Bus helper files. Note that, because we ship generated files
in the tarball, we'll also need to include $(top_srcdir).
This patch adds support for using ConsoleKit2's DBUS API to
implement the critical action for FreeBSD and OpenBSD. It does so
by creating a common backend file both can use to implement the
API calls.
https://bugs.freedesktop.org/show_bug.cgi?id=85242
We're a bit too fast for usbmuxd to have noticed the USB device getting
plugged in, so defer until either the device is 1) noticed by usbmuxd
and 2) paired.
https://bugs.freedesktop.org/show_bug.cgi?id=88950
This makes it easier to find real memory leaks with valgrind. After
calling the up_backend_unplug functions, you cannot restart it with
up_backend_coldplug since the lists are cleared.
Tested with Linux only (not on *BSD; dummy compiles).
https://bugs.freedesktop.org/show_bug.cgi?id=82659
up_daemon_get_daemon takes a reference on UpDaemon, so it must be
properly dereferenced. Similar for up_daemon_get_devices_list which
references an UpDeviceList.
The display device was allocated in init, but never released either.
https://bugs.freedesktop.org/show_bug.cgi?id=82659
Whenever the daemon is polling on a device, a new signal is connected to
the object. This signal was not disconnected when polling stops which
resulted in a memory leak. Furthermore, whenever the "warning-level"
property is updated, the signal would result in an exponentially raising
call count (this happens when the battery percentage changes for
example).
https://bugs.freedesktop.org/show_bug.cgi?id=82659
Reported-by: Alexander Jesner <alexander@jesner.eu>
Signed-off-by: Peter Wu <peter@lekensteyn.nl>
up_wakeups_get_cmdline returns allocated memory and
up_wakeup_item_set_cmdline duplicates it. Therefore free the former
after setting it on the item.
https://bugs.freedesktop.org/show_bug.cgi?id=82659
Reproducible by executing `upower -d` or by calling the DBus method
org.freedesktop.UPower.Device.GetStatistics(charging).
up_device_get_statistics ->
up_history_get_profile_data ->
up_stats_item_new.
https://bugs.freedesktop.org/show_bug.cgi?id=82659
dbus_g_method_return[_error] does not claim the passed parameters, the
caller must free it theirselves.
complex is filled with an GValueArray pointer (see
UP_DBUS_STRUCT_DOUBLE_DOUBLE) but its contents are not freed (memleak!).
This patch introduces a deprecation warning due to the use
g_value_array_free, but since UP_DBUS_STRUCT_DOUBLE_DOUBLE is a
GValueArray, this is unavoidable.
https://bugs.freedesktop.org/show_bug.cgi?id=82659
Under certain conditions lockdownd_client_free was called
twice for same client. This caused SIGSEGV.
This patch addresses this issue
Signed-off-by: Nikolay Martynov <mar.kolya@gmail.com>
Signed-off-by: Richard Hughes <richard@hughsie.com>
Commit 5ddfe0d (all: Use g_get_real_time() when possible) replaced calls
to g_get_current_time() with g_get_real_time(), however, we also need to
convert the return value from microseconds to seconds.
Signed-off-by: Richard Hughes <richard@hughsie.com>
Cppcheck found it as a logical conjunction always evaluates to
false: EXPR < 32 && EXPR > 126. Change the expression to an Or.
https://bugs.freedesktop.org/show_bug.cgi?id=71066
Signed-off-by: Richard Hughes <richard@hughsie.com>