summaryrefslogtreecommitdiffstats
path: root/dbus/dbus-hash.c
diff options
context:
space:
mode:
authorSjoerd Simons <sjoerd@luon.net>2006-03-06 19:06:45 +0000
committerSjoerd Simons <sjoerd@luon.net>2006-03-06 19:06:45 +0000
commitcaf220015ba1afd9dfca2a93cfa5208058041610 (patch)
tree41b9d74aa70559e2c77a1b11e65f1cd8db7319f2 /dbus/dbus-hash.c
parent074b0b86747198ee1862ca0450d5192137cccdee (diff)
* bus/bus.c: (bus_context_reload_config): Flush the user database cache on
config reload. * bus/dbus-daemon.1.in: Also note that SIGHUP flushes the user/group information caches * dbus/dbus-hash.c: (_dbus_hash_table_remove_all): * dbus/dbus-hash.h: Add function to remove all entries from a hash table * dbus/dbus-userdb.c: (_dbus_user_database_flush): * dbus/dbus-userdb.h: Add function to flush all user/group information caches.
Diffstat (limited to 'dbus/dbus-hash.c')
-rw-r--r--dbus/dbus-hash.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/dbus/dbus-hash.c b/dbus/dbus-hash.c
index fa2104b3..8eca2bd8 100644
--- a/dbus/dbus-hash.c
+++ b/dbus/dbus-hash.c
@@ -422,6 +422,22 @@ _dbus_hash_table_unref (DBusHashTable *table)
}
}
+/**
+ * Removed all entries from a hash table.
+ *
+ * @param table the hash table to remove all entries from.
+ */
+void
+_dbus_hash_table_remove_all (DBusHashTable *table)
+{
+ DBusHashIter iter;
+ _dbus_hash_iter_init (table, &iter);
+ while (_dbus_hash_iter_next (&iter))
+ {
+ _dbus_hash_iter_remove_entry(&iter);
+ }
+}
+
static DBusHashEntry*
alloc_entry (DBusHashTable *table)
{