From 920f7a102346d9c464bb8bbe2376ebbe5a7039b4 Mon Sep 17 00:00:00 2001 From: Christophe Massiot Date: Thu, 9 Jan 2003 23:43:07 +0000 Subject: [PATCH] * OS X: Fixed a segfault with empty configuration strings (closes #65), * cosmetic messages cleanups. --- extras/MacOSX/Resources/stepf.png | Bin 199 -> 0 bytes include/vlc_config.h | 4 ++-- modules/gui/macosx/intf.m | 5 +++-- modules/misc/network/ipv4.c | 8 ++++---- src/misc/threads.c | 15 ++++++++------- 5 files changed, 17 insertions(+), 15 deletions(-) delete mode 100644 extras/MacOSX/Resources/stepf.png diff --git a/extras/MacOSX/Resources/stepf.png b/extras/MacOSX/Resources/stepf.png deleted file mode 100644 index 037cf155ff6b691acac26956876088fdee93103f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 199 zcmeAS@N?(olHy`uVBq!ia0vp^k|4~%1|*NXY)uAIEa{HEjtmSN`?>!lvI6;RN#5=* z4F5rJ!QSPQfg+p*9+AZi4BSE>%y{W;-5;PJdx@v7EBi$*R&h&7={Q+4ppc8Fi(^Q| zoVRBWaxxh3I0fGRTkhxH5y)iwV?7tYhvv@E&7q$e8DfMNB?(9;33AU;Ffwsnvd`t5 lnG&P03tPkyrl4DI84Le&2zt82o&uW3;OXk;vd$@?2>^XgH{}2T diff --git a/include/vlc_config.h b/include/vlc_config.h index 80fdd361e2..11ef129caa 100644 --- a/include/vlc_config.h +++ b/include/vlc_config.h @@ -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 * Samuel Hocevar @@ -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 diff --git a/modules/gui/macosx/intf.m b/modules/gui/macosx/intf.m index 90b2c0e247..88b7f4dfd6 100644 --- a/modules/gui/macosx/intf.m +++ b/modules/gui/macosx/intf.m @@ -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 * Christophe Massiot @@ -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 diff --git a/modules/misc/network/ipv4.c b/modules/misc/network/ipv4.c index 5d96b1c41a..2ea2d72d53 100644 --- a/modules/misc/network/ipv4.c +++ b/modules/misc/network/ipv4.c @@ -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 * Mathias Kretschmer @@ -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 ); } diff --git a/src/misc/threads.c b/src/misc/threads.c index 740ca3c98e..dc3429ff04 100644 --- a/src/misc/threads.c +++ b/src/misc/threads.c @@ -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 * Samuel Hocevar @@ -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( ¶m, 0, sizeof(struct sched_param) ); param.sched_priority = i_priority; - if ( pthread_setschedparam( pthread_self(), SCHED_RR, ¶m ) ) + if ( (i_error = pthread_setschedparam( pthread_self(), + SCHED_RR, ¶m )) ) { - 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; -- 2.39.2