Free up the handle memory for a closed notification.

This commit is contained in:
Christian Hammond 2004-06-30 09:53:58 +00:00
parent 5e153367b3
commit 896a99db9d
2 changed files with 15 additions and 1 deletions

View File

@ -1,3 +1,8 @@
Wed Jun 30 02:53:36 PDT 2004 Christian Hammond <chipx86@gnupdate.org>
* libnotify/notify.c:
- Free up the handle memory for a closed notification.
Tue Jun 29 19:33:43 PDT 2004 Christian Hammond <chipx86@gnupdate.org> Tue Jun 29 19:33:43 PDT 2004 Christian Hammond <chipx86@gnupdate.org>
* libnotify/notify.c: * libnotify/notify.c:

View File

@ -202,7 +202,16 @@ _filter_func(DBusConnection *dbus_conn, DBusMessage *message, void *user_data)
if (dbus_message_is_signal(message, NOTIFY_DBUS_CORE_INTERFACE, if (dbus_message_is_signal(message, NOTIFY_DBUS_CORE_INTERFACE,
"NotificationClosed")) "NotificationClosed"))
{ {
/* We can ignore this, pretty much. */ guint32 id;
NotifyHandle *handle;
dbus_message_iter_init(message, &iter);
id = dbus_message_iter_get_uint32(&iter);
handle = g_hash_table_lookup(_handles, GINT_TO_POINTER(id));
if (handle != NULL && handle->type == NOTIFY_TYPE_NOTIFICATION)
g_hash_table_remove(_handles, GINT_TO_POINTER(id));
} }
else if (dbus_message_is_signal(message, NOTIFY_DBUS_CORE_INTERFACE, else if (dbus_message_is_signal(message, NOTIFY_DBUS_CORE_INTERFACE,
"RequestClosed")) "RequestClosed"))