GNOME Bugzilla – Bug 630452
rtpbin: Make cleaning up sources in rtp_session_on_timeout MT safe
Last modified: 2010-09-24 13:39:29 UTC
Created attachment 170948 [details] [review] patch Using _foreach_remove on the hashtable, while releasing the lock protecting that table inside the callback is not a good idea. The hashtable might then change (a source removed or added) while signals like on_timeout are being sent.
commit ca6a512b5eef7434a2a09310317944b08323578b Author: Pascal Buhler <pascal.buhler@tandberg.com> Date: Fri Sep 24 15:33:40 2010 +0200 rtpbin: Make cleaning up sources in rtp_session_on_timeout MT safe Using _foreach_remove on the hashtable, while releasing the lock protecting that table inside the callback is not a good idea. The hashtable might then change (a source removed or added) while signals like on_timeout are being sent. This solution makes a copy of the table, performs the _foreach without actually removing any sources, but marks them for removal on a second iteration with the real list, but this time not letting go of the lock. Fixes #630452