Replace bool by gboolean on DBus generated calls.
The code generated for use with dbus-glib expects the boolean "b"
arguments to receive a gboolean variable and not a bool. This is
problem for both gboolean* and gboolean arguments because
sizeof(gboolean) is typically 4 while sizeof(bool) is 1. This can
led to uninitialized memory or segmentation faults.
BUG=None
TEST=update_engine_client calls still work.
Change-Id: I4036d63c875859fd73f2ff5a1585494ebe4d3603
Reviewed-on: https://chromium-review.googlesource.com/167526
Reviewed-by: David Zeuthen <zeuthen@chromium.org>
Tested-by: Alex Deymo <deymo@chromium.org>
Commit-Queue: Alex Deymo <deymo@chromium.org>
diff --git a/dbus_service.h b/dbus_service.h
index 27210f6..e99caef 100644
--- a/dbus_service.h
+++ b/dbus_service.h
@@ -52,7 +52,7 @@
GError **error);
gboolean update_engine_service_attempt_rollback(UpdateEngineService* self,
- bool powerwash,
+ gboolean powerwash,
GError **error);
gboolean update_engine_service_reset_status(UpdateEngineService* self,
@@ -79,7 +79,7 @@
// currently has).
gboolean update_engine_service_set_channel(UpdateEngineService* self,
gchar* target_channel,
- bool is_powerwash_allowed,
+ gboolean is_powerwash_allowed,
GError **error);
// If get_current_channel is set to true, populates |channel| with the name of
@@ -87,7 +87,7 @@
// the name of the channel the device is supposed to be (in case of a pending
// channel change).
gboolean update_engine_service_get_channel(UpdateEngineService* self,
- bool get_current_channel,
+ gboolean get_current_channel,
gchar** channel,
GError **error);
@@ -110,7 +110,7 @@
// error since this setting is overridden by the applied policy.
gboolean update_engine_service_set_update_over_cellular_permission(
UpdateEngineService* self,
- bool allowed,
+ gboolean allowed,
GError **error);
// Returns the current value of the update over cellular network setting, either
@@ -118,7 +118,7 @@
// preference otherwise.
gboolean update_engine_service_get_update_over_cellular_permission(
UpdateEngineService* self,
- bool* allowed,
+ gboolean* allowed,
GError **error);
gboolean update_engine_service_emit_status_update(