summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuergen Keil <jkeil@users.sourceforge.net>2002-01-07 11:33:16 +0000
committerJuergen Keil <jkeil@users.sourceforge.net>2002-01-07 11:33:16 +0000
commitea7419981d1beef0d9e78cd0169d502184bdd1fc (patch)
tree74ef433633328fa7eb2bce7d3704435e1941610d
parent0adff4cf87927e281295acdecc099c4c12084f80 (diff)
downloadxine-lib-ea7419981d1beef0d9e78cd0169d502184bdd1fc.tar.gz
xine-lib-ea7419981d1beef0d9e78cd0169d502184bdd1fc.tar.bz2
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
-rw-r--r--src/xine-engine/load_plugins.c13
1 files changed, 9 insertions, 4 deletions
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;