mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-05-05 18:08:01 +02:00
2003-01-26 Richard Hult <rhult@codefactory.se>
* glib/dbus-gmain.c (dbus_connection_dispatch): Traverse a copy of the file descriptor list, since it can change under us.
This commit is contained in:
parent
f7867d886d
commit
5fbace5548
2 changed files with 13 additions and 4 deletions
|
|
@ -1,3 +1,8 @@
|
|||
2003-01-26 Richard Hult <rhult@codefactory.se>
|
||||
|
||||
* glib/dbus-gmain.c (dbus_connection_dispatch): Traverse a copy of
|
||||
the file descriptor list, since it can change under us.
|
||||
|
||||
2003-01-25 Anders Carlsson <andersca@codefactory.se>
|
||||
|
||||
* glib/dbus-gmain.c: (dbus_connection_prepare),
|
||||
|
|
|
|||
|
|
@ -89,11 +89,13 @@ dbus_connection_dispatch (GSource *source,
|
|||
gpointer user_data)
|
||||
{
|
||||
DBusGSource *dbus_source = (DBusGSource *)source;
|
||||
|
||||
GList *list;
|
||||
GList *copy, *list;
|
||||
|
||||
list = dbus_source->poll_fds;
|
||||
/* We need to traverse a copy of the list, since it can change in
|
||||
dbus_connect_handle_watch. */
|
||||
copy = g_list_copy (dbus_source->poll_fds);
|
||||
|
||||
list = copy;
|
||||
while (list)
|
||||
{
|
||||
GPollFD *poll_fd = list->data;
|
||||
|
|
@ -114,10 +116,12 @@ dbus_connection_dispatch (GSource *source,
|
|||
|
||||
dbus_connection_handle_watch (dbus_source->connection, watch, condition);
|
||||
}
|
||||
|
||||
|
||||
list = list->next;
|
||||
}
|
||||
|
||||
g_list_free (copy);
|
||||
|
||||
/* Dispatch messages */
|
||||
while (dbus_connection_dispatch_message (dbus_source->connection));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue