Age | Commit message (Collapse) | Author | Files | Lines |
|
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
|
|
The name of each Logitech HID++ 2.0 Feature will now be freed.
https://bugs.freedesktop.org/show_bug.cgi?id=82659
|
|
g_variant_get for string types must be freed as documented at
https://developer.gnome.org/glib/stable/gvariant-format-strings.html#gvariant-format-strings-strings
Since we just want to compare it, use a pointer as documented at
https://developer.gnome.org/glib/stable/gvariant-format-strings.html#gvariant-format-strings-pointers
https://bugs.freedesktop.org/show_bug.cgi?id=82659
|
|
Fixes a -Wcast-align warning and a -fsanitize=undefined error.
https://bugs.freedesktop.org/show_bug.cgi?id=71079
|
|
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>
|
|
Instead of a call to g_get_current_time().
|
|
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>
|
|
It was documented, but the configuration was never actually read.
https://bugs.freedesktop.org/show_bug.cgi?id=82925
|
|
This is better design to catching regressions and problems in a more
pin-pointed fashion. This also avoids having to restart the umockdev testbed
due to changing the environment variables with stop/start_daemon().
|
|
Python 3.4 changed the TestCase._outcome semantics, adjust accordingly.
|
|
This can happen in CI environments without a desktop session.
|
|
|
|
|
|
|
|
The IsDocked property has been incorrect for a number of laptops for a
while, as it thought that laptops with hybrid graphics cards were always
docked.
The alternative would have been to use the platform/dock_station
devices, but those are only exported for ACPI docking stations.
Instead, whether an external display is attached (which isn't really
docking) should be checked in the same place where the policy depending
on the value should be applied, such as gnome-settings-daemon.
https://bugs.freedesktop.org/show_bug.cgi?id=36818
|
|
|
|
This has 2 effects:
- we never stop polling (we used to stop polling when the
battery was marked as fully-charged, but that can happen when
the battery is discharging too)
- when in an unknown state, we will poll through the daemon,
and through our unknown poll. This isn't a problem as there'll
another 115 seconds of wait until we get to poll through the
daemon again.
|
|
Next up is doing this for batteries, which need to switch between
a normal/slow poll to a faster one when the battery state is unknown.
|
|
|
|
And remove the gathering of the battery poll from the device
itself, it's of nearly no use.
|
|
|
|
Matching the work done in glib, gtk+, etc.
This also differentiates the unknown and normal timeouts in
the Linux power supply driver.
|
|
For system integrators. If your firmware is helpful to user space
and automatically sends out uevent when the battery level changes
(rather than just the battery state) as on most machines,
you can enable "NoPollBatteries" in the configuration option,
and reduce power consumption from UPower and its listeners.
|
|
In up_device_supply_refresh().
|
|
|
|
We cannot ever set the refresh timeout when we have a power line
device, so don't try and remove it there.
|
|
5 times, with 1 second timeouts, instead of 30 times, with
2 seconds timeouts.
|
|
It was never actually setup, as the fallback state was used
to check whether we should use poll or not.
|
|
Some batteries report energy > energy_full and a percentage ("capacity"
attribute) > 100%. Clamp these within 0 and 100% for both plausibility as well
as to avoid setting an out-of-range property which would then become 0%.
https://launchpad.net/bugs/1240673
|
|
I don't think the kernel exports any numbers with a decimal
portion, but if they did, they would get the wrong values because
some locales use "," as the decimal separator, and not "." as the
kernel/C locale would.
|
|
Update the expected warning levels to match, and add a big
fat FIXME for the test case itself. That's not how UPSes work,
or how UPower is expected to work.
|
|
|
|
As was the case in other places, we need to be able to differentiate
warning messages for them to be useful.
|
|
Replace them all with WarningLevel tests.
Note we current crash when adding a UPS, in test_ups_ac.
|
|
|
|
|
|
In the integration tests.
|
|
Proxy paths, and enumeration from the current API.
|
|
|
|
When switching off Bluetooth devices, and before they timeout,
we won't be able to read the battery percentage, so don't
overwrite the previous value with "0%", but set the state to
unknown instead.
https://bugs.freedesktop.org/show_bug.cgi?id=70325
|
|
|
|
In up_device_supply_get_state()
|
|
When refreshing the state of device batteries, no need
to get data that won't be there anyway, such as voltage, temperature,
or consumption rate.
This avoids warnings about voltage being unknown for devices, and
cuts down on the properties churn.
|
|
We're going to be reusing this elsewhere.
|
|
We already have enough information on the device battery.
This avoids having a device for the wacom AC which we won't use.
|
|
Not all "UpDeviceSupply" actually supply power to the computer.
|
|
|
|
|