diff options
author | Adrian Szyndela <adrian.s@samsung.com> | 2020-09-07 13:10:11 +0200 |
---|---|---|
committer | Adrian Szyndela <adrian.s@samsung.com> | 2020-09-15 08:05:09 +0200 |
commit | 818cae4f6ec7825ed7f4c49ed0d04a08e552b1ec (patch) | |
tree | 7f6f72e6575103097a0f0f265256a71d8f8a248f | |
parent | a9ebf27841be1223bb35abfd9d72ff0ee16fae87 (diff) | |
download | dbus-818cae4f6ec7825ed7f4c49ed0d04a08e552b1ec.tar.gz dbus-818cae4f6ec7825ed7f4c49ed0d04a08e552b1ec.tar.bz2 dbus-818cae4f6ec7825ed7f4c49ed0d04a08e552b1ec.zip |
cynara integration: initialize deferred_messages
Initialize deferred messages in order to be able to alter them
on concurrent Cynara calls. This way we'll be able to run
both asynchronous requests for SEND and RECEIVE, if needed.
Change-Id: I060969ad5645c6a1d72f1c91edb46ecc3217ef79
-rw-r--r-- | bus/check.c | 4 | ||||
-rw-r--r-- | bus/connection.c | 2 | ||||
-rw-r--r-- | bus/dispatch.c | 8 | ||||
-rw-r--r-- | bus/policy.c | 2 |
4 files changed, 8 insertions, 8 deletions
diff --git a/bus/check.c b/bus/check.c index 3cc01f81..0f3c8ed8 100644 --- a/bus/check.c +++ b/bus/check.c @@ -164,7 +164,7 @@ bus_check_queued_message_reply_callback (BusDeferredMessage *deferred_message, BusContext *context; BusRegistry *registry; BusClientPolicy *recipient_policy; - BusDeferredMessage *deferred_message_receive; + BusDeferredMessage *deferred_message_receive = NULL; context = bus_connection_get_context(deferred_message->proposed_recipient); registry = bus_context_get_registry(context); @@ -465,7 +465,7 @@ bus_deferred_message_dispatch (BusDeferredMessage *deferred_message) break; case BUS_RESULT_LATER: { - BusDeferredMessage *deferred_message2; + BusDeferredMessage *deferred_message2 = NULL; result = bus_context_check_security_policy (context, transaction, deferred_message->sender, deferred_message->addressed_recipient, diff --git a/bus/connection.c b/bus/connection.c index ad31d0b6..dcb47bac 100644 --- a/bus/connection.c +++ b/bus/connection.c @@ -2422,7 +2422,7 @@ bus_transaction_send_from_driver (BusTransaction *transaction, DBusMessage *message) { DBusError error = DBUS_ERROR_INIT; - BusDeferredMessage *deferred_message; + BusDeferredMessage *deferred_message = NULL; /* We have to set the sender to the driver, and have * to check security policy since it was not done in diff --git a/bus/dispatch.c b/bus/dispatch.c index 3cdae9f9..9d2e893d 100644 --- a/bus/dispatch.c +++ b/bus/dispatch.c @@ -67,7 +67,7 @@ send_one_message (DBusConnection *connection, DBusError *error) { DBusError stack_error = DBUS_ERROR_INIT; - BusDeferredMessage *deferred_message; + BusDeferredMessage *deferred_message = NULL; BusResult result; result = bus_context_check_security_policy (context, transaction, sender, addressed_recipient, @@ -143,7 +143,7 @@ bus_dispatch_matches (BusTransaction *transaction, BusMatchmaker *matchmaker; DBusList *link; BusContext *context; - BusDeferredMessage *deferred_message; + BusDeferredMessage *deferred_message = NULL; _DBUS_ASSERT_ERROR_IS_CLEAR (error); @@ -486,7 +486,7 @@ bus_dispatch (DBusConnection *connection, if (service_name && strcmp (service_name, DBUS_SERVICE_DBUS) == 0) /* to bus driver */ { - BusDeferredMessage *deferred_message; + BusDeferredMessage *deferred_message = NULL; if (!bus_transaction_capture (transaction, connection, NULL, message)) { @@ -556,7 +556,7 @@ bus_dispatch (DBusConnection *connection, if (service == NULL && dbus_message_get_auto_start (message)) { BusActivation *activation; - BusDeferredMessage *deferred_message; + BusDeferredMessage *deferred_message = NULL; if (!bus_transaction_capture (transaction, connection, NULL, message)) diff --git a/bus/policy.c b/bus/policy.c index cbb66b9e..7f4a040a 100644 --- a/bus/policy.c +++ b/bus/policy.c @@ -1810,7 +1810,7 @@ bus_client_policy_check_can_own (BusClientPolicy *policy, { BusContext *context = bus_connection_get_context(connection); BusCheck *check = bus_context_get_check(context); - BusDeferredMessage *deferred_message; + BusDeferredMessage *deferred_message = NULL; result = bus_check_privilege(check, message, connection, NULL, NULL, privilege, BUS_DEFERRED_MESSAGE_CHECK_OWN, &deferred_message); |