hal/libhal libhal.c,1.38,1.39
David Zeuthen
david at freedesktop.org
Wed Feb 16 13:25:37 PST 2005
Update of /cvs/hal/hal/libhal
In directory gabe:/tmp/cvs-serv16495/libhal
Modified Files:
libhal.c
Log Message:
2005-02-16 David Zeuthen <davidz at redhat.com>
Fix up more sloppy errors incuded from patches that I should
have reviewed more carefully :-/
* libhal-storage/libhal-storage.c: Match against
LIBHAL_PROPERTY_TYPE_*, not DBUS_TYPE_*
(libhal_drive_policy_default_use_managed_keyword):
(libhal_drive_policy_default_get_mount_root):
(libhal_drive_policy_default_use_managed_keyword):
(libhal_drive_policy_default_get_managed_keyword_primary):
(libhal_drive_policy_default_get_managed_keyword_secondary):
(libhal_drive_policy_get_mount_options):
(libhal_volume_policy_get_mount_options): Yikes, Yikes, rename
"/org/freedesktop/LibHal" back to "/org/freedesktop/Hal"
* libhal/libhal.c (libhal_property_fill_value_from_variant): p->type
wasn't being assigned :-/. Also, DBUS_TYPE_BOOLEAN wasn't handled.
* hald/hald_test_libhal.c (check_libhal): Fix this test
Index: libhal.c
===================================================================
RCS file: /cvs/hal/hal/libhal/libhal.c,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -d -r1.38 -r1.39
--- libhal.c 16 Feb 2005 18:39:56 -0000 1.38
+++ libhal.c 16 Feb 2005 21:25:35 -0000 1.39
@@ -269,6 +269,7 @@
p->str_value = strdup (v);
if (p->str_value == NULL)
return FALSE;
+ p->type = LIBHAL_PROPERTY_TYPE_STRING;
break;
}
@@ -279,6 +280,7 @@
dbus_message_iter_get_basic (var_iter, &v);
p->int_value = v;
+ p->type = LIBHAL_PROPERTY_TYPE_INT32;
break;
}
@@ -289,6 +291,7 @@
dbus_message_iter_get_basic (var_iter, &v);
p->uint64_value = v;
+ p->type = LIBHAL_PROPERTY_TYPE_UINT64;
break;
}
@@ -299,6 +302,18 @@
dbus_message_iter_get_basic (var_iter, &v);
p->double_value = v;
+ p->type = LIBHAL_PROPERTY_TYPE_DOUBLE;
+
+ break;
+ }
+ case DBUS_TYPE_BOOLEAN:
+ {
+ double v;
+
+ dbus_message_iter_get_basic (var_iter, &v);
+
+ p->double_value = v;
+ p->type = LIBHAL_PROPERTY_TYPE_BOOLEAN;
break;
}
@@ -385,8 +400,7 @@
p_last = NULL;
- while (dbus_message_iter_get_arg_type (&dict_iter)
- == DBUS_TYPE_DICT_ENTRY)
+ while (dbus_message_iter_get_arg_type (&dict_iter) == DBUS_TYPE_DICT_ENTRY)
{
DBusMessageIter dict_entry_iter, var_iter;
const char *key;
@@ -426,8 +440,6 @@
if(!libhal_property_fill_value_from_variant (p, &var_iter))
goto oom;
-
-
dbus_message_iter_next (&dict_iter);
}
More information about the hal-commit
mailing list