summaryrefslogtreecommitdiff
path: root/src/up-history.c
AgeCommit message (Collapse)AuthorFilesLines
2014-11-26daemon: plug huge memleak in GetStatisticsPeter Wu1-1/+1
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
2014-06-24daemon: Fix possible UpHistoryItem leak on failureBastien Nocera1-0/+2
2014-02-25Create the history directory at runtimeCosimo Cecchi1-1/+3
In addition to build time - this increases compatibilty with OSTree, which starts out with an empty /var. Signed-off-by: Richard Hughes <richard@hughsie.com>
2013-10-26daemon: Better timeout source namingBastien Nocera1-1/+1
Matching the work done in glib, gtk+, etc. This also differentiates the unknown and normal timeouts in the Linux power supply driver.
2013-10-14daemon: Require newer GLibBastien Nocera1-2/+0
And remove ifdef's.
2013-10-14daemon: Remove unneeded reset of priv struct membersBastien Nocera1-5/+0
It's already done by GObject.
2013-10-14daemon: Simplify _new() functionsBastien Nocera1-3/+1
2013-08-29Make GetHistory() array order consistentMartin Pitt1-2/+2
When requesting fewer history elements than we actually have, fix the interpolation loop to not reverse the returned elements; this already does not happen if we request more elements than available, which led to the returned list order depending on the history size. Now the first array element is always the most recent one. Update documentation accordingly. Add test case to reproduce the problem. We now add three sample points to be able to request a subset and still assert its correct order, and make the charge values be further apart to ensure correct interpolation. https://bugs.freedesktop.org/show_bug.cgi?id=68384
2013-01-29Fix two memory leaksColin Watson1-0/+1
up_device_supply_get_design_voltage(): up_device_supply_get_string() returns a newly allocated copy. up_history_finalize(): Forgot to free history->priv->dir https://bugs.freedesktop.org/show_bug.cgi?id=60019
2012-01-18Return all history records for a timespan of zeroRichard Hughes1-1/+7
This makes the code conform to the documentation.
2011-10-06Don't spam the log when we're saving history when on low powerRichard Hughes1-1/+1
Resolves: https://bugs.freedesktop.org/show_bug.cgi?id=41486
2011-10-04Add --with-historydir to specify where we want the history files to be storedLandry Breuil1-1/+1
Signed-off-by: Richard Hughes <richard@hughsie.com>
2010-11-04UpHistory: Add method to set history dirMartin Pitt1-1/+13
Add up_history_set_directory() method to change the directory for history files. This is mainly useful for our test suite.
2010-11-01Port from EggDebug to the GLib built-in logging frameworkRichard Hughes1-19/+18
2010-09-17Only save by default 7 days data to stop the log files becoming huge. Fixes ↵Richard Hughes1-26/+62
rh#634228 Parsing huge log files at startup will demolish startup time. Cull old entries when the file is resaved to keep them sane. Also add the needed self tests to check this in the future.
2010-06-05Port to GTestRichard Hughes1-27/+0
2010-06-05Assign names to our idle sources when using new versions of glib2Richard Hughes1-1/+3
This makes it possible to profile more accurately using systemtap
2010-03-26Convert the daemon to using objects from libupower-glib, not ↵Richard Hughes1-101/+117
devkit-power-gobject
2010-02-05Move the history files to /var/lib/upowerMichael Biebl1-1/+1
Distros should move existing files from /var/lib/DeviceKit-power to /var/lib/upower on upgrades in their maintainer scripts.
2010-01-27Update the Free Software Foundation addressRichard Hughes1-1/+1
2010-01-18trivial: DkpStatsObj -> UpStatsObj (no ABI or API break)Richard Hughes1-7/+7
2010-01-18trivial: DkpHistory -> UpHistory (no ABI or API break)Richard Hughes1-156/+156
2010-01-18trivial: switch to using the new enum names internally (no ABI or API break)Richard Hughes1-11/+11
2010-01-18trivial: DkpDevice -> UpDevice (no ABI or API break)Richard Hughes1-3/+3
2010-01-18trivial: Rename a lot of the source files from dkp-foo to up-foo, no API or ↵Richard Hughes1-0/+899
ABI changes