Skip to content

Commit

Permalink
Fix removing of dbus handlers while iterating over handler list
Browse files Browse the repository at this point in the history
Upon receiving a dbus message, the list of dbus handlers is iterated
and callback functions of matching handlers get called. If the handler
callback does a self remove, the iterated list is modified at the
iteration point.

There was a workaround for this in place, but it did not work properly
and made the iterator skip the entry after the removed one - which could
cause subtle errors.

To fix this mce_dbus_handler_remove() still removes the handler object,
but leaves the now dataless link object in place. The stale link objects
are then cleaned up after finishing the list iteration.
  • Loading branch information
spiiroin committed Feb 18, 2014
1 parent 626171c commit cff5dad
Showing 1 changed file with 226 additions and 160 deletions.

0 comments on commit cff5dad

Please sign in to comment.