[vlc-commits] messages: disable cancellation
Rémi Denis-Courmont
git at videolan.org
Mon Apr 20 17:12:20 CEST 2015
vlc/vlc-2.2 | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Apr 20 18:11:38 2015 +0300| [22eda20b2c18df6df1a5cff8e96df81244f99b7f] | committer: Rémi Denis-Courmont
messages: disable cancellation
vlc_rwlock_rdlock() may be a cancellation point.
See also 446703fadbff12ad8bd70255e56c978446a564e6.
> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=22eda20b2c18df6df1a5cff8e96df81244f99b7f
---
src/misc/messages.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/misc/messages.c b/src/misc/messages.c
index f75fd67..3f4122c 100644
--- a/src/misc/messages.c
+++ b/src/misc/messages.c
@@ -120,9 +120,11 @@ void vlc_vaLog (vlc_object_t *obj, int type, const char *module,
#endif
if (priv) {
+ int canc = vlc_savecancel ();
vlc_rwlock_rdlock (&priv->log.lock);
priv->log.cb (priv->log.opaque, type, &msg, format, args);
vlc_rwlock_unlock (&priv->log.lock);
+ vlc_restorecancel (canc);
}
}
More information about the vlc-commits
mailing list