hal/hald util.c,1.31,1.32

Danny Kukawka dkukawka at freedesktop.org
Thu Nov 10 11:28:36 PST 2005


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

Modified Files:
	util.c 
Log Message:
2005-11-10  Danny Kukawka  <danny.kukawka at web.de>

        * hald/linux2/probing/Makefile.am: updated for glib

        * hald/linux2/probing/probe-storage.c: (strdup_valid_utf8), (main):
        Fix to prevent sending invalid UTF8 strings from storage serials to D-BUS
        which prevent adding the whole storage divice to the device store. The
        invalid, non UTF8, characters replaced now with '?' and the serial only
        added if there is at least one valid character left in the string.

        * hald/util.c: (util_compute_time_remaining): fixed compiler warning



Index: util.c
===================================================================
RCS file: /cvs/hal/hal/hald/util.c,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -d -r1.31 -r1.32
--- util.c	9 Nov 2005 20:45:44 -0000	1.31
+++ util.c	10 Nov 2005 19:28:34 -0000	1.32
@@ -157,7 +157,7 @@
 			battery_info->last_time = cur_time;
 		} else {
 			battery_info = g_new0(batteryInfo, 1);
-			g_hash_table_insert(saved_battery_info, id, battery_info);
+			g_hash_table_insert(saved_battery_info, (char*) id, battery_info);
 
 			battery_info->last_level = chargeLevel;
 			battery_info->last_time = cur_time;




More information about the hal-commit mailing list