summaryrefslogtreecommitdiff
path: root/libhal
AgeCommit message (Collapse)AuthorFilesLines
2009-02-21do not call property_set_lookup before checking param validityGuillem Jover1-1/+1
Fixed libhal: do not call property_set_lookup before checking param validity.
2009-02-21do not leak on error conditionsGuillem Jover1-1/+3
Fixed leaks on error conditions.
2008-04-18fixed a bunch of compiler warnings from the Intel compilerDanny Kukawka1-17/+10
Fixed a bunch of compiler warnings from the Intel compiler (cce/icc 10.1.015). Closed a small memory leak in linux/hal-file-monitor.c
2008-03-04s/LIBHAL_CHECK_LIBHALCONTEXT/LIBHAL_CHECK_PARAM_VALID/Danny Kukawka1-3/+3
Fixed usage of LIBHAL_CHECK_LIBHALCONTEXT() in libhal_get_all_devices_with_properties(). For parameter checks use LIBHAL_CHECK_PARAM_VALID() instead.
2008-03-03Merge branch 'master' of ssh://david@git.freedesktop.org/git/halDavid Zeuthen1-159/+106
2008-03-03add methods and libhal api to get all devices in properties in one callDavid Zeuthen2-0/+161
This is optionally used by the gvfs hal volume monitor.
2008-02-26fix crash in libhal_ctx_shutdownFrederic Crozat1-2/+2
This fixes a crash in libhal, found when libhal_ctx_shutdown is called while system bus was shutdown. It ensures the way dbus error has handled in libhal_ctx_shutdown is the same as the other functions in libhal.c (and it no longer crashes as a bonus).
2008-02-07libhal: unref DBusMessages as soon as possibleGuillem Jover1-154/+101
Reduces the amount of same calls in different code paths. Fixes few double unreferencing, and several resource leaks by unreferencing the DBusMessages.
2008-01-15fix compiler warning from cgcc/sparseDanny Kukawka1-3/+3
This fixes several compiler warnings from cgcc/spase.
2007-12-06fix some whitespacesDanny Kukawka1-6/+10
Fixed some whitespaces in libhal.c
2007-12-06add udi and some more checks to libhalDanny Kukawka1-45/+107
This adds: - a minimal check if a given UDI is valid (checks if the UDI starts with '/org/freedesktop/Hal/devices/'). This should prevent possible (application) crashes if a invalid UDI is send to HAL and reduce unneeded dbus calls. - some more parameter checks (for LibHalChangeSet, keys ...)
2007-11-28libhal: fix memory leaks after out of memory conditionsGuillem Jover1-6/+19
Fixed memory leaks after out of memory conditions.
2007-11-20libhal: do not dereference *reason_why_locked if it's NULLGuillem Jover1-0/+2
Do not dereference *reason_why_locked if it's NULL after call dbus_malloc0().
2007-09-20fixed access of freed memoryDirk Müller1-3/+5
Fixed access of freed memory in function libhal_free_property_set().
2007-08-28add more parameter checks to libhalDanny Kukawka1-8/+53
This patch adds some more parameter check to some of the libhal functions to avoid possible trouble (e.g. in libhal_free_property_set()).
2007-08-09fix libhal_psi_has_more() incorrect behaviorDavid Zeuthen1-1/+1
The last entry is not returned.
2007-08-09fixed libhal code docuDanny Kukawka1-1/+0
Fixed libhal code docu, removed type from commit #e9717094
2007-08-09fixed return type of libhal_ctx_init_direct()Danny Kukawka1-1/+3
Fixed one return of libhal_ctx_init_direct() to return not FALSE, but correct LibHalContext* if dbus_connection_add_filter() fail.
2007-07-26fix build errors with D-Bus versions < v1.0Danny Kukawka1-0/+4
Fix build errors with older D-Bus versions (< v1.0) where DBUS_API_SUBJECT_TO_CHANGE need to be defined.
2007-07-03fix API documentation of libhalDanny Kukawka1-1/+1
Fixed API documentation of libhal (libhal_device_singleton_addon_is_ready)
2007-07-02[PATCH] convert libhal to use a hashtable for property setsRob Taylor3-69/+630
Uses uthash (http://uthash.sourceforge.net/) as a hashtable implementation for LibHalPropertySet. Slight changes have been made to uthash.h to remove float usage and clean up compiler warnings.
2007-07-02[PATCH] libhal support for addon singletonsRob Taylor2-102/+458
Adds api to libhal for supporting addon singletons: - libhal_device_singleton_addon_is_ready for singletons to signal readyness. - libhal_ctx_set_singleton_device_added and libhal_ctx_set_singleton_device_removed for setting a callback on singleton DeviceAdded/Removed. The properties of the new device are passed as a LibHalPropertySet to the callback. - a number of direct accessors for properties in a LibHalPropertySet
2007-07-02free changeset elements keysSjoerd Simons1-0/+1
Changeset element keys weren't freed, causing memleaks. Mostly in the UPS addon, which uses it for every change it notices.
2007-05-02update configure.in and use autoreconfGuillem Jover1-1/+1
Update the autotools files to not use obsolete macros and variables and add proper quotation. Switch to autoreconf which will call any needed program. Also autoreconf -Wall should be clean now (except for external problems).
2007-04-18fix possible segfault in probe-volume if vid->type == NULLDanny Kukawka1-0/+3
Fix possible segfaults in probe-volume and libhal if vid->type == NULL. Adde d checks for vid->type != NULL to probe-volume.c and new checks for parameter (LIBHAL_CHECK_PARAM_VALID) of libhal_changeset_set_property_string(). This fix also fd.o bug #10429.
2007-04-15remove use of "action parameters" now that they're going in PolicyKitDavid Zeuthen2-17/+0
2007-04-09take advantage of new parameter API in PolKitActionDavid Zeuthen2-5/+22
These actions currently set parameters hal-storage-mount-[removable|fixed]: - fstype - mount-point - mount-options hal-lock - interface
2007-04-06port HAL over to use PolicyKit masterDavid Zeuthen2-69/+157
In the process, include hal-functions and make out shell-script based method handlers share that.
2007-04-03remove i18n supportDavid Zeuthen1-11/+0
It just doesn't make sense for a system-wide daemon to have translations. The only reasons it's here is that 1. deprecated functions in libhal-storage uses it (officially deprecated since 0.5.8 but people have been advised for long to not use it) 2. hal-device-manager uses it (and that will be replaced by gnome-device-manager shortly; other desktops are encouraged to write their own replacements too.)
2007-04-02as_ac_removalMichael Biebl1-1/+1
2007-03-31change locking semantics slightly and add missing locking bitsDavid Zeuthen2-3/+357
2007-03-27make libhal locking API take 'bool exclusive' and fix a bugDavid Zeuthen2-2/+8
2007-03-25don't set INVOKED_BY_SYSTEMBUS_CONNECTION_NAME unless call is from busDavid Zeuthen1-4/+4
2007-03-25add interface locking and remove generic locking API committed yesterdayDavid Zeuthen2-0/+273
Now to write some docs how all this works...
2007-03-22fix typoDavid Zeuthen1-1/+1
2007-03-07libhal: validate parameter to be != NULLDanny Kukawka2-1/+106
This fixes fd.o bug #10133 and check several function parameter for != NULL to aviod problems with D-Bus calls where e.g. given udi or key is NULL (it's at least the same code as check for a valid LibHalContext).
2007-03-05fix compiler warning in libhalDanny Kukawka1-2/+2
Fixed compiler warning in libhal within fprintf().
2007-02-28sort properties in lshal outputDavid Zeuthen2-0/+44
I can't believe I didn't implement this earlier. Also extend libhal with a libhal_property_set_sort() method and provide a lame bubble-sort implementation for now.
2007-02-20remove annoying LIBHAL_FREE_DBUS_ERROR spew to stderrDavid Zeuthen1-5/+0
2007-01-04fixed code docu in libhalDanny Kukawka1-5/+5
Fixed copy-and-paste error in libhal and named the related functions in the code documentation correct.
2006-11-13fixed usage of dbus_error_is_set(error == NULL) due to D-Bus changesDanny Kukawka1-20/+20
This patch fixes the usage of dbus_error_is_set(error) if the error is NULL. Added check to be sure the lib don't call dbus_error_is_set() if the error is NULL, otherwise the call crash.
2006-09-14remove dead code introduced by commit 0ae1aed74548fec563399d00100d621ce99b383bDavid Zeuthen1-3/+0
2006-09-14send changes in correct order for LibHalChangeSetDavid Zeuthen1-13/+29
Before this bug was fixed, the changes were sent in the wrong order. This screwed up probe-storage.c (and probably other helpers too) as it first set a property to FALSE and subsequently to TRUE.
2006-09-10require addons to call libhal_device_addon_is_ready() to make device visibleDavid Zeuthen2-0/+67
Also fixup some .gitignore files and prune the TODO for finished items.
2006-09-10make addon-hip-ups use LibHalChangeSetDavid Zeuthen1-0/+4
Also put some brains into addon-hid-ups so it only sets properties if they are changed. Fix libhal_device_commit_changeset do nothing if the changeset is empty. Should reduce load when having a USB UPS.
2006-09-10add new partition probing code and adapt hal code to use itDavid Zeuthen1-0/+7
Added a new static library in partutil/ that serves two purposes 1. Probe for partition tables and the entries in them. This is done without any new dependencies and is in general efficient. Right now we understand Master Boot Record (and Extended MBR), GUID Partitioning Tables and Apple Partition Map. The interface is generic enough to add support for other disk labels too should the need arise. 2. Create partition tables, add partition table entries, alter partition table entries, delete partition table entries. This is done using libparted to ensure maximal robustness and correctness. Beware that libparted is kinda silly in a few ways, it probes all drives (even when asked to only look at one drive - the audicity!), and we have to poke at the internals to get/set vital raw properties. As such, we only officially support libparted 1.7.1 at this point. If you use anything else but that, you are on your own. We should start a dialouge with the libparted guys to make them export official API suitable for our needs. configure now takes a new --enable-parted and by default (for the upcoming 0.5.8 release), this is set to "no". As such, the upcoming 0.5.8 release will not depend on libparted. Also we now use this infrastructure in probe-volume and probe-storage to export the following new properties storage.partitioning_scheme (string) on storage devices and volume.partition.scheme (string) volume.partition.type (string) volume.partition.label (string) volume.partition.uuid (string) volume.partition.flags (strlist) on volumes. These new properties are also now exported through libhal-storage. Also moves some more code over to using LibHalChangeSet for nicer and much more efficient handling.
2006-08-14share is_mounted_by_hald() and non-gcc nitsArtem Kachitchkine1-18/+18
Moved linux2/blockdev.c:is_mounted_by_hald() to util.c:hal_util_is_mounted_by_hald() so all backends can use it. Fixed some compilation warnings when compiling with non-GNU compiler and libc.
2006-08-07add API to hald (and libhal) to change multiple properties at onceDavid Zeuthen2-2/+495
Also converted probe-volume to use this new API.
2006-08-06fixed several compiler warnings (warn_unused_result and format stuff)Danny Kukawka1-3/+3
This fixes several compiler warnings from warn_unused_result compiler flag and some "format '%*' expects type 'x', but argument z has type 'xy'" warnings on 64bit systems.
2006-08-02make libhal link against libintl for NetBSD (bug #6471)Julio M. Merino Vidal1-1/+1
libhal uses i18n functions such as bindtextdomain. These functions are not always provided by the standard C library (as happens in Linux). For example, NetBSD has the i18n functions in libintl. Therefore, libhal should be linked against the appropriate library that provides the missing functions. This library is available in the INTLLIBS variable thanks to the AM_GLIB_GNU_GETTEXT variable used in configure. If libhal is not linked to libintl, any program using libhal fails to build because the missing functions cannot be found. This happens while trying to build the tools directory.