Enlightenment CVS committal
Author : tsauerbeck
Project : misc
Module : eplayer
Dir : misc/eplayer/src
Modified Files:
eplayer.c plugin.c
Log Message:
error messages for the plugin code
===================================================================
RCS file: /cvsroot/enlightenment/misc/eplayer/src/eplayer.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -3 -r1.26 -r1.27
--- eplayer.c 24 Jan 2004 20:27:28 -0000 1.26
+++ eplayer.c 24 Jan 2004 21:05:54 -0000 1.27
@@ -34,10 +34,8 @@
ePlayer *player = udata;
InputPlugin *ip;
- if (!(ip = plugin_new(file, PLUGIN_TYPE_INPUT))) {
- fprintf (stderr, "Cannot load plugin: '%s'\n", file);
+ if (!(ip = plugin_new(file, PLUGIN_TYPE_INPUT)))
return 0;
- }
/* only add this plugin if it hasn't been added yet */
if (find_input_plugin(player, ip->name)) {
===================================================================
RCS file: /cvsroot/enlightenment/misc/eplayer/src/plugin.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- plugin.c 24 Jan 2004 20:27:28 -0000 1.4
+++ plugin.c 24 Jan 2004 21:06:18 -0000 1.5
@@ -32,12 +32,16 @@
memset(p, 0, size);
if (!(p->handle = lt_dlopenext(file))) {
+ fprintf(stderr, "Cannot load plugin '%s': %s\n",
+ file, lt_dlerror());
plugin_free(p);
return NULL;
}
/* get the address of the init function */
if (!(init = lt_dlsym(p->handle, "plugin_init"))) {
+ fprintf(stderr, "Cannot load plugin '%s':"
+ "cannot find init method!\n", file);
plugin_free(p);
return NULL;
}
@@ -46,6 +50,15 @@
/* now call the init function */
if (!(*init)(p)) {
+ fprintf(stderr, "Cannot load plugin '%s':"
+ "init method failed!\n", file);
+ plugin_free(p);
+ return NULL;
+ }
+
+ if (!p->name) {
+ fprintf(stderr, "Cannot load plugin '%s':"
+ "plugin name not set!\n", file);
plugin_free(p);
return NULL;
}
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs