From: Daniel Mack Date: Thu, 14 Aug 2014 20:20:54 +0000 (+0200) Subject: policy, connection: rename policy cache related functions X-Git-Tag: upstream/0.20140911.160207utc~50 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=726bc181b5210cb578b219fb668a8ec989ad5efd;p=platform%2Fcore%2Fsystem%2Fkdbus-bus.git policy, connection: rename policy cache related functions Just so they reflect a little better what they're doing. --- diff --git a/connection.c b/connection.c index 47e526c..324498f 100644 --- a/connection.c +++ b/connection.c @@ -1550,13 +1550,13 @@ bool kdbus_conn_active(const struct kdbus_conn *conn) * refer to a connecion * @conn: Connection to check */ -void kdbus_conn_flush_policy(struct kdbus_conn *conn) +void kdbus_conn_purge_policy_cache(struct kdbus_conn *conn) { if (conn->ep->policy_db) - kdbus_policy_remove_conn(conn->ep->policy_db, conn); + kdbus_policy_purge_cache(conn->ep->policy_db, conn); if (conn->bus->policy_db) - kdbus_policy_remove_conn(conn->bus->policy_db, conn); + kdbus_policy_purge_cache(conn->bus->policy_db, conn); } static void __kdbus_conn_free(struct kref *kref) @@ -1573,7 +1573,7 @@ static void __kdbus_conn_free(struct kref *kref) atomic_dec(&conn->user->connections); kdbus_domain_user_unref(conn->user); - kdbus_conn_flush_policy(conn); + kdbus_conn_purge_policy_cache(conn); if (conn->bus->policy_db) kdbus_policy_remove_owner(conn->bus->policy_db, conn); diff --git a/connection.h b/connection.h index 12f1df6..41e0fae 100644 --- a/connection.h +++ b/connection.h @@ -122,7 +122,7 @@ struct kdbus_conn *kdbus_conn_ref(struct kdbus_conn *conn); struct kdbus_conn *kdbus_conn_unref(struct kdbus_conn *conn); int kdbus_conn_disconnect(struct kdbus_conn *conn, bool ensure_queue_empty); bool kdbus_conn_active(const struct kdbus_conn *conn); -void kdbus_conn_flush_policy(struct kdbus_conn *conn); +void kdbus_conn_purge_policy_cache(struct kdbus_conn *conn); int kdbus_cmd_msg_recv(struct kdbus_conn *conn, struct kdbus_cmd_recv *recv); diff --git a/names.c b/names.c index f14e80e..f73946d 100644 --- a/names.c +++ b/names.c @@ -288,7 +288,7 @@ static int kdbus_name_release(struct kdbus_name_registry *reg, * against the names the connection actually owns. */ if (ret == 0) - kdbus_conn_flush_policy(conn); + kdbus_conn_purge_policy_cache(conn); exit_unlock: up_write(®->rwlock); diff --git a/policy.c b/policy.c index da27dc8..6d767c0 100644 --- a/policy.c +++ b/policy.c @@ -403,12 +403,12 @@ void kdbus_policy_remove_owner(struct kdbus_policy_db *db, } /** - * kdbus_policy_remove_conn() - remove all cached entries related to + * kdbus_policy_purge_cache_for_conn() - remove all cached entries related to * a connection * @db: The policy database * @conn: The connection which items to remove */ -void kdbus_policy_remove_conn(struct kdbus_policy_db *db, +void kdbus_policy_purge_cache(struct kdbus_policy_db *db, const struct kdbus_conn *conn) { struct kdbus_policy_db_cache_entry *ce; diff --git a/policy.h b/policy.h index 4c8d48d..9521508 100644 --- a/policy.h +++ b/policy.h @@ -40,7 +40,7 @@ int kdbus_policy_check_talk_access(struct kdbus_policy_db *db, int kdbus_policy_check_own_access(struct kdbus_policy_db *db, const struct kdbus_conn *conn, const char *name); -void kdbus_policy_remove_conn(struct kdbus_policy_db *db, +void kdbus_policy_purge_cache(struct kdbus_policy_db *db, const struct kdbus_conn *conn); void kdbus_policy_remove_owner(struct kdbus_policy_db *db, const void *owner);