hal/hald/linux2 acpi.c,1.41,1.42

Richard Hughes hughsient at freedesktop.org
Thu Dec 1 09:32:52 PST 2005


Update of /cvs/hal/hal/hald/linux2
In directory gabe:/tmp/cvs-serv23659/hald/linux2

Modified Files:
	acpi.c 
Log Message:
Small patch to fix a problem with refreshing battery values when the ac_adapter is removed.

Index: acpi.c
===================================================================
RCS file: /cvs/hal/hal/hald/linux2/acpi.c,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -d -r1.41 -r1.42
--- acpi.c	9 Nov 2005 20:45:44 -0000	1.41
+++ acpi.c	1 Dec 2005 17:32:50 -0000	1.42
@@ -363,6 +363,14 @@
 
 	/* refresh last full if ac plugged in/out */
 	battery_poll_infrequently (NULL);
+
+	/*
+	 * Refresh all the data for each battery.
+	 * This is required as the batteries may go from charging->
+	 * discharging, or charged -> discharging state, and we don't
+	 * want to wait for the next random refresh from acpi_poll.
+	 */
+	acpi_poll_battery ();
 	
 	return TRUE;
 }




More information about the hal-commit mailing list