Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix removing of dbus handlers while iterating over handler list
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