Commit 920f7a10 authored by Christophe Massiot's avatar Christophe Massiot

* OS X: Fixed a segfault with empty configuration strings (closes #65),

* cosmetic messages cleanups.
parent 4f697504
......@@ -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
......
/*****************************************************************************
* 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
......
......@@ -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 );
}
......
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment