]> git.sesse.net Git - vlc/commitdiff
Remove message unused "queue" parameter
authorRémi Denis-Courmont <rem@videolan.org>
Sat, 10 May 2008 09:57:12 +0000 (12:57 +0300)
committerRémi Denis-Courmont <rem@videolan.org>
Sat, 10 May 2008 09:57:12 +0000 (12:57 +0300)
There is only one queue at the moment, and if someone wants multiple
queues, it's probably not a good idea to hard-code queues as integers.

15 files changed:
include/vlc_messages.h
modules/codec/ffmpeg/ffmpeg.c
modules/demux/mkv.cpp
modules/gui/beos/MessagesWindow.cpp
modules/gui/macosx/intf.m
modules/gui/ncurses.c
modules/gui/qt4/qt4.cpp
modules/gui/skins2/src/skin_main.cpp
modules/gui/wince/wince.cpp
modules/gui/wxwidgets/wxwidgets.cpp
modules/misc/logger.c
modules/misc/lua/vlc.h
src/control/log.c
src/libvlc.h
src/misc/messages.c

index 9d4405e0299f3859d0ce81733fe9aa32fe6eb854..16076925509400be7d1d8f1e60172d090013e634 100644 (file)
@@ -66,9 +66,6 @@ typedef struct
 /** debug messages */
 #define VLC_MSG_DBG   3
 
-#define MSG_QUEUE_NORMAL 0
-#define MSG_QUEUE_HTTPD_ACCESS 1
-
 /**
  * Used by interface plugins which subscribe to the message bank.
  */
@@ -84,30 +81,30 @@ struct msg_subscription_t
 /*****************************************************************************
  * Prototypes
  *****************************************************************************/
-VLC_EXPORT( void, __msg_Generic, ( vlc_object_t *, int, int, const char *, const char *, ... ) ATTRIBUTE_FORMAT( 5, 6 ) );
-VLC_EXPORT( void, __msg_GenericVa, ( vlc_object_t *, int, int, const char *, const char *, va_list args ) );
-#define msg_GenericVa(a, b, c, d, e,f) __msg_GenericVa(VLC_OBJECT(a), b, c, d, e,f)
+VLC_EXPORT( void, __msg_Generic, ( vlc_object_t *, int, const char *, const char *, ... ) ATTRIBUTE_FORMAT( 4, 5 ) );
+VLC_EXPORT( void, __msg_GenericVa, ( vlc_object_t *, int, const char *, const char *, va_list args ) );
+#define msg_GenericVa(a, b, c, d, e) __msg_GenericVa(VLC_OBJECT(a), b, c, d, e)
 VLC_EXPORT( void, __msg_Info,    ( vlc_object_t *, const char *, ... ) ATTRIBUTE_FORMAT( 2, 3 ) );
 VLC_EXPORT( void, __msg_Err,     ( vlc_object_t *, const char *, ... ) ATTRIBUTE_FORMAT( 2, 3 ) );
 VLC_EXPORT( void, __msg_Warn,    ( vlc_object_t *, const char *, ... ) ATTRIBUTE_FORMAT( 2, 3 ) );
 VLC_EXPORT( void, __msg_Dbg,    ( vlc_object_t *, const char *, ... ) ATTRIBUTE_FORMAT( 2, 3 ) );
 
 #define msg_Info( p_this, ... ) \
-      __msg_Generic( VLC_OBJECT(p_this), MSG_QUEUE_NORMAL, VLC_MSG_INFO, \
+      __msg_Generic( VLC_OBJECT(p_this), VLC_MSG_INFO, \
                      MODULE_STRING, __VA_ARGS__ )
 #define msg_Err( p_this, ... ) \
-      __msg_Generic( VLC_OBJECT(p_this), MSG_QUEUE_NORMAL, VLC_MSG_ERR, \
+      __msg_Generic( VLC_OBJECT(p_this), VLC_MSG_ERR, \
                      MODULE_STRING, __VA_ARGS__ )
 #define msg_Warn( p_this, ... ) \
-      __msg_Generic( VLC_OBJECT(p_this), MSG_QUEUE_NORMAL, VLC_MSG_WARN, \
+      __msg_Generic( VLC_OBJECT(p_this), VLC_MSG_WARN, \
                      MODULE_STRING, __VA_ARGS__ )
 #define msg_Dbg( p_this, ... ) \
-      __msg_Generic( VLC_OBJECT(p_this), MSG_QUEUE_NORMAL, VLC_MSG_DBG, \
+      __msg_Generic( VLC_OBJECT(p_this), VLC_MSG_DBG, \
                      MODULE_STRING, __VA_ARGS__ )
 
-#define msg_Subscribe(a,b) __msg_Subscribe(VLC_OBJECT(a),b)
+#define msg_Subscribe(a) __msg_Subscribe(VLC_OBJECT(a))
 #define msg_Unsubscribe(a,b) __msg_Unsubscribe(VLC_OBJECT(a),b)
-VLC_EXPORT( msg_subscription_t*, __msg_Subscribe, ( vlc_object_t *, int ) );
+VLC_EXPORT( msg_subscription_t*, __msg_Subscribe, ( vlc_object_t * ) );
 VLC_EXPORT( void, __msg_Unsubscribe, ( vlc_object_t *, msg_subscription_t * ) );
 
 /**
index 02f91d1a8832780f79edf115449b37b8096a7876..ea005e870609d828195e2785f68d2fb0a640130b 100644 (file)
@@ -447,7 +447,7 @@ void LibavcodecCallback( void *p_opaque, int i_level,
                               + 18 + 5 );
     snprintf( psz_new_format, strlen(psz_format) + strlen(psz_item_name)
               + 18 + 5, "%s (%s@%p)", psz_format, p_avc->item_name(p_opaque), p_opaque );
-    msg_GenericVa( p_this, MSG_QUEUE_NORMAL, i_vlc_level,
+    msg_GenericVa( p_this, i_vlc_level,
                     MODULE_STRING, psz_new_format, va );
     free( psz_new_format );
 }
index 073bb56eb750d84cb7847fb11b4f3fbf019c5662..35702d1726933bec254550f4a8f1da2804a9aca9 100644 (file)
@@ -503,7 +503,7 @@ static void MkvTree( demux_t & demuxer, int i_level, const char *psz_format, ...
     psz_foo2[ 4 * i_level ] = '+';
     psz_foo2[ 4 * i_level + 1 ] = ' ';
     strcpy( &psz_foo2[ 4 * i_level + 2 ], psz_format );
-    __msg_GenericVa( VLC_OBJECT(&demuxer), MSG_QUEUE_NORMAL, VLC_MSG_DBG, "mkv", psz_foo2, args );
+    __msg_GenericVa( VLC_OBJECT(&demuxer),VLC_MSG_DBG, "mkv", psz_foo2, args );
     free( psz_foo2 );
     va_end( args );
 }
index 22ebedb8266bc14bf1b41010c8497b82255b0c7d..32cdd0a43b3d8d9872091c026c1947f677e8011f 100644 (file)
@@ -126,7 +126,7 @@ MessagesWindow::MessagesWindow( intf_thread_t * _p_intf,
 {
     SetSizeLimits( 400, 2000, 200, 2000 );
 
-    p_sub = msg_Subscribe( p_intf, MSG_QUEUE_NORMAL );
+    p_sub = msg_Subscribe( p_intf );
  
     BRect rect, textRect;
 
index cf14c6b7cf1c7274794a0c0a85e13cedf403cda2..f77344b65da796b7f01ad05ff1a79177e796689a 100644 (file)
@@ -107,7 +107,7 @@ int OpenIntf ( vlc_object_t *p_this )
     p_intf->p_sys->o_pool = [[NSAutoreleasePool alloc] init];
 
     p_intf->p_sys->o_sendport = [[NSPort port] retain];
-    p_intf->p_sys->p_sub = msg_Subscribe( p_intf, MSG_QUEUE_NORMAL );
+    p_intf->p_sys->p_sub = msg_Subscribe( p_intf );
     p_intf->b_play = true;
     p_intf->pf_run = Run;
     p_intf->b_should_run_on_first_thread = true;
index a0f01d98f48654981d9479df7eb0f418ac4998bd..20049e78d62089ab5f2a961b0384cde594635fed 100644 (file)
@@ -256,7 +256,7 @@ static int Open( vlc_object_t *p_this )
     p_sys->b_box_cleared = false;
     p_sys->i_box_plidx = 0;
     p_sys->i_box_bidx = 0;
-    p_sys->p_sub = msg_Subscribe( p_intf, MSG_QUEUE_NORMAL );
+    p_sys->p_sub = msg_Subscribe( p_intf );
     p_sys->b_color = var_CreateGetBool( p_intf, "color" );
     p_sys->b_color_started = false;
 
index 2c6afd190e19c6c912b2515b26c9b7d2db62b515..45b4c562e5a34c745cd95e3e47c918338f9088a8 100644 (file)
@@ -233,7 +233,7 @@ static int Open( vlc_object_t *p_this )
     p_intf->pf_run = Run;
 
     p_intf->p_sys->p_playlist = pl_Yield( p_intf );
-    p_intf->p_sys->p_sub = msg_Subscribe( p_intf, MSG_QUEUE_NORMAL );
+    p_intf->p_sys->p_sub = msg_Subscribe( p_intf );
 
     /* We support play on start */
     p_intf->b_play = true;
index 3c40acfb419f6d11dd0ab64bfe83621d8c3a3ce4..c4c503da0061dc72a472bf9afed30ae0a4939263 100644 (file)
@@ -95,7 +95,7 @@ static int Open( vlc_object_t *p_this )
     p_intf->pf_run = Run;
 
     // Suscribe to messages bank
-    p_intf->p_sys->p_sub = msg_Subscribe( p_intf, MSG_QUEUE_NORMAL );
+    p_intf->p_sys->p_sub = msg_Subscribe( p_intf );
 
     p_intf->p_sys->p_input = NULL;
     p_intf->p_sys->p_playlist = (playlist_t *)vlc_object_find( p_intf,
index 7548a9143b785534df58227fb05f81edd22ab1e1..873815996205a43b99c02967ba89c089c45e06d7 100644 (file)
@@ -116,7 +116,7 @@ static int Open( vlc_object_t *p_this )
     }
 
     // Suscribe to messages bank
-    p_intf->p_sys->p_sub = msg_Subscribe( p_intf, MSG_QUEUE_NORMAL );
+    p_intf->p_sys->p_sub = msg_Subscribe( p_intf );
 
     // Misc init
     p_intf->p_sys->p_audio_menu = NULL;
index 11605966cd691fe373ad0cd80bbd90766b486af6..820aa53e877ae2b8f60ffe8d9c2843663417dd6e 100644 (file)
@@ -199,7 +199,7 @@ static int Open( vlc_object_t *p_this )
 
     p_intf->pf_run = Run;
 
-    p_intf->p_sys->p_sub = msg_Subscribe( p_intf, MSG_QUEUE_NORMAL );
+    p_intf->p_sys->p_sub = msg_Subscribe( p_intf );
 
     /* Initialize wxWidgets thread */
     p_intf->p_sys->b_playing = 0;
index 21b29e62a80f0d63fd6ae9f6acf764d48a732646..6f57c551700b59602d3ae5c77a59145d57ad6d2a 100644 (file)
@@ -291,7 +291,7 @@ static int Open( vlc_object_t *p_this )
         p_intf->p_sys->p_rrd = utf8_fopen( psz_rrd_file, "w" );
     }
 
-    p_intf->p_sys->p_sub = msg_Subscribe( p_intf , MSG_QUEUE_NORMAL );
+    p_intf->p_sys->p_sub = msg_Subscribe( p_intf );
     p_intf->pf_run = Run;
 
     return 0;
index 4cd319baccaa3635b997c2749e32af8d40f30385..50891e799ef20f0bfc31689dc465782b9cc610e4 100644 (file)
@@ -64,8 +64,7 @@ static inline void lua_Dbg( vlc_object_t * p_this, const char * ppz_fmt, ... )
 {
     va_list ap;
     va_start( ap, ppz_fmt );
-    __msg_GenericVa( ( vlc_object_t *)p_this, MSG_QUEUE_NORMAL,
-                      VLC_MSG_DBG, MODULE_STRING,
+    __msg_GenericVa( ( vlc_object_t *)p_this, VLC_MSG_DBG, MODULE_STRING,
                       ppz_fmt, ap );
     va_end( ap );
 }
index 61a74653a952c62e1152e68ff8085bf421b9657f..b8fb181136fde997648903720c1d12e545812b79 100644 (file)
@@ -69,7 +69,7 @@ libvlc_log_t *libvlc_log_open( libvlc_instance_t *p_instance, libvlc_exception_t
     if( !p_log ) RAISENULL( "Out of memory" );
 
     p_log->p_instance = p_instance;
-    p_log->p_messages = msg_Subscribe(p_instance->p_libvlc_int, MSG_QUEUE_NORMAL);
+    p_log->p_messages = msg_Subscribe(p_instance->p_libvlc_int);
 
     if( !p_log->p_messages )
     {
index 6c0b92fc1dbf3b9d86978df86a803d3b5939df9b..c6ee5b35ece13a316ae2f239e20204728885e125 100644 (file)
@@ -63,12 +63,8 @@ uint32_t CPUCapabilities( void );
  * Message/logging stuff
  */
 
-#define NB_QUEUES 2
-
 typedef struct msg_queue_t
 {
-    int                     i_id;
-
     /** Message queue lock */
     vlc_mutex_t             lock;
     bool              b_overflow;
@@ -94,7 +90,7 @@ typedef struct msg_queue_t
 typedef struct msg_bank_t
 {
     vlc_mutex_t             lock;
-    msg_queue_t             queues[NB_QUEUES];
+    msg_queue_t             queue;
 } msg_bank_t;
 
 void msg_Create  (libvlc_int_t *);
index b55a3e6d90e9bf0c5c794406bca774adbb5c623a..a5a5be9eb5fb86b28439ebbf30865a85f553e1ab 100644 (file)
 #   define vlc_va_copy(dest,src) (dest)=(src)
 #endif
 
-#define QUEUE(i) priv->msg_bank.queues[i]
+#define QUEUE priv->msg_bank.queue
 #define LOCK_BANK vlc_mutex_lock( &priv->msg_bank.lock );
 #define UNLOCK_BANK vlc_mutex_unlock( &priv->msg_bank.lock );
 
 /*****************************************************************************
  * Local prototypes
  *****************************************************************************/
-static void QueueMsg ( vlc_object_t *, int, int , const char *,
+static void QueueMsg ( vlc_object_t *, int, const char *,
                        const char *, va_list );
 static void FlushMsg ( msg_queue_t * );
 static void PrintMsg ( vlc_object_t *, msg_item_t * );
@@ -86,24 +86,19 @@ void msg_Create (libvlc_int_t *p_libvlc)
 {
     libvlc_priv_t *priv = libvlc_priv (p_libvlc);
     vlc_mutex_init( &priv->msg_bank.lock );
-
-    for( int i = 0; i < 2; i++ )
-    {
-         vlc_mutex_init( &QUEUE(i).lock );
-         QUEUE(i).b_overflow = false;
-         QUEUE(i).i_id = i;
-         QUEUE(i).i_start = 0;
-         QUEUE(i).i_stop = 0;
-         QUEUE(i).i_sub = 0;
-         QUEUE(i).pp_sub = 0;
-    }
+    vlc_mutex_init( &QUEUE.lock );
+    QUEUE.b_overflow = false;
+    QUEUE.i_start = 0;
+    QUEUE.i_stop = 0;
+    QUEUE.i_sub = 0;
+    QUEUE.pp_sub = 0;
 
 #ifdef UNDER_CE
-    QUEUE(MSG_QUEUE_NORMAL).logfile =
+    QUEUE.logfile =
         CreateFile( L"vlc-log.txt", GENERIC_WRITE,
                     FILE_SHARE_READ|FILE_SHARE_WRITE, NULL,
                     CREATE_ALWAYS, 0, NULL );
-    SetFilePointer( QUEUE(MSG_QUEUE_NORMAL).logfile, 0, NULL, FILE_END );
+    SetFilePointer( QUEUE.logfile, 0, NULL, FILE_END );
 #endif
 }
 
@@ -113,13 +108,9 @@ void msg_Create (libvlc_int_t *p_libvlc)
 void msg_Flush (libvlc_int_t *p_libvlc)
 {
     libvlc_priv_t *priv = libvlc_priv (p_libvlc);
-
-    for( int i = 0 ; i < NB_QUEUES ; i++ )
-    {
-        vlc_mutex_lock( &QUEUE(i).lock );
-        FlushMsg( &QUEUE(i) );
-        vlc_mutex_unlock( &QUEUE(i).lock );
-    }
+    vlc_mutex_lock( &QUEUE.lock );
+    FlushMsg( &QUEUE );
+    vlc_mutex_unlock( &QUEUE.lock );
 }
 
 /**
@@ -133,27 +124,23 @@ void msg_Destroy (libvlc_int_t *p_libvlc)
 {
     libvlc_priv_t *priv = libvlc_priv (p_libvlc);
 
-    for( int i = NB_QUEUES -1 ; i >= 0;  i-- )
-    {
-        if( QUEUE(i).i_sub )
-            msg_Err( p_libvlc, "stale interface subscribers" );
+    if( QUEUE.i_sub )
+        msg_Err( p_libvlc, "stale interface subscribers" );
 
-        FlushMsg( &QUEUE(i) );
+    FlushMsg( &QUEUE );
 
 #ifdef UNDER_CE
-        if( i == MSG_QUEUE_NORMAL )
-            CloseHandle( QUEUE(MSG_QUEUE_NORMAL).logfile );
+    CloseHandle( QUEUE.logfile );
 #endif
-        /* Destroy lock */
-        vlc_mutex_destroy( &QUEUE(i).lock );
-    }
+    /* Destroy lock */
+    vlc_mutex_destroy( &QUEUE.lock );
     vlc_mutex_destroy( &priv->msg_bank.lock);
 }
 
 /**
  * Subscribe to a message queue.
  */
-msg_subscription_t *__msg_Subscribe( vlc_object_t *p_this, int i )
+msg_subscription_t *__msg_Subscribe( vlc_object_t *p_this )
 {
     libvlc_priv_t *priv = libvlc_priv (p_this->p_libvlc);
     msg_subscription_t *p_sub = malloc( sizeof( msg_subscription_t ) );
@@ -161,19 +148,17 @@ msg_subscription_t *__msg_Subscribe( vlc_object_t *p_this, int i )
     if (p_sub == NULL)
         return NULL;
 
-    assert( i < NB_QUEUES );
-
     LOCK_BANK;
-    vlc_mutex_lock( &QUEUE(i).lock );
+    vlc_mutex_lock( &QUEUE.lock );
 
-    TAB_APPEND( QUEUE(i).i_sub, QUEUE(i).pp_sub, p_sub );
+    TAB_APPEND( QUEUE.i_sub, QUEUE.pp_sub, p_sub );
 
-    p_sub->i_start = QUEUE(i).i_start;
-    p_sub->pi_stop = &QUEUE(i).i_stop;
-    p_sub->p_msg   = QUEUE(i).msg;
-    p_sub->p_lock  = &QUEUE(i).lock;
+    p_sub->i_start = QUEUE.i_start;
+    p_sub->pi_stop = &QUEUE.i_stop;
+    p_sub->p_msg   = QUEUE.msg;
+    p_sub->p_lock  = &QUEUE.lock;
 
-    vlc_mutex_unlock( &QUEUE(i).lock );
+    vlc_mutex_unlock( &QUEUE.lock );
     UNLOCK_BANK;
 
     return p_sub;
@@ -187,19 +172,16 @@ void __msg_Unsubscribe( vlc_object_t *p_this, msg_subscription_t *p_sub )
     libvlc_priv_t *priv = libvlc_priv (p_this->p_libvlc);
 
     LOCK_BANK;
-    for( int i = 0 ; i< NB_QUEUES ; i++ )
+    vlc_mutex_lock( &QUEUE.lock );
+    for( int j = 0 ; j< QUEUE.i_sub ; j++ )
     {
-        vlc_mutex_lock( &QUEUE(i).lock );
-        for( int j = 0 ; j< QUEUE(i).i_sub ; j++ )
+        if( QUEUE.pp_sub[j] == p_sub )
         {
-            if( QUEUE(i).pp_sub[j] == p_sub )
-            {
-                REMOVE_ELEM( QUEUE(i).pp_sub, QUEUE(i).i_sub, j );
-                free( p_sub );
-            }
+            REMOVE_ELEM( QUEUE.pp_sub, QUEUE.i_sub, j );
+            free( p_sub );
         }
-        vlc_mutex_unlock( & QUEUE(i).lock );
     }
+    vlc_mutex_unlock( &QUEUE.lock );
     UNLOCK_BANK;
 }
 
@@ -208,22 +190,20 @@ void __msg_Unsubscribe( vlc_object_t *p_this, msg_subscription_t *p_sub )
  *****************************************************************************
  * These functions queue a message for later printing.
  *****************************************************************************/
-void __msg_Generic( vlc_object_t *p_this, int i_queue, int i_type,
-                    const char *psz_module,
+void __msg_Generic( vlc_object_t *p_this, int i_type, const char *psz_module,
                     const char *psz_format, ... )
 {
     va_list args;
 
     va_start( args, psz_format );
-    QueueMsg( p_this, i_queue, i_type, psz_module, psz_format, args );
+    QueueMsg( p_this, i_type, psz_module, psz_format, args );
     va_end( args );
 }
 
-void __msg_GenericVa( vlc_object_t *p_this, int i_queue,
-                      int i_type, const char *psz_module,
+void __msg_GenericVa( vlc_object_t *p_this, int i_type, const char *psz_module,
                       const char *psz_format, va_list args )
 {
-    QueueMsg( p_this, i_queue, i_type, psz_module, psz_format, args );
+    QueueMsg( p_this, i_type, psz_module, psz_format, args );
 }
 
 /* Generic functions used when variadic macros are not available. */
@@ -232,8 +212,7 @@ void __msg_GenericVa( vlc_object_t *p_this, int i_queue,
     { \
         va_list args; \
         va_start( args, psz_format ); \
-        QueueMsg( p_this,MSG_QUEUE_NORMAL, FN_TYPE, "unknown", \
-                  psz_format, args ); \
+        QueueMsg( p_this, FN_TYPE, "unknown", psz_format, args ); \
         va_end( args ); \
     } \
     struct _
@@ -264,8 +243,7 @@ DECLARE_MSG_FN( __msg_Dbg,  VLC_MSG_DBG );
  * is full). If the message can't be converted to string in memory, it issues
  * a warning.
  */
-static void QueueMsg( vlc_object_t *p_this, int i_queue, int i_type,
-                      const char *psz_module,
+static void QueueMsg( vlc_object_t *p_this, int i_type, const char *psz_module,
                       const char *psz_format, va_list _args )
 {
     assert (p_this);
@@ -410,9 +388,8 @@ static void QueueMsg( vlc_object_t *p_this, int i_queue, int i_type,
     psz_str[ i_size - 1 ] = 0; /* Just in case */
 #endif
 
-    assert( i_queue < NB_QUEUES );
     LOCK_BANK;
-    p_queue = &QUEUE(i_queue) ;
+    p_queue = &QUEUE;
     vlc_mutex_lock( &p_queue->lock );
 
     /* Check there is room in the queue for our message */
@@ -439,23 +416,20 @@ static void QueueMsg( vlc_object_t *p_this, int i_queue, int i_type,
         {
             p_queue->b_overflow = true;
 
-            if( p_queue->i_id == MSG_QUEUE_NORMAL )
-            {
-               /* Put the overflow message in the queue */
-                p_item = p_queue->msg + p_queue->i_stop;
-                p_queue->i_stop = (p_queue->i_stop + 1) % VLC_MSG_QSIZE;
-
-                p_item->i_type =        VLC_MSG_WARN;
-                p_item->i_object_id =   p_this->i_object_id;
-                p_item->psz_object_type = p_this->psz_object_type;
-                p_item->psz_module =    strdup( "message" );
-                p_item->psz_msg =       strdup( "message queue overflowed" );
-                p_item->psz_header =    NULL;
-
-               PrintMsg( p_this, p_item );
-               /* We print from a dummy item */
-               p_item = &item;
-            }
+            /* Put the overflow message in the queue */
+            p_item = p_queue->msg + p_queue->i_stop;
+            p_queue->i_stop = (p_queue->i_stop + 1) % VLC_MSG_QSIZE;
+
+            p_item->i_type =        VLC_MSG_WARN;
+            p_item->i_object_id =   p_this->i_object_id;
+            p_item->psz_object_type = p_this->psz_object_type;
+            p_item->psz_module =    strdup( "message" );
+            p_item->psz_msg =       strdup( "message queue overflowed" );
+            p_item->psz_header =    NULL;
+
+            PrintMsg( p_this, p_item );
+            /* We print from a dummy item */
+            p_item = &item;
         }
     }
 
@@ -474,8 +448,7 @@ static void QueueMsg( vlc_object_t *p_this, int i_queue, int i_type,
     p_item->psz_msg =       psz_str;
     p_item->psz_header =    psz_header;
 
-    if( p_queue->i_id == MSG_QUEUE_NORMAL )
-        PrintMsg( p_this, p_item );
+    PrintMsg( p_this, p_item );
 
     if( p_queue->b_overflow )
     {
@@ -575,7 +548,7 @@ static void PrintMsg ( vlc_object_t * p_this, msg_item_t * p_item )
     psz_object = p_item->psz_object_type;
 
 #ifdef UNDER_CE
-#   define CE_WRITE(str) WriteFile( QUEUE(MSG_QUEUE_NORMAL).logfile, \
+#   define CE_WRITE(str) WriteFile( QUEUE.logfile, \
                                     str, strlen(str), &i_dummy, NULL );
     CE_WRITE( p_item->psz_module );
     CE_WRITE( " " );
@@ -584,7 +557,7 @@ static void PrintMsg ( vlc_object_t * p_this, msg_item_t * p_item )
     CE_WRITE( ": " );
     CE_WRITE( p_item->psz_msg );
     CE_WRITE( "\r\n" );
-    FlushFileBuffers( QUEUE(MSG_QUEUE_NORMAL).logfile );
+    FlushFileBuffers( QUEUE.logfile );
 
 #else
     /* Send the message to stderr */