diff options
author | Adrian Szyndela <adrian.s@samsung.com> | 2020-09-25 11:27:12 +0200 |
---|---|---|
committer | Adrian Szyndela <adrian.s@samsung.com> | 2020-09-25 11:47:48 +0200 |
commit | 6a5aacd05f021ecd27fed8a9b2432d7f031ad3c2 (patch) | |
tree | 3cc484fb059c9488fc83565d86f5a07f5343d878 | |
parent | da9462096c11dd2baf4d5b2556f9f59eb78bdaa7 (diff) | |
download | dbus-6a5aacd05f021ecd27fed8a9b2432d7f031ad3c2.tar.gz dbus-6a5aacd05f021ecd27fed8a9b2432d7f031ad3c2.tar.bz2 dbus-6a5aacd05f021ecd27fed8a9b2432d7f031ad3c2.zip |
BUS_RESULT: fix missed changes of TRUE/FALSE to BUS_RESULTtizen_6.0.m2_releasesubmit/tizen_6.0_hotfix/20201103.115101submit/tizen_6.0_hotfix/20201102.192901submit/tizen_6.0/20201029.205501submit/tizen/20200925.142828accepted/tizen/unified/20200928.072833accepted/tizen/6.0/unified/hotfix/20201103.000322tizen_6.0_hotfixaccepted/tizen_6.0_unified_hotfix
The Tizen's branch code that added Cynara integration had changed
return types in some functions from dbus_bool_t to BusResult. The code
from upstream master branch uses dbus_bool_t. While merging recent
changes from the upstream, there were some parts that were merged
without changing TRUE/FALSE to BUS_RESULT_* or with checking conditions
as bool values instead of checking the enum.
The above, and the fact that TRUE==1, FALSE==0, BUS_RESULT_TRUE==0,
BUS_RESULT_FALSE==1 has led to aborting on asserts, when enabled.
This could also lead to issues with activation.
This commit fixes the TRUE/FALSE handling where needed.
Change-Id: I6cbf1aa0b43699464c9214b50fd8bb23a84709e8
-rw-r--r-- | bus/activation.c | 2 | ||||
-rw-r--r-- | bus/bus.c | 4 | ||||
-rw-r--r-- | bus/driver.c | 10 |
3 files changed, 8 insertions, 8 deletions
diff --git a/bus/activation.c b/bus/activation.c index ef1aa18c..ba4dee88 100644 --- a/bus/activation.c +++ b/bus/activation.c @@ -1984,7 +1984,7 @@ bus_activation_activate_service (BusActivation *activation, BUS_SET_OOM (error); bus_pending_activation_unref (pending_activation); bus_pending_activation_entry_free (pending_activation_entry); - return FALSE; + return BUS_RESULT_FALSE; } } @@ -1656,7 +1656,7 @@ bus_context_check_security_policy (BusContext *context, _dbus_verbose ("SELinux security check denying send to service\n"); } - return FALSE; + return BUS_RESULT_FALSE; } /* next verify AppArmor access controls. If allowed then @@ -1674,7 +1674,7 @@ bus_context_check_security_policy (BusContext *context, src ? src : DBUS_SERVICE_DBUS, activation_entry, error)) - return FALSE; + return BUS_RESULT_FALSE; if (!bus_connection_is_active (sender)) { diff --git a/bus/driver.c b/bus/driver.c index c468fe58..ba227a4b 100644 --- a/bus/driver.c +++ b/bus/driver.c @@ -973,8 +973,8 @@ bus_driver_handle_activate_service (DBusConnection *connection, retval = BUS_RESULT_FALSE; - if (!bus_activation_activate_service (activation, connection, transaction, FALSE, - message, name, error, NULL)) + if (bus_activation_activate_service (activation, connection, transaction, FALSE, + message, name, error, NULL) == BUS_RESULT_FALSE) { _DBUS_ASSERT_ERROR_IS_SET (error); _dbus_verbose ("bus_activation_activate_service() failed\n"); @@ -1058,8 +1058,8 @@ bus_driver_send_or_activate (BusTransaction *transaction, return FALSE; } - if (!bus_activation_activate_service (activation, NULL, transaction, TRUE, - message, service_name, error, NULL)) + if (bus_activation_activate_service (activation, NULL, transaction, TRUE, + message, service_name, error, NULL) == BUS_RESULT_FALSE) { _DBUS_ASSERT_ERROR_IS_SET (error); _dbus_verbose ("bus_activation_activate_service() failed"); @@ -1111,7 +1111,7 @@ bus_driver_handle_update_activation_environment (DBusConnection *connection, dbus_set_error (error, DBUS_ERROR_ACCESS_DENIED, "Cannot change activation environment " "on a system bus."); - return FALSE; + return BUS_RESULT_FALSE; } activation = bus_connection_get_activation (connection); |