]> git.sesse.net Git - vlc/commitdiff
* OS X: Fixed a segfault with empty configuration strings (closes #65),
authorChristophe Massiot <massiot@videolan.org>
Thu, 9 Jan 2003 23:43:07 +0000 (23:43 +0000)
committerChristophe Massiot <massiot@videolan.org>
Thu, 9 Jan 2003 23:43:07 +0000 (23:43 +0000)
* cosmetic messages cleanups.

extras/MacOSX/Resources/stepf.png [deleted file]
include/vlc_config.h
modules/gui/macosx/intf.m
modules/misc/network/ipv4.c
src/misc/threads.c

diff --git a/extras/MacOSX/Resources/stepf.png b/extras/MacOSX/Resources/stepf.png
deleted file mode 100644 (file)
index 037cf15..0000000
Binary files a/extras/MacOSX/Resources/stepf.png and /dev/null differ
index 80fdd361e28e5a82eeed1e4697f7b0345b9aee8c..11ef129caafeec3fc4de5b6da6c8783d4f7e566a 100644 (file)
@@ -2,7 +2,7 @@
  * vlc_config.h: limits and configuration
  * Defines all compilation-time configuration constants and size limits
  *****************************************************************************
- * Copyright (C) 1999-2002 VideoLAN
+ * Copyright (C) 1999-2003 VideoLAN
  *
  * Authors: Vincent Seguin <seguin@via.ecp.fr>
  *          Samuel Hocevar <sam@via.ecp.fr>
@@ -45,7 +45,7 @@
 
 /* When a thread waits on a condition in debug mode, delay to wait before
  * outputting an error message (in second) */
-#define THREAD_COND_TIMEOUT             5
+#define THREAD_COND_TIMEOUT             15
 
 /* The configuration file and directory */
 #ifdef SYS_BEOS
index 90b2c0e2479300d12017ec28d193f243e0b27dfe..88b7f4dfd6417cc28bd18138684afbd2cdf45b08 100644 (file)
@@ -1,8 +1,8 @@
 /*****************************************************************************
  * intf.m: MacOS X interface plugin
  *****************************************************************************
- * Copyright (C) 2002 VideoLAN
- * $Id: intf.m,v 1.20 2003/01/06 22:07:47 massiot Exp $
+ * Copyright (C) 2002-2003 VideoLAN
+ * $Id: intf.m,v 1.21 2003/01/09 23:43:07 massiot Exp $
  *
  * Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
  *          Christophe Massiot <massiot@via.ecp.fr>
@@ -135,6 +135,7 @@ static void Run( intf_thread_t *p_intf )
 
 - (NSString *)localizedString:(char *)psz
 {
+    if ( psz == NULL ) return NULL;
     UInt32 uiLength = (UInt32)strlen( psz );
     NSData * o_data = [NSData dataWithBytes: psz length: uiLength];
     NSString *o_str = [[NSString alloc] initWithData: o_data
index 5d96b1c41a1e479cd529f03b84722e2574807dfd..2ea2d72d531dcd41e6333db2905a5502e9dd9759 100644 (file)
@@ -2,7 +2,7 @@
  * ipv4.c: IPv4 network abstraction layer
  *****************************************************************************
  * Copyright (C) 2001, 2002 VideoLAN
- * $Id: ipv4.c,v 1.11 2003/01/02 23:50:55 massiot Exp $
+ * $Id: ipv4.c,v 1.12 2003/01/09 23:43:07 massiot Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *          Mathias Kretschmer <mathias@research.att.com>
@@ -190,7 +190,7 @@ static int OpenUDP( vlc_object_t * p_this, network_socket_t * p_socket )
                     (void *) &i_opt, sizeof( i_opt ) ) == -1 )
     {
 #ifdef HAVE_ERRNO_H
-        msg_Warn( p_this, "cannot configure socket (SO_RCVBUF: %s)",
+        msg_Dbg( p_this, "cannot configure socket (SO_RCVBUF: %s)",
                           strerror(errno));
 #else
         msg_Warn( p_this, "cannot configure socket (SO_RCVBUF)" );
@@ -218,8 +218,8 @@ static int OpenUDP( vlc_object_t * p_this, network_socket_t * p_socket )
     }
     else if( i_opt < 0x80000 )
     {
-        msg_Warn( p_this, "socket buffer size is 0x%x instead of 0x%x",
-                          i_opt, 0x80000 );
+        msg_Dbg( p_this, "socket buffer size is 0x%x instead of 0x%x",
+                         i_opt, 0x80000 );
     }
 
 
index 740ca3c98e7f117b330a50a85fb2744b15b87785..dc3429ff04ed9c385b3f078b734dd995e856dc2d 100644 (file)
@@ -2,7 +2,7 @@
  * threads.c : threads implementation for the VideoLAN client
  *****************************************************************************
  * Copyright (C) 1999, 2000, 2001, 2002 VideoLAN
- * $Id: threads.c,v 1.32 2003/01/06 22:57:47 massiot Exp $
+ * $Id: threads.c,v 1.33 2003/01/09 23:43:07 massiot Exp $
  *
  * Authors: Jean-Marc Dressler <polux@via.ecp.fr>
  *          Samuel Hocevar <sam@zoy.org>
@@ -618,6 +618,7 @@ int __vlc_thread_create( vlc_object_t *p_this, char * psz_file, int i_line,
                       psz_file, i_line, strerror(i_error) );
             i_priority = 0;
         }
+
     }
 
 #elif defined( HAVE_CTHREADS_H )
@@ -690,19 +691,19 @@ int __vlc_thread_set_priority( vlc_object_t *p_this, char * psz_file,
 #elif defined( PTHREAD_COND_T_IN_PTHREAD_H )
     if ( i_priority )
     {
+        int i_error;
         struct sched_param param;
         memset( &param, 0, sizeof(struct sched_param) );
         param.sched_priority = i_priority;
-        if ( pthread_setschedparam( pthread_self(), SCHED_RR, &param ) )
+        if ( (i_error = pthread_setschedparam( pthread_self(),
+                                               SCHED_RR, &param )) )
         {
-            msg_Warn( p_this, "couldn't go to real-time priority (%s:%d)",
-                      psz_file, i_line );
-            return 1;
+            msg_Warn( p_this, "couldn't go to real-time priority (%s:%d): %s",
+                      psz_file, i_line, strerror(i_error) );
+            i_priority = 0;
         }
     }
 
-#else
-    return 1;
 #endif
 
     return 0;