summaryrefslogtreecommitdiff
path: root/plugins.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins.c')
-rw-r--r--plugins.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/plugins.c b/plugins.c
index 67323d35..d7a0dd45 100644
--- a/plugins.c
+++ b/plugins.c
@@ -43,6 +43,9 @@
#include "junklib.h"
#include "vfs.h"
+#define trace(...) { fprintf(stderr, __VA_ARGS__); }
+//#define trace(fmt,...)
+
#ifndef PATH_MAX
#define PATH_MAX 1024 /* max # of characters in a path name */
#endif
@@ -333,6 +336,9 @@ plug_quit (void) {
/////// non-api functions (plugin support)
void
plug_event_call (DB_event_t *ev) {
+ if (!mutex) {
+ trace ("plug: event passed before plugin initialization\n");
+ }
ev->time = time (NULL);
// printf ("plug_event_call enter %d\n", ev->event);
mutex_lock (mutex);
@@ -450,6 +456,7 @@ plug_load_all (void) {
fprintf (stderr, "\033[0;31mDISABLE_VERSIONCHECK=1! do not distribute!\033[0;m\n");
#endif
const char *conf_blacklist_plugins = conf_get_str ("blacklist_plugins", "");
+ trace ("plug: mutex_create\n");
mutex = mutex_create ();
const char *dirname = LIBDIR "/deadbeef";
struct dirent **namelist = NULL;