/*****************************************************************************
* modules.c : Builtin and plugin modules management functions
*****************************************************************************
- * Copyright (C) 2001 VideoLAN
- * $Id: modules.c,v 1.139 2003/11/19 10:17:51 gbazin Exp $
+ * Copyright (C) 2001-2004 VideoLAN
+ * $Id: modules.c,v 1.144 2004/01/25 17:16:06 zorglub Exp $
*
* Authors: Sam Hocevar <sam@zoy.org>
* Ethan C. Baldridge <BaldridgeE@cadmus.com>
#include "aout_internal.h"
#include "stream_output.h"
-/*#include "announce.h"*/
#include "osd.h"
#include "iso_lang.h"
#else
# include "modules_builtin.h"
#endif
+#include "network.h"
/*****************************************************************************
* Local prototypes
struct dirent * file;
#endif
- if( i_maxdepth < 0 )
+ if( p_this->p_vlc->b_die || i_maxdepth < 0 )
{
return;
}
AllocatePluginFile( p_this, psz_path );
}
}
- while( FindNextFile( handle, &finddata ) );
+ while( !p_this->p_vlc->b_die && FindNextFile( handle, &finddata ) );
/* Close the directory */
FindClose( handle );
i_dirlen = strlen( psz_dir );
/* Parse the directory and try to load all files it contains. */
- while( (file = readdir( dir )) )
+ while( !p_this->p_vlc->b_die && (file = readdir( dir )) )
{
struct stat statbuf;
unsigned int i_len;
}
#elif defined(HAVE_DL_WINDOWS) && defined(WIN32)
- char psz_filename[MAX_PATH];
handle = LoadLibrary( psz_file );
if( handle == NULL )
{
char *psz_error = GetWindowsError();
msg_Warn( p_this, "cannot load module `%s' (%s)",
- psz_filename, psz_error );
+ psz_file, psz_error );
free( psz_error );
}