From 814ca5145d0ad93c63e0a52ac98da66d24d1329d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rafa=C3=ABl=20Carr=C3=A9?= Date: Tue, 22 Jan 2008 15:22:43 +0000 Subject: [PATCH] print a message about cvlc only when running with the default interface --- src/libvlc-common.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/libvlc-common.c b/src/libvlc-common.c index 5b5675207d..0051fa2f4e 100644 --- a/src/libvlc-common.c +++ b/src/libvlc-common.c @@ -214,8 +214,6 @@ libvlc_int_t * libvlc_InternalCreate( void ) /* Announce who we are - Do it only for first instance ? */ msg_Dbg( p_libvlc, COPYRIGHT_MESSAGE ); msg_Dbg( p_libvlc, "libvlc was configured with %s", CONFIGURE_LINE ); - if( strcmp( p_libvlc->psz_object_name, "cvlc" ) ) /* Not running with cvlc */ - msg_Info( p_libvlc, "Running vlc with the default interface. Use 'cvlc' to use vlc without interface."); /* Initialize mutexes */ vlc_mutex_init( p_libvlc, &p_libvlc->config_lock ); @@ -1060,6 +1058,14 @@ int libvlc_InternalAddIntf( libvlc_int_t *p_libvlc, if( !p_libvlc ) return VLC_EGENERIC; + if( !psz_module ) /* requesting the default interface */ + { + char *psz_interface = config_GetPsz( p_libvlc, "intf" ); + if( !psz_interface || !*psz_interface ) /* "intf" has not been set */ + msg_Info( p_libvlc, _("Running vlc with the default interface. Use 'cvlc' to use vlc without interface.") ); + free( psz_interface ); + } + #ifndef WIN32 if( libvlc_global.b_daemon && b_block && !psz_module ) { -- 2.39.5