Commit fc28ea99 authored by Simon McVittie's avatar Simon McVittie

Merge branch 'issue270' into 'master'

bus: Clarify names of methods that query owned names

Closes #270

See merge request !114

Reviewed-by: @pwithnall
parents 463ecfb4 3b221782
Pipeline #39691 passed with stage
in 9 minutes and 11 seconds
......@@ -1460,8 +1460,8 @@ bus_connection_get_n_match_rules (DBusConnection *connection)
* regardless of the type of ownership
*/
dbus_bool_t
bus_connection_is_name_owner_by_prefix (DBusConnection *connection,
const char *name_prefix)
bus_connection_is_queued_owner_by_prefix (DBusConnection *connection,
const char *name_prefix)
{
BusConnectionData *d;
DBusList *link;
......
......@@ -83,8 +83,8 @@ void bus_connection_request_headers (DBusConnection *connection,
BusExtraHeaders headers);
/* called by policy.c */
dbus_bool_t bus_connection_is_name_owner_by_prefix (DBusConnection *connection,
const char *name_prefix);
dbus_bool_t bus_connection_is_queued_owner_by_prefix (DBusConnection *connection,
const char *name_prefix);
/* called by signals.c */
dbus_bool_t bus_connection_add_match_rule (DBusConnection *connection,
......
......@@ -1055,9 +1055,9 @@ bus_client_policy_check_can_send (BusClientPolicy *policy,
continue;
}
if (!bus_service_has_owner (service, receiver))
if (!bus_service_owner_in_queue (service, receiver))
{
_dbus_verbose (" (policy) skipping rule because dest %s isn't owned by receiver\n",
_dbus_verbose (" (policy) skipping rule because receiver isn't primary or queued owner of name %s\n",
rule->d.send.destination);
continue;
}
......@@ -1084,17 +1084,17 @@ bus_client_policy_check_can_send (BusClientPolicy *policy,
rule->d.send.destination,
'.'))
{
_dbus_verbose (" (policy) skipping rule because message dest doesn't start with %s\n",
_dbus_verbose (" (policy) skipping rule because message dest doesn't have prefix %s\n",
rule->d.send.destination);
continue;
}
}
else
{
if (!bus_connection_is_name_owner_by_prefix (receiver,
rule->d.send.destination))
if (!bus_connection_is_queued_owner_by_prefix (receiver,
rule->d.send.destination))
{
_dbus_verbose (" (policy) skipping rule because no dest with prefix %s is owned by receiver\n",
_dbus_verbose (" (policy) skipping rule because recipient isn't primary or queued owner of any name below %s\n",
rule->d.send.destination);
continue;
}
......@@ -1307,9 +1307,9 @@ bus_client_policy_check_can_receive (BusClientPolicy *policy,
continue;
}
if (!bus_service_has_owner (service, sender))
if (!bus_service_owner_in_queue (service, sender))
{
_dbus_verbose (" (policy) skipping rule because origin %s isn't owned by sender\n",
_dbus_verbose (" (policy) skipping rule because sender isn't primary or queued owner of %s\n",
rule->d.receive.origin);
continue;
}
......
......@@ -670,7 +670,7 @@ bus_registry_release_service (BusRegistry *registry,
{
*result = DBUS_RELEASE_NAME_REPLY_NON_EXISTENT;
}
else if (!bus_service_has_owner (service, connection))
else if (!bus_service_owner_in_queue (service, connection))
{
*result = DBUS_RELEASE_NAME_REPLY_NOT_OWNER;
}
......@@ -680,7 +680,7 @@ bus_registry_release_service (BusRegistry *registry,
transaction, error))
goto out;
_dbus_assert (!bus_service_has_owner (service, connection));
_dbus_assert (!bus_service_owner_in_queue (service, connection));
*result = DBUS_RELEASE_NAME_REPLY_RELEASED;
}
......@@ -1274,8 +1274,8 @@ bus_service_get_allow_replacement (BusService *service)
}
dbus_bool_t
bus_service_has_owner (BusService *service,
DBusConnection *connection)
bus_service_owner_in_queue (BusService *service,
DBusConnection *connection)
{
DBusList *link;
......
......@@ -81,7 +81,7 @@ dbus_bool_t bus_service_remove_owner (BusService *service,
DBusConnection *connection,
BusTransaction *transaction,
DBusError *error);
dbus_bool_t bus_service_has_owner (BusService *service,
dbus_bool_t bus_service_owner_in_queue (BusService *service,
DBusConnection *connection);
BusOwner* bus_service_get_primary_owner (BusService *service);
dbus_bool_t bus_service_get_allow_replacement (BusService *service);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment