Call the close_handle notification for all objects when releasing a
handle table.
diff --git a/server/handle.c b/server/handle.c
index 4a70843..802e07d 100644
--- a/server/handle.c
+++ b/server/handle.c
@@ -139,11 +139,21 @@
{
int i;
struct handle_table *table = (struct handle_table *)obj;
- struct handle_entry *entry = table->entries;
+ struct handle_entry *entry;
assert( obj->ops == &handle_table_ops );
- for (i = 0; i <= table->last; i++, entry++)
+ /* first notify all objects that handles are being closed */
+ if (table->process)
+ {
+ for (i = 0, entry = table->entries; i <= table->last; i++, entry++)
+ {
+ struct object *obj = entry->ptr;
+ if (obj) obj->ops->close_handle( obj, table->process, index_to_handle(i) );
+ }
+ }
+
+ for (i = 0, entry = table->entries; i <= table->last; i++, entry++)
{
struct object *obj = entry->ptr;
entry->ptr = NULL;