[vlc-devel] commit: logger: disable thread cancellation in callback ( Rafaël Carré )
git version control
git at videolan.org
Wed Sep 30 18:22:06 CEST 2009
vlc | branch: master | Rafaël Carré <rafael.carre at gmail.com> | Wed Sep 30 18:21:02 2009 +0200| [6787c516bdc72795ba6e83871d71cd041a6bb152] | committer: Rafaël Carré
logger: disable thread cancellation in callback
fix a deadlock where the thread would be cancelled while still holding
message bank lock
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=6787c516bdc72795ba6e83871d71cd041a6bb152
---
modules/misc/logger.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/modules/misc/logger.c b/modules/misc/logger.c
index 30b69ef..9a7e1bc 100644
--- a/modules/misc/logger.c
+++ b/modules/misc/logger.c
@@ -374,6 +374,8 @@ static void Overflow (msg_cb_data_t *p_sys, msg_item_t *p_item, unsigned overrun
if (verbosity < priority)
return;
+ int canc = vlc_savecancel();
+
switch( p_sys->i_mode )
{
case MODE_HTML:
@@ -389,6 +391,8 @@ static void Overflow (msg_cb_data_t *p_sys, msg_item_t *p_item, unsigned overrun
TextPrint( p_item, p_sys->p_file );
break;
}
+
+ vlc_restorecancel( canc );
}
static const char ppsz_type[4][11] = {
More information about the vlc-devel
mailing list