From ea7419981d1beef0d9e78cd0169d502184bdd1fc Mon Sep 17 00:00:00 2001 From: Juergen Keil Date: Mon, 7 Jan 2002 11:33:16 +0000 Subject: Don't use dlerror() as a macro argument for LOG_MSG. LOG_MSG might use the macro argument more than once, and a second++ invocation of dlerror() returns NULL, not the original error message. CVS patchset: 1361 CVS date: 2002/01/07 11:33:16 --- src/xine-engine/load_plugins.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/xine-engine/load_plugins.c b/src/xine-engine/load_plugins.c index cde800de7..6e9e15916 100644 --- a/src/xine-engine/load_plugins.c +++ b/src/xine-engine/load_plugins.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: load_plugins.c,v 1.65 2002/01/05 21:54:17 miguelfreitas Exp $ + * $Id: load_plugins.c,v 1.66 2002/01/07 11:33:16 jkeil Exp $ * * * Load input/demux/audio_out/video_out/codec plugins @@ -153,8 +153,10 @@ void load_demux_plugins (xine_t *this, plugin_name = str; if(!(plugin = dlopen (str, RTLD_LAZY))) { + char *dl_error_msg = dlerror(); + LOG_MSG(this, _("load_plugins: cannot open demux plugin %s:\n%s\n"), - str, dlerror()); + str, dl_error_msg); } else { @@ -311,8 +313,10 @@ void load_input_plugins (xine_t *this, plugin_name = str; if(!(plugin = dlopen (str, RTLD_LAZY))) { + char *dl_error_msg = dlerror(); + LOG_MSG(this, _("load_plugins: cannot open input plugin %s:\n%s\n"), - str, dlerror()); + str, dl_error_msg); } else { void *(*initplug) (int, xine_t *); @@ -525,9 +529,10 @@ void load_decoder_plugins (xine_t *this, plugin_name = str; if(!(plugin = dlopen (str, RTLD_LAZY))) { + char *dl_error_msg = dlerror(); LOG_MSG(this, _("load_plugins: failed to load plugin %s:\n%s\n"), - str, dlerror()); + str, dl_error_msg); } else { int plugin_prio; -- cgit v1.2.3