diff options
author | Alexey Yakovenko <wakeroid@gmail.com> | 2010-01-23 16:03:50 +0100 |
---|---|---|
committer | Alexey Yakovenko <wakeroid@gmail.com> | 2010-01-23 16:03:50 +0100 |
commit | b5ada7e3c038bab1dc0b60a532451c30616e981a (patch) | |
tree | 1a40faefd8f706b7c44c78ae94d71232c84d2162 /plugins.c | |
parent | 0ebcf8bc7dcc9f8e71ce23c608e95e23e77d66c9 (diff) | |
parent | 9be49f3f078dbe9668c8c40b7171a0d039f19682 (diff) |
Merge branch 'master' into devel
Conflicts:
Makefile.am
Diffstat (limited to 'plugins.c')
-rw-r--r-- | plugins.c | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -21,7 +21,7 @@ #include <assert.h> #include <stdio.h> #include <stdlib.h> -#include <alloca.h> +//#include <alloca.h> #include <string.h> #ifndef __linux__ #define _POSIX_C_SOURCE @@ -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 @@ -347,6 +350,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); @@ -464,6 +470,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; |